mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[media] tda18212: round IF frequency to close hardware value
Chip configures IF frequency resolution of 50 kHz. Round it nearest. Off-by 50 kHz is almost nothing in real life... Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
835bf82ce4
commit
8cffcc7899
1 changed files with 1 additions and 1 deletions
|
@ -227,7 +227,7 @@ static int tda18212_set_params(struct dvb_frontend *fe,
|
|||
buf[0] = 0x02;
|
||||
buf[1] = bw_params[i][1];
|
||||
buf[2] = 0x03; /* default value */
|
||||
buf[3] = if_khz / 50;
|
||||
buf[3] = DIV_ROUND_CLOSEST(if_khz, 50);
|
||||
buf[4] = ((c->frequency / 1000) >> 16) & 0xff;
|
||||
buf[5] = ((c->frequency / 1000) >> 8) & 0xff;
|
||||
buf[6] = ((c->frequency / 1000) >> 0) & 0xff;
|
||||
|
|
Loading…
Reference in a new issue