summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb/gl861.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-01-21 13:56:10 -0500
committerMichael Krufky <mkrufky@linuxtv.org>2007-01-21 13:56:10 -0500
commit6248490f36dcd34b30bfac7604948350acd6d8dc (patch)
tree882b2f04b63490a2a3b6a70864f88e795ab429a9 /linux/drivers/media/dvb/dvb-usb/gl861.c
parent0eddb48804a90a6c9484a36576d3f792922a5e5d (diff)
downloadmediapointer-dvb-s2-6248490f36dcd34b30bfac7604948350acd6d8dc.tar.gz
mediapointer-dvb-s2-6248490f36dcd34b30bfac7604948350acd6d8dc.tar.bz2
dvb: add new qt1010 tuner module
From: Antti Palosaari <crope@iki.fi> gl861: (MSI Megasky) - hack for enable ZL10353 / QT1010 I2C gate - use new QT1010 module instead of old code au6610: (Sigmatek DVB-110) - hack for enable ZL10353 / QT1010 I2C gate - use new QT1010 module instead of old code Tested successfully with au6610 and gl861 devices against fi-Yllas frequencies. Now it locks perfectly with both devices. There is a "hack" to enable probable i2c gate in zl10535 demodulator. QT1010 doesn't respond to any i2c messages before we write 0x1a to demodulator register 0x62. In my understanding this should be fixed to demodulator code. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/gl861.c')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/gl861.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/gl861.c b/linux/drivers/media/dvb/dvb-usb/gl861.c
index 5a4d7edb3..3f8e3ea9b 100644
--- a/linux/drivers/media/dvb/dvb-usb/gl861.c
+++ b/linux/drivers/media/dvb/dvb-usb/gl861.c
@@ -116,6 +116,29 @@ static int gl861_frontend_attach(struct dvb_usb_adapter *adap)
return -EIO;
}
+static struct qt1010_config gl861_qt1010_config = {
+ .i2c_address = 0xc4
+};
+
+static int gl861_tuner_attach(struct dvb_usb_adapter *adap)
+{
+ /* TODO FIXME; probably I2C gate.
+ QT1010 tuner does not respond before we write 0x1a to ZL10353 demodulator
+ register 0x62. This ought to be done somewhere in demodulator initialization.
+ This solution is temporary hack. */
+ u8 buf[2] = { 0x62, 0x1a };
+ struct i2c_msg msg = {
+ .addr = gl861_zl10353_config.demod_address, .flags = 0, .buf = buf, .len = 2
+ };
+ if (i2c_transfer(&adap->dev->i2c_adap, &msg, 1) != 1) {
+ printk(KERN_WARNING "gl861 tuner attach failed\n");
+ return -EREMOTEIO;
+ }
+ return dvb_attach(qt1010_attach,
+ adap->fe, &adap->dev->i2c_adap,
+ &gl861_qt1010_config) == NULL ? -ENODEV : 0;
+}
+
/* DVB USB Driver stuff */
static struct dvb_usb_device_properties gl861_properties;
@@ -161,7 +184,7 @@ static struct dvb_usb_device_properties gl861_properties = {
.adapter = {{
.frontend_attach = gl861_frontend_attach,
- .tuner_attach = qt1010_tuner_attach,
+ .tuner_attach = gl861_tuner_attach,
.stream = {
.type = USB_BULK,