Hi again,

 As I didn't get any replies yet, I'll try to keep this subject alive.
Here are the two patches you need to apply to m920x.c and
dvb-usb-ids.h to get the TVGo DVB-T02Q a step further (anyway, no
tuning so far: I've finally tested it using a strong enough signal,
with no success). As I said before, they are completely based on Pere
Blay's work. If someone is interested in this particular model,
PLEASE, LET ME KNOW.
(And remember, in my last post you can get a valid firmware for the device).



diff -r 6b1892ed1e74 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h     Fri Oct 26
02:26:53 2007 +0200
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h     Mon Nov 26
18:40:46 2007 +0100
@@ -75,6 +75,7 @@
 #define USB_PID_DPOSH_M9206_COLD                       0x9206
 #define USB_PID_DPOSH_M9206_WARM                       0xa090
 #define USB_PID_UNIWILL_STK7700P                       0x6003
+#define USB_PID_GENIUS_DVBT_TVGO_T02Q                  0x702b
 #define USB_PID_GRANDTEC_DVBT_USB_COLD                 0x0fa0
 #define USB_PID_GRANDTEC_DVBT_USB_WARM                 0x0fa1
 #define USB_PID_KWORLD_VSTREAM_COLD                    0x17de



diff -r 6b1892ed1e74 linux/drivers/media/dvb/dvb-usb/m920x.c
--- a/linux/drivers/media/dvb/dvb-usb/m920x.c   Fri Oct 26 02:26:53 2007 +0200
+++ b/linux/drivers/media/dvb/dvb-usb/m920x.c   Mon Nov 26 18:36:42 2007 +0100
@@ -16,6 +16,8 @@
 #include "qt1010.h"
 #include "tda1004x.h"
 #include "tda827x.h"
+#include "zl10353.h"
+#include "mt2060.h"

 /* debug */
 static int dvb_usb_m920x_debug;
@@ -469,11 +471,23 @@ static struct tda1004x_config m920x_tda1
        .request_firmware = NULL, /* uses firmware EEPROM */
 };

+static struct zl10353_config tvgot02q_zl10353_config = {
+       .demod_address = 0x0f,
+       //.adc_clock = 22528,
+       .no_tuner = 1,
+       .parallel_ts = 1,
+};
+
 /* tuner configurations */
 static struct qt1010_config m920x_qt1010_config = {
        .i2c_address = 0x62
 };

+ static struct mt2060_config tvgot02q_mt2060_config = {
+       //.clock_out = 1,
+       .i2c_address = 0x60,
+};
+
 /* Callbacks for DVB USB */
 static int m920x_mt352_frontend_attach(struct dvb_usb_adapter *adap)
 {
@@ -510,6 +524,16 @@ static int m920x_tda10046_0b_frontend_at

        return 0;
 }
+
+static int tvgot02q_frontend_attach(struct dvb_usb_adapter *adap)
+{
+       deb("tvgot02q_frontend_attach!\n");
+
+       if ((adap->fe = dvb_attach(zl10353_attach, &tvgot02q_zl10353_config,
+                                 &adap->dev->i2c_adap)) == NULL)
+              return -EIO;
+       return 0;
+}

 static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap)
 {
@@ -539,6 +563,12 @@ static int m920x_tda8275_61_tuner_attach
                return -ENODEV;

        return 0;
+}
+
+static int mt2060_tuner_attach(struct dvb_usb_adapter *adap)
+{
+       return dvb_attach(mt2060_attach,adap->fe, &adap->dev->i2c_adap,
+                        &tvgot02q_mt2060_config,0) == NULL ? -ENODEV : 0;
 }

 /* device-specific initialization */
@@ -554,6 +584,12 @@ static struct m920x_inits tvwalkertwin_r
        { 0xff28,         0x00 },
        { 0xff23,         0x00 },
        { 0xff21,         0x30 },
