The patch number 11059 was added via Devin Heitmueller <dheitmuel...@linuxtv.org> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel If anyone has any objections, please let us know by sending a message to: Linux Media Mailing List <linux-me...@vger.kernel.org> ------ From: Devin Heitmueller <dheitmuel...@linuxtv.org> 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 <mkru...@linuxtv.org> and Steven Toth <st...@linuxtv.org> for providing sample hardware, engineering level support, and testing. Priority: normal Signed-off-by: Devin Heitmueller <dheitmuel...@linuxtv.org> Signed-off-by: Michael Krufky <mkru...@linuxtv.org> --- linux/drivers/media/common/tuners/xc5000.c | 9 +++++++-- linux/drivers/media/video/tuner-core.c | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff -r 39c257ae5063 -r b16c5d569f62 linux/drivers/media/common/tuners/xc5000.c --- a/linux/drivers/media/common/tuners/xc5000.c Tue Mar 10 18:32:24 2009 -0300 +++ b/linux/drivers/media/common/tuners/xc5000.c Wed Mar 11 01:58:53 2009 -0400 @@ -989,14 +989,19 @@ struct dvb_frontend *xc5000_attach(struc case 1: /* new tuner instance */ priv->bandwidth = BANDWIDTH_6_MHZ; - priv->if_khz = cfg->if_khz; - fe->tuner_priv = priv; break; default: /* existing tuner instance */ fe->tuner_priv = priv; break; + } + + if (priv->if_khz == 0) { + /* If the IF hasn't been set yet, use the value provided by + the caller (occurs in hybrid devices where the analog + call to xc5000_attach occurs before the digital side) */ + priv->if_khz = cfg->if_khz; } /* Check if firmware has been loaded. It is possible that another diff -r 39c257ae5063 -r b16c5d569f62 linux/drivers/media/video/tuner-core.c --- a/linux/drivers/media/video/tuner-core.c Tue Mar 10 18:32:24 2009 -0300 +++ b/linux/drivers/media/video/tuner-core.c Wed Mar 11 01:58:53 2009 -0400 @@ -453,7 +453,8 @@ static void set_type(struct i2c_client * struct dvb_tuner_ops *xc_tuner_ops; xc5000_cfg.i2c_address = t->i2c->addr; - xc5000_cfg.if_khz = 5380; + /* if_khz will be set when the digital dvb_attach() occurs */ + xc5000_cfg.if_khz = 0; if (!dvb_attach(xc5000_attach, &t->fe, t->i2c->adapter, &xc5000_cfg)) goto attach_failed; --- Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/b16c5d569f628d6eaf2f9b3d9902d48bcbe94643 _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits