Skip to content

Commit fd34cb0

Browse files
author
Mauro Carvalho Chehab
committed
[media] tuner/xc2028: Fix frequency offset for radio mode
In radio mode, no frequency offset should be used. Instead of taking Thierry's patch that creates a separate function to calculate the digital offset, it seemed better to just keep everything at the same place. Reported-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1 parent 4d37ece commit fd34cb0

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎drivers/media/common/tuners/tuner-xc2028.c‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -940,11 +940,16 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */,
940940
* that xc2028 will be in a safe state.
941941
* Maybe this might also be needed for DTV.
942942
*/
943-
if (new_type == V4L2_TUNER_ANALOG_TV) {
943+
switch (new_type) {
944+
case V4L2_TUNER_ANALOG_TV:
944945
rc = send_seq(priv, {0x00, 0x00});
945946

946-
/* Analog modes require offset = 0 */
947-
} else {
947+
/* Analog mode requires offset = 0 */
948+
break;
949+
case V4L2_TUNER_RADIO:
950+
/* Radio mode requires offset = 0 */
951+
break;
952+
case V4L2_TUNER_DIGITAL_TV:
948953
/*
949954
* Digital modes require an offset to adjust to the
950955
* proper frequency. The offset depends on what

0 commit comments

Comments
 (0)