+       { } /* terminating entry */
+};
+
+static struct m920x_inits tvgot02q_rc_init [] = {
+       { M9206_RC_INIT2, 0xa8 },
+       { M9206_RC_INIT1, 0x51 },
        { } /* terminating entry */
 };

@@ -597,11 +633,15 @@ static struct dvb_usb_rc_key tvwalkertwi
        { 0x0, 0x1e, KEY_VOLUMEUP },
 };

+static struct dvb_usb_rc_key tvgot02q_rc_keys [] = {
+};
+
 /* DVB USB Driver stuff */
 static struct dvb_usb_device_properties megasky_properties;
 static struct dvb_usb_device_properties digivox_mini_ii_properties;
 static struct dvb_usb_device_properties tvwalkertwin_properties;
 static struct dvb_usb_device_properties dposh_properties;
+static struct dvb_usb_device_properties tvgot02q_properties;

 static int m920x_probe(struct usb_interface *intf,
                       const struct usb_device_id *id)
@@ -642,6 +682,12 @@ static int m920x_probe(struct usb_interf
                        /* Remote controller not supported yet. */
                        goto found;
                }
+
+                if ((ret = dvb_usb_device_init(intf, &tvgot02q_properties,
+                                               THIS_MODULE, &d)) == 0) {
+                        rc_init_seq = tvgot02q_rc_init;
+                        goto found;
+                }

                return ret;
        } else {
@@ -673,6 +719,7 @@ static struct usb_device_id m920x_table
                             USB_PID_LIFEVIEW_TV_WALKER_TWIN_WARM) },
                { USB_DEVICE(USB_VID_DPOSH, USB_PID_DPOSH_M9206_COLD) },
                { USB_DEVICE(USB_VID_DPOSH, USB_PID_DPOSH_M9206_WARM) },
+               { USB_DEVICE(USB_VID_KYE, USB_PID_GENIUS_DVBT_TVGO_T02Q) },
                { }             /* Terminating entry */
 };
 MODULE_DEVICE_TABLE (usb, m920x_table);
@@ -886,6 +933,57 @@ static struct dvb_usb_device_properties
         }
 };

+static struct dvb_usb_device_properties tvgot02q_properties = {
+        .caps = DVB_USB_IS_AN_I2C_ADAPTER,
+
+        .usb_ctrl = DEVICE_SPECIFIC,
+        .firmware = "dvb-usb-t02q-02.fw",
+        .download_firmware = m920x_firmware_download,
+
+       .rc_interval      = 100,
+       .rc_key_map       = tvgot02q_rc_keys,
+       .rc_key_map_size  = ARRAY_SIZE(tvgot02q_rc_keys),
+       .rc_query         = m920x_rc_query,
+
+        .size_of_priv   = sizeof(struct m920x_state),
+
+        .identify_state   = m920x_identify_state,
+        .num_adapters = 1,
+        .adapter = {{
+                .caps =  DVB_USB_ADAP_HAS_PID_FILTER |
+                        DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
+
+               .pid_filter_count = 8,
+               .pid_filter       = m920x_pid_filter,
+               .pid_filter_ctrl  = m920x_pid_filter_ctrl,
+
+               .frontend_attach  = tvgot02q_frontend_attach,
+               .tuner_attach     = mt2060_tuner_attach,
+
+               .stream = {
+                       .type = USB_BULK,
+                       .count = 8,
+                       .endpoint = 0x81,
+                       .u = {
+                               .bulk = {
+                                       .buffersize = 512,
+                               }
+                       }
+               },
+        }},
+        .i2c_algo       = &m920x_i2c_algo,
+
+        .num_device_descs = 1,
+        .devices = {
+               { "Genius TVGo DVB-T02Q",
+                    { &m920x_table[6], NULL },
+                    { NULL },
+               },
+        }
+};
+
+
+
 static struct usb_driver m920x_driver = {
 #if LINUX_VERSION_CODE <=  KERNEL_VERSION(2,6,15)
        .owner          = THIS_MODULE,




-- 

           Román

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Reply via email to