Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (4913): Fix broken TUNER_LG_NTSC_TAPE radio support

The TUNER_LG_NTSC_TAPE is identical in all respects to the
TUNER_PHILIPS_FM1236_MK3. So use the params struct for the Philips tuner.
Also add this LG_NTSC_TAPE tuner to the switches where radio specific
parameters are set so it behaves like a TUNER_PHILIPS_FM1236_MK3. This
change fixes the radio support for this tuner (the wrong bandswitch byte
was used).
Thanks to Andy Walls <cwalls@radix.net> for finding this bug.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
122b5dbe c8f5b2f5

+4 -12
+2
drivers/media/video/tuner-simple.c
··· 108 108 case TUNER_PHILIPS_FM1216ME_MK3: 109 109 case TUNER_PHILIPS_FM1236_MK3: 110 110 case TUNER_PHILIPS_FM1256_IH3: 111 + case TUNER_LG_NTSC_TAPE: 111 112 stereo = ((status & TUNER_SIGNAL) == TUNER_STEREO_MK3); 112 113 break; 113 114 default: ··· 422 421 case TUNER_PHILIPS_FM1216ME_MK3: 423 422 case TUNER_PHILIPS_FM1236_MK3: 424 423 case TUNER_PHILIPS_FMD1216ME_MK3: 424 + case TUNER_LG_NTSC_TAPE: 425 425 buffer[3] = 0x19; 426 426 break; 427 427 case TUNER_TNF_5335MF:
+2 -12
drivers/media/video/tuner-types.c
··· 672 672 }, 673 673 }; 674 674 675 - /* ------------ TUNER_LG_NTSC_TAPE - LGINNOTEK NTSC ------------ */ 676 - 677 - static struct tuner_params tuner_lg_ntsc_tape_params[] = { 678 - { 679 - .type = TUNER_PARAM_TYPE_NTSC, 680 - .ranges = tuner_fm1236_mk3_ntsc_ranges, 681 - .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), 682 - }, 683 - }; 684 - 685 675 /* ------------ TUNER_TNF_8831BGFF - Philips PAL ------------ */ 686 676 687 677 static struct tuner_range tuner_tnf_8831bgff_pal_ranges[] = { ··· 1321 1331 }, 1322 1332 [TUNER_LG_NTSC_TAPE] = { /* LGINNOTEK NTSC */ 1323 1333 .name = "LG NTSC (TAPE series)", 1324 - .params = tuner_lg_ntsc_tape_params, 1325 - .count = ARRAY_SIZE(tuner_lg_ntsc_tape_params), 1334 + .params = tuner_fm1236_mk3_params, 1335 + .count = ARRAY_SIZE(tuner_fm1236_mk3_params), 1326 1336 }, 1327 1337 [TUNER_TNF_8831BGFF] = { /* Philips PAL */ 1328 1338 .name = "Tenna TNF 8831 BGFF)",