Commit e53c4744 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] af9033: wrap DVBv3 BER to DVBv5 BER

DVBv5 BER is calculated anyway, so just return it for legacy
read_ber() API too.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 1d0ceae4
......@@ -38,6 +38,7 @@ struct af9033_dev {
fe_status_t fe_status;
u32 ber;
u32 ucb;
u64 post_bit_error_prev; /* for old read_ber we return (curr - prev) */
u64 post_bit_error;
u64 post_bit_count;
u64 error_block_count;
......@@ -918,13 +919,9 @@ static int af9033_update_ch_stat(struct af9033_dev *dev)
static int af9033_read_ber(struct dvb_frontend *fe, u32 *ber)
{
struct af9033_dev *dev = fe->demodulator_priv;
int ret;
ret = af9033_update_ch_stat(dev);
if (ret < 0)
return ret;
*ber = dev->ber;
*ber = (dev->post_bit_error - dev->post_bit_error_prev);
dev->post_bit_error_prev = dev->post_bit_error;
return 0;
}
......
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