On Wed, 2006-10-25 at 17:20 +0200, Felipe A. Ortega GarcĂa wrote:
> Hi
>
> I have the same dvb-t adapter, and I've opened it to see the PCB.
> There are 3 main chips:
>
> Zarlink ZL10353
> Uli M9206 A1
> MT2060f
Attached is a patch that you may use as a starting point to develop a
more correct patch for this device. Please bear in mind that I do _not_
expect this patch to work properly with your device, although it is
possible that it might -- it would be a big surprise. Some things to
keep in mind:
This patch uses the experimental m920x driver, currently working on the
Megasky 580... I do not know much info about this TVGo device, but I
took some guesses, and left all unknowns set up the same way as the
megasky configuration... It is highly probable that these settings will
need to be changed. For instance:
Does the TVGo device use a firmware? If so, then you must capture that
firmware and alter the configuration to make it load the correct
firmware file.
What i2c address is used by the mt2060 tuner? I guessed 0x60.
Did I configure the mt2060 config options correctly? (probably not) ...
How about the zl10353? (again, probably not)
Are the endpoints configured properly? (check in usbview)
There isn't much that I can do to help besides this... You will probably
have to change a lot around in this patch in order to make it work --
please send in revised versions of this patch if you make any progress.
The attached patch should apply cleanly against the megasky repository:
http://linuxtv.org/hg/~mkrufky/megasky
Once we have a patch that is confirmed to work properly, I can merge it
into the experimental repository... but until then, happy hacking!
Cheers,
Michael Krufky
linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 1
linux/drivers/media/dvb/dvb-usb/m920x.c | 75 +++++++++++++++++++++++++-
2 files changed, 75 insertions(+), 1 deletion(-)
--- megasky.orig/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ megasky/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -116,6 +116,7 @@
#define USB_PID_MSI_MEGASKY580_55801 0x5581
#define USB_PID_KYE_DVB_T_COLD 0x701e
#define USB_PID_KYE_DVB_T_WARM 0x701f
+#define USB_PID_GENIUS_TVGO_DVB_T02Q 0x702b
#define USB_PID_PCTV_200E 0x020e
#define USB_PID_PCTV_400E 0x020f
#define USB_PID_LITEON_DVB_T_COLD 0xf000
--- megasky.orig/linux/drivers/media/dvb/dvb-usb/m920x.c
+++ megasky/linux/drivers/media/dvb/dvb-usb/m920x.c
@@ -13,7 +13,9 @@
#include "mt352.h"
#include "mt352_priv.h"
+#include "zl10353.h"
#include "qt1010.h"
+#include "mt2060.h"
/* debug */
static int dvb_usb_m920x_debug;
@@ -243,6 +245,22 @@
.demod_init = megasky_mt352_demod_init,
};
+static struct zl10353_config tvgo_t02q_zl10353_config = {
+ .demod_address = 0x1e,
+ .no_tuner = 1,
+ .parallel_ts = 1,
+};
+
+static struct mt2060_config tvgo_t02q_mt2060_config = {
+ .i2c_address = 0x60,
+};
+
+static int mt2060_tuner_attach(struct dvb_usb_adapter *adap)
+{
+ return dvb_attach(mt2060_attach,adap->fe, &adap->dev->i2c_adap,
+ &tvgo_t02q_mt2060_config,0) == NULL ? -ENODEV : 0;
+}
+
static int megasky_frontend_attach(struct dvb_usb_adapter *adap)
{
deb_rc("megasky_frontend_attach!\n");
@@ -252,6 +270,16 @@
return -EIO;
}
+static int tvgo_t02q_frontend_attach(struct dvb_usb_adapter *adap)
+{
+ deb_rc("tvgo_t02q_frontend_attach!\n");
+
+ if ((adap->fe = dvb_attach(zl10353_attach, &tvgo_t02q_zl10353_config,
+ &adap->dev->i2c_adap)) != NULL)
+ return 0;
+ return -EIO;
+}
+
static int m9206_set_filter(struct dvb_usb_adapter *adap, int type, int idx, int pid)
{
int ret = 0;
@@ -392,6 +420,7 @@
/* DVB USB Driver stuff */
static struct dvb_usb_device_properties megasky_properties;
+static struct dvb_usb_device_properties tvgo_t02q_properties;
static int m920x_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
@@ -399,7 +428,8 @@
struct usb_host_interface *alt;
int ret;
- if ((ret = dvb_usb_device_init(intf, &megasky_properties, THIS_MODULE, &d)) == 0) {
+ if ((ret = dvb_usb_device_init(intf, &megasky_properties, THIS_MODULE, &d)) == 0 ||
+ (ret = dvb_usb_device_init(intf, &tvgo_t02q_properties, THIS_MODULE, &d)) == 0) {
deb_rc("probed!\n");
alt = usb_altnum_to_altsetting(intf, 1);
@@ -422,6 +452,7 @@
static struct usb_device_id m920x_table [] = {
{ USB_DEVICE(USB_VID_MSI, USB_PID_MSI_MEGASKY580) },
+ { USB_DEVICE(USB_VID_KYE, USB_PID_GENIUS_TVGO_DVB_T02Q) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, m920x_table);
@@ -473,6 +504,48 @@
}
};
+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-megasky-02.fw",
+ .download_firmware = m9206_firmware_download,
+
+ .size_of_priv = sizeof(struct m9206_state),
+
+ .identify_state = megasky_identify_state,
+ .num_adapters = 1,
+ .adapter = {{
+ .pid_filter_count = 8,
+ .pid_filter = m9206_pid_filter,
+ .pid_filter_ctrl = m9206_pid_filter_ctrl,
+
+ .frontend_attach = tvgo_t02q_frontend_attach,
+ .tuner_attach = mt2060_tuner_attach,
+
+ .stream = {
+ .type = USB_BULK,
+ .count = 8,
+ .endpoint = 0x81,
+ .u = {
+ .bulk = {
+ .buffersize = 512,
+ }
+ }
+ },
+ }},
+ .i2c_algo = &m9206_i2c_algo,
+
+ .num_device_descs = 1,
+ .devices = {
+ { "Genius TVGo DVB-T02Q",
+ { &m920x_table[1], NULL },
+ { NULL },
+ },
+ }
+};
+
static struct usb_driver m920x_driver = {
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.owner = THIS_MODULE,
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb