bttv: Enable radio if the card description has no radio flag but the tuner has FM
PATCH 1/1 bttv: Enable radio if the card description has no radio flag but the tuner has FM
Some bttv cards (e.g. card=24) have a tuner which can receive FM radio but the card description doesn't have the has_radio flag set, because the description is used for cards with and without FM capability. The function bttv_init_tuner can detect the tuner either automatically or by insmod option. However the original code only partly uses the detected tuner capabilities. While the radio device node is created, the device is not usable due to the wrong mode_mask. This patch uses the has_radio flag from the detected tuner instead of the card description.
--- media_build/linux/drivers/media/video/bt8xx/bttv-cards.c.orig
2012-04-17 15:17:55.000000000 +0200 +++ media_build/linux/drivers/media/video/bt8xx/bttv-cards.c 2012-04-17 15:50:48.000000000 +0200
@@ -3665,7 +3665,7 @@
tun_setup.type = btv->tuner_type;
tun_setup.addr = addr;
- if (bttv_tvcards[btv->c.type].has_radio)
+ if (btv->has_radio)
tun_setup.mode_mask |= T_RADIO;
bttv_call_all(btv, tuner, s_type_addr, &tun_setup);