Talk:LifeView LR506

From LinuxTVWiki

Jump to: navigation, search

Ok ... I'll try to implement a driver, but i need some help

DMESG output

[ 1205.972060] usb 2-1: new high speed USB device using ehci_hcd and address 12
[ 1206.108455] usb 2-1: New USB device found, idVendor=10fd, idProduct=0506
[ 1206.108458] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1206.108552] usb 2-1: configuration #1 chosen from 1 choice
[ 1206.120907] dvb-usb: found a 'LiveView TVWalker Q (LR506)' in cold state, will try to load a firmware
[ 1206.120911] usb 2-1: firmware: requesting dvb-usb-tvwalker-lr506.fw
[ 1206.133281] dvb-usb: downloading firmware from file 'dvb-usb-tvwalker-lr506.fw'
[ 1206.195720] usbcore: registered new interface driver dvb_usb_cxusb
[ 1206.197465] usb 2-1: USB disconnect, address 12
[ 1206.204064] dvb-usb: generic DVB-USB module successfully deinitialized and disconnected.
[ 1207.952067] usb 2-1: new high speed USB device using ehci_hcd and address 13
[ 1208.084757] usb 2-1: New USB device found, idVendor=10fd, idProduct=0500
[ 1208.084761] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1208.084763] usb 2-1: Product: LifeView LR506
[ 1208.084764] usb 2-1: Manufacturer: LifeView
[ 1208.084849] usb 2-1: configuration #1 chosen from 1 choice
[ 1208.085038] dvb-usb: found a 'LiveView TVWalker Q (LR506)' in warm state.
[ 1208.085044] dvb-usb: bulk message failed: -22 (2/-1)
[ 1208.085063] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[ 1208.085174] DVB: registering new adapter (LiveView TVWalker Q (LR506))
[ 1208.092436] dvb-usb: bulk message failed: -22 (5/0)
[ 1208.092439] tda10046: chip is not answering. Giving up.
[ 1208.092481] dvb-usb: no frontend was attached by 'LiveView TVWalker Q (LR506)'
[ 1208.092750] dvb-usb: bulk message failed: -22 (2/0)
[ 1208.092752] dvb-usb: LiveView TVWalker Q (LR506) successfully initialized and connected.
[ 1496.620096] usb 2-1: USB disconnect, address 13
[ 1496.620500] dvb-usb: LiveView TVWalker Q (LR506) successfully deinitialized and disconnected.


Patch against 13c47deee3b1

diff -r 13c47deee3b1 linux/drivers/media/dvb/dvb-usb/cxusb.c
--- a/linux/drivers/media/dvb/dvb-usb/cxusb.c	Mon Sep 07 12:38:46 2009 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c	Tue Sep 08 11:32:44 2009 +0200
@@ -40,6 +40,9 @@
 #include "dib0070.h"
 #include "lgs8gxx.h"
 
+#include "tda1004x.h"
+#include "tda827x.h"
+
 /* debug */
 static int dvb_usb_cxusb_debug;
 module_param_named(debug, dvb_usb_cxusb_debug, int, 0644);
@@ -709,6 +712,19 @@
 	.AgcMasterByte   = 0x00,
 };
 
+/* for tvwalker q */
+static struct tda1004x_config cxusb_tda10046_08_config = {
+	.demod_address = 0x08,
+	.invert = 0,
+	.invert_oclk = 0,
+	.ts_mode = TDA10046_TS_SERIAL,
+	.xtal_freq = TDA10046_XTAL_16M,
+	.if_freq = TDA10046_FREQ_045,
+	.agc_config = TDA10046_AGC_TDA827X,
+	.gpio_config = TDA10046_GPTRI,
+	.request_firmware = NULL,
+};
+
 /* Callbacks for DVB USB */
 static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap)
 {
@@ -919,6 +935,29 @@
 	return 0;
 }
 
