diff -r b7bcb8bd0d79 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h Wed May 09 00:33:52 2007 +0300 +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h Sun Jul 15 11:24:44 2007 +0200 @@ -10,8 +10,9 @@ #define _DVB_USB_IDS_H_ /* Vendor IDs */ +#define USB_PID_GENIUS_TVGO_DVB_T02Q 0x702b #define USB_VID_ADSTECH 0x06e1 -#define USB_VID_ALCOR_MICRO 0x058f +#define USB_VID_ALCOR_MICRO 0x058f #define USB_VID_ANCHOR 0x0547 #define USB_VID_ANUBIS_ELECTRONIC 0x10fd #define USB_VID_AVERMEDIA 0x07ca diff -r b7bcb8bd0d79 linux/drivers/media/dvb/dvb-usb/m920x.c --- a/linux/drivers/media/dvb/dvb-usb/m920x.c Wed May 09 00:33:52 2007 +0300 +++ b/linux/drivers/media/dvb/dvb-usb/m920x.c Wed Aug 15 18:53:29 2007 +0200 @@ -8,7 +8,6 @@ * * see Documentation/dvb/README.dvb-usb for more information */ - #include "m920x.h" #include "mt352.h" @@ -16,6 +15,9 @@ #include "qt1010.h" #include "tda1004x.h" #include "tda827x.h" +#include "zl10353.h" +#include "mt2060.h" + /* debug */ static int dvb_usb_m920x_debug; @@ -469,6 +471,17 @@ static struct tda1004x_config m920x_tda1 .request_firmware = NULL, /* uses firmware EEPROM */ }; +static struct zl10353_config m920x_zl10353_config = { + .demod_address = 0x1e, + .no_tuner = 1, + .parallel_ts = 1, +}; + +static struct mt2060_config m920x_mt2060_config = { + .i2c_address = 0x60, +}; + + /* tuner configurations */ static struct qt1010_config m920x_qt1010_config = { .i2c_address = 0x62 @@ -511,6 +524,17 @@ static int m920x_tda10046_0b_frontend_at return 0; } +static int m920x_zl10353_frontend_attach(struct dvb_usb_adapter *adap) +{ + deb("m920x_zl10353_frontend_attach!\n"); + + if ((adap->fe = dvb_attach(zl10353_attach, &m920x_zl10353_config, &adap->dev->i2c_adap)) == NULL) + return -EIO; + return 0; +} + + + static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap) { deb("%s\n",__FUNCTION__); @@ -538,6 +562,17 @@ static int m920x_tda8275_61_tuner_attach if (dvb_attach(tda827x_attach, adap->fe, 0x61, &adap->dev->i2c_adap, NULL) == NULL) return -ENODEV; + return 0; +} + + +static int m920x_mt2060_tuner_attach(struct dvb_usb_adapter *adap) +{ + deb("%s\n",__FUNCTION__); + + if (dvb_attach(mt2060_attach, adap->fe, &adap->dev->i2c_adap, &m920x_mt2060_config, 1220) == NULL) + return -ENODEV; + return 0; } @@ -602,6 +637,7 @@ static struct dvb_usb_device_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 tvgo_t02q_properties; static int m920x_probe(struct usb_interface *intf, const struct usb_device_id *id) @@ -642,6 +678,14 @@ static int m920x_probe(struct usb_interf /* Remote controller not supported yet. */ goto found; } + + if ((ret = dvb_usb_device_init(intf, &tvgo_t02q_properties, + THIS_MODULE, &d)) == 0) { + /* Remote controller not supported yet. */ + rc_init_seq = megasky_rc_init; + goto found; + } + return ret; } else { @@ -673,6 +717,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_TVGO_DVB_T02Q) }, { } /* Terminating entry */ }; MODULE_DEVICE_TABLE (usb, m920x_table); @@ -728,6 +773,7 @@ static struct dvb_usb_device_properties static struct dvb_usb_device_properties digivox_mini_ii_properties = { .caps = DVB_USB_IS_AN_I2C_ADAPTER, + .usb_ctrl = DEVICE_SPECIFIC, .firmware = "dvb-usb-digivox-02.fw", @@ -886,6 +932,56 @@ static struct dvb_usb_device_properties } }; +static struct dvb_usb_device_properties tvgo_t02q_properties = { + .caps = DVB_USB_IS_AN_I2C_ADAPTER | DVB_USB_ADAP_HAS_PID_FILTER | + DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, + + .usb_ctrl = DEVICE_SPECIFIC, + .firmware = "dvb-usb-t02q-01.fw", + .download_firmware = m920x_firmware_download, + + .rc_interval = 100, + .rc_key_map = megasky_rc_keys, + .rc_key_map_size = ARRAY_SIZE(megasky_rc_keys), + .rc_query = m920x_rc_query, + + + .size_of_priv = sizeof(struct m920x_state), + + .identify_state = m920x_identify_state, + .num_adapters = 1, + .adapter = {{ + .pid_filter_count = 8, + .pid_filter = m920x_pid_filter, + .pid_filter_ctrl = m920x_pid_filter_ctrl, + + .frontend_attach = m920x_zl10353_frontend_attach, + .tuner_attach = m920x_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,