diff options
author | Devin Heitmueller <dheitmueller@linuxtv.org> | 2009-03-11 01:58:53 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:24 -0400 |
commit | ea2278633ab4728c41b4043f47df4d3e39131992 (patch) | |
tree | cca377d7c1e1e7b8b9ea483e5a07954b14409b2e /drivers/media/common/tuners | |
parent | e9d4a6d5ef58a700d3add96ffb984741c6e34fff (diff) |
V4L/DVB (11059): xc5000: fix bug for hybrid xc5000 devices with IF other than 5380
The xc5000 driver has a bug where the IF is always set to whatever the first
caller to dvb_attach() provides. This fails when the device requires an IF
other than 5380 and the analog driver is loaded first through tuner-core
(which always supplies the hard-coded value of 5380).
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners')
-rw-r--r-- | drivers/media/common/tuners/xc5000.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index ef4bdf2315f1..b54598550dc4 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c | |||
@@ -973,8 +973,6 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, | |||
973 | case 1: | 973 | case 1: |
974 | /* new tuner instance */ | 974 | /* new tuner instance */ |
975 | priv->bandwidth = BANDWIDTH_6_MHZ; | 975 | priv->bandwidth = BANDWIDTH_6_MHZ; |
976 | priv->if_khz = cfg->if_khz; | ||
977 | |||
978 | fe->tuner_priv = priv; | 976 | fe->tuner_priv = priv; |
979 | break; | 977 | break; |
980 | default: | 978 | default: |
@@ -983,6 +981,13 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, | |||
983 | break; | 981 | break; |
984 | } | 982 | } |
985 | 983 | ||
984 | if (priv->if_khz == 0) { | ||
985 | /* If the IF hasn't been set yet, use the value provided by | ||
986 | the caller (occurs in hybrid devices where the analog | ||
987 | call to xc5000_attach occurs before the digital side) */ | ||
988 | priv->if_khz = cfg->if_khz; | ||
989 | } | ||
990 | |||
986 | /* Check if firmware has been loaded. It is possible that another | 991 | /* Check if firmware has been loaded. It is possible that another |
987 | instance of the driver has loaded the firmware. | 992 | instance of the driver has loaded the firmware. |
988 | */ | 993 | */ |