+/* for tvwalker q */
+static int cxusb_tda10046_08_frontend_attach(struct dvb_usb_adapter *adap)
+{
+        deb_info("%s\n",__func__);
+
+        if ((adap->fe = dvb_attach(tda10046_attach,
+                                   &cxusb_tda10046_08_config,
+                                   &adap->dev->i2c_adap)) == NULL)
+                return -EIO;
+
+        return 0;
+}
+
+static int cxusb_tda8275_60_tuner_attach(struct dvb_usb_adapter *adap)
+{
+        deb_info("%s\n",__func__);
+
+        if (dvb_attach(tda827x_attach, adap->fe, 0x60, &adap->dev->i2c_adap, NULL) == NULL)
+                return -ENODEV;
+
+        return 0;
+}
+
 static struct dibx000_agc_config dib7070_agc_config = {
 	.band_caps = BAND_UHF | BAND_VHF | BAND_LBAND | BAND_SBAND,
 
@@ -1235,6 +1274,7 @@
 static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_properties;
 static struct dvb_usb_device_properties cxusb_aver_a868r_properties;
 static struct dvb_usb_device_properties cxusb_d680_dmb_properties;
+static struct dvb_usb_device_properties cxusb_tvwalkerq_properties;
 
 static int cxusb_probe(struct usb_interface *intf,
 		       const struct usb_device_id *id)
@@ -1263,6 +1303,8 @@
 				     THIS_MODULE, NULL, adapter_nr) ||
 	    0 == dvb_usb_device_init(intf, &cxusb_d680_dmb_properties,
 				     THIS_MODULE, NULL, adapter_nr) ||
+	    0 == dvb_usb_device_init(intf, &cxusb_tvwalkerq_properties,
+				     THIS_MODULE, NULL, adapter_nr) ||
 	    0)
 		return 0;
 
@@ -1289,6 +1331,8 @@
 	{ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR_A868R) },
 	{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_4_REV_2) },
 	{ USB_DEVICE(USB_VID_CONEXANT, USB_PID_CONEXANT_D680_DMB) },
+	{ USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC, USB_PID_LIFEVIEW_TV_WALKER_Q_COLD) },
+	{ USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC, USB_PID_LIFEVIEW_TV_WALKER_Q_WARM) },
 	{}		/* Terminating entry */
 };
 MODULE_DEVICE_TABLE (usb, cxusb_table);
@@ -1832,6 +1876,51 @@
 	}
 };
 
+/* for tvwalker q */
+static struct dvb_usb_device_properties cxusb_tvwalkerq_properties = {
+	.caps = DVB_USB_IS_AN_I2C_ADAPTER,
+
+	.usb_ctrl = CYPRESS_FX2,
+	.firmware          = "dvb-usb-tvwalker-lr506.fw",
+
+	.size_of_priv     = sizeof(struct cxusb_state),
+
+	.num_adapters = 1,
+	.adapter = {
+		{
+			.frontend_attach  = cxusb_tda10046_08_frontend_attach,
+			.tuner_attach     = cxusb_tda8275_60_tuner_attach,
+			/* parameter for the MPEG2-data transfer */
+			.stream = {
+				.type = USB_BULK,
+				//.count = 5,
+				//.endpoint = 0x02,
+				.count = 8,
+				.endpoint = 0x81,
+				.u = {
+					.bulk = {
+						.buffersize = 8192,
+					}
+				}
+			},
+
+		},
+	},
+	.power_ctrl       = cxusb_power_ctrl,
+
+	.i2c_algo         = &cxusb_i2c_algo,
+
+	.generic_bulk_ctrl_endpoint = 0x01,
+
+	.num_device_descs = 1,
+	.devices = {
+		{   "LiveView TVWalker Q (LR506)",
+			{ &cxusb_table[19], NULL },
+			{ &cxusb_table[20], NULL },
+		},
+	}
+};
+
 static struct usb_driver cxusb_driver = {
 	.name		= "dvb_usb_cxusb",
 	.probe		= cxusb_probe,
diff -r 13c47deee3b1 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	Mon Sep 07 12:38:46 2009 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	Tue Sep 08 11:32:44 2009 +0200
@@ -245,6 +245,8 @@
 #define USB_PID_OPERA1_WARM				0x3829
 #define USB_PID_LIFEVIEW_TV_WALKER_TWIN_COLD		0x0514
 #define USB_PID_LIFEVIEW_TV_WALKER_TWIN_WARM		0x0513
+#define USB_PID_LIFEVIEW_TV_WALKER_Q_COLD		0x0506
+#define USB_PID_LIFEVIEW_TV_WALKER_Q_WARM		0x0500
 #define USB_PID_GIGABYTE_U7000				0x7001
 #define USB_PID_GIGABYTE_U8000				0x7002
 #define USB_PID_ASUS_U3000				0x171f

download patch

Personal tools