aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorAbylay Ospan <aospan@netup.ru>2009-12-12 11:37:44 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-15 21:18:49 -0500
commit247cb142a924fad215337170a5201a5cf9d960e1 (patch)
treef04c6e37f1602931e583ff7492dd49ad00d8bc12 /drivers/media
parent174c44e4a7d2418e8990c075dd7f5de51699781e (diff)
V4L/DVB (13630): Print bitrate measured by stv0900 demod in stv0900_read_status
Signed-off-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/frontends/stv0900_core.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/stv0900_core.c b/drivers/media/dvb/frontends/stv0900_core.c
index df49ea0983bc..8762c86044a5 100644
--- a/drivers/media/dvb/frontends/stv0900_core.c
+++ b/drivers/media/dvb/frontends/stv0900_core.c
@@ -1451,6 +1451,8 @@ static int stv0900_status(struct stv0900_internal *intp,
1451{ 1451{
1452 enum fe_stv0900_search_state demod_state; 1452 enum fe_stv0900_search_state demod_state;
1453 int locked = FALSE; 1453 int locked = FALSE;
1454 u8 tsbitrate0_val, tsbitrate1_val;
1455 s32 bitrate;
1454 1456
1455 demod_state = stv0900_get_bits(intp, HEADER_MODE); 1457 demod_state = stv0900_get_bits(intp, HEADER_MODE);
1456 switch (demod_state) { 1458 switch (demod_state) {
@@ -1473,6 +1475,17 @@ static int stv0900_status(struct stv0900_internal *intp,
1473 1475
1474 dprintk("%s: locked = %d\n", __func__, locked); 1476 dprintk("%s: locked = %d\n", __func__, locked);
1475 1477
1478 if (stvdebug) {
1479 /* Print TS bitrate */
1480 tsbitrate0_val = stv0900_read_reg(intp, TSBITRATE0);
1481 tsbitrate1_val = stv0900_read_reg(intp, TSBITRATE1);
1482 /* Formula Bit rate = Mclk * px_tsfifo_bitrate / 16384 */
1483 bitrate = (stv0900_get_mclk_freq(intp, intp->quartz)/1000000)
1484 * (tsbitrate1_val << 8 | tsbitrate0_val);
1485 bitrate /= 16384;
1486 dprintk("TS bitrate = %d Mbit/sec \n", bitrate);
1487 };
1488
1476 return locked; 1489 return locked;
1477} 1490}
1478 1491