Commit 247cb142 authored by Abylay Ospan's avatar Abylay Ospan Committed by Mauro Carvalho Chehab

V4L/DVB (13630): Print bitrate measured by stv0900 demod in stv0900_read_status

Signed-off-by: default avatarAbylay Ospan <aospan@netup.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 174c44e4
...@@ -1451,6 +1451,8 @@ static int stv0900_status(struct stv0900_internal *intp, ...@@ -1451,6 +1451,8 @@ static int stv0900_status(struct stv0900_internal *intp,
{ {
enum fe_stv0900_search_state demod_state; enum fe_stv0900_search_state demod_state;
int locked = FALSE; int locked = FALSE;
u8 tsbitrate0_val, tsbitrate1_val;
s32 bitrate;
demod_state = stv0900_get_bits(intp, HEADER_MODE); demod_state = stv0900_get_bits(intp, HEADER_MODE);
switch (demod_state) { switch (demod_state) {
...@@ -1473,6 +1475,17 @@ static int stv0900_status(struct stv0900_internal *intp, ...@@ -1473,6 +1475,17 @@ static int stv0900_status(struct stv0900_internal *intp,
dprintk("%s: locked = %d\n", __func__, locked); dprintk("%s: locked = %d\n", __func__, locked);
if (stvdebug) {
/* Print TS bitrate */
tsbitrate0_val = stv0900_read_reg(intp, TSBITRATE0);
tsbitrate1_val = stv0900_read_reg(intp, TSBITRATE1);
/* Formula Bit rate = Mclk * px_tsfifo_bitrate / 16384 */
bitrate = (stv0900_get_mclk_freq(intp, intp->quartz)/1000000)
* (tsbitrate1_val << 8 | tsbitrate0_val);
bitrate /= 16384;
dprintk("TS bitrate = %d Mbit/sec \n", bitrate);
};
return locked; return locked;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment