Re: [PATCH] usb id addition for Terratec Cinergy T Stick Dual rev. 2

2012-09-30 Thread Damien Bally



Le 29/09/2012 19:33, Mauro Carvalho Chehab a écrit :
 It seems that the it931x variant has bcdDevice equal to 2.00,

from Damien's email:

idVendor   0x0ccd TerraTec Electronic GmbH
idProduct  0x0099
bcdDevice2.00
iManufacturer   1 ITE Technologies, Inc.
iProduct2 DVB-T TV Stick
iSerial 0

If the af9015 variant uses another bcdDevice, the fix should be simple.


Alas, according to 
http://www.linuxtv.org/wiki/index.php/TerraTec_Cinergy_T_USB_Dual_RC the 
af9015 variant appears to have the same bcdDevice. I join both lsusb 
outputs for comparison.


Regards

Damien
Bus 003 Device 003: ID 0ccd:0099 TerraTec Electronic GmbH 
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass0 (Defined at Interface level)
  bDeviceSubClass 0 
  bDeviceProtocol 0 
  bMaxPacketSize064
  idVendor   0x0ccd TerraTec Electronic GmbH
  idProduct  0x0099 
  bcdDevice2.00
  iManufacturer   1 Afatech
  iProduct2 DVB-T 2
  iSerial 3 xx
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   71
bNumInterfaces  2
bConfigurationValue 1
iConfiguration  0 
bmAttributes 0x80
  (Bus Powered)
MaxPower  500mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   4
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass  0 
  bInterfaceProtocol  0 
  iInterface  0 
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0200  1x 512 bytes
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02  EP 2 OUT
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0200  1x 512 bytes
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84  EP 4 IN
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0200  1x 512 bytes
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85  EP 5 IN
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0200  1x 512 bytes
bInterval   0
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber1
  bAlternateSetting   0
  bNumEndpoints   1
  bInterfaceClass 3 Human Interface Device
  bInterfaceSubClass  0 No Subclass
  bInterfaceProtocol  1 Keyboard
  iInterface  0 
HID Device Descriptor:
  bLength 9
  bDescriptorType33
  bcdHID   1.01
  bCountryCode0 Not supported
  bNumDescriptors 1
  bDescriptorType34 Report
  wDescriptorLength  65
 Report Descriptors: 
   ** UNAVAILABLE **
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83  EP 3 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0040  1x 64 bytes
bInterval  10
Device Qualifier (for other device speed):
  bLength10
  bDescriptorType 6
  bcdUSB   2.00
  bDeviceClass0 (Defined at Interface level)
  bDeviceSubClass 0 
  bDeviceProtocol 0 
  bMaxPacketSize064
  bNumConfigurations  1
Device Status: 0x
  (Bus Powered)
Bus 002 Device 003: ID 0ccd:0099 TerraTec Electronic GmbH
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass0 (Defined at 

Re: [PATCH] usb id addition for Terratec Cinergy T Stick Dual rev. 2

2012-09-28 Thread Damien Bally

  I will NACK that initially because that USB ID already used by AF9015

driver. You have to explain / study what happens when AF9015 driver
claims that device same time.



Hi Antti

With the Cinergy stick alone, dvb_usb_af9015 is predictably loaded, but 
doesn't prevent dvb_usb_it913x from working nicely.


If an afatech 9015 stick is connected, such as an AverTV Volar Black HD 
(A850), it will be recognized and doesn't affect the other device.


*But* it runs into trouble if the two devices were connected at bootup, 
or if the Cinergy stick is inserted after the other one :

---
[1.264018] usb 2-1: new high speed USB device using ehci_hcd and 
address 2

[1.382487] usb 2-1: New USB device found, idVendor=0ccd, idProduct=0099
[1.382490] usb 2-1: New USB device strings: Mfr=1, Product=2, 
SerialNumber=0

[1.382492] usb 2-1: Product: DVB-T TV Stick
[1.382494] usb 2-1: Manufacturer: ITE Technologies, Inc.
[1.385073] input: ITE Technologies, Inc. DVB-T TV Stick as 
/devices/pci:00/:00:1d.7/usb2/2-1/2-1:1.1/input/input1
[1.385147] generic-usb 0003:0CCD:0099.0001: input,hidraw0: USB HID 
v1.01 Keyboard [ITE Technologies, Inc. DVB-T TV Stick] on 
usb-:00:1d.7-1 input1

[5.045527] usbcore: registered new interface driver dvb_usb_it913x
[5.147276] it913x: Chip Version=01 Chip Type=9135
[5.147524] it913x: Firmware Version 33684956
[5.148649] it913x: Remote HID mode NOT SUPPORTED
[5.149024] it913x: Dual mode=3 Tuner Type=0
[5.149028] usb 2-1: dvb_usbv2: found a 'ITE 9135(9006) Generic' in 
warm state
[5.149077] usb 2-1: dvb_usbv2: will pass the complete MPEG2 
transport stream to the software demuxer

[5.149307] DVB: registering new adapter (ITE 9135(9006) Generic)
[5.174907] usb 1-4: dvb_usbv2: downloading firmware from file 
'dvb-usb-af9015.fw'
[5.241934] usb 1-4: dvb_usbv2: found a 'AverMedia AVerTV Volar Black 
HD (A850)' in warm state
[5.614827] usb 1-4: dvb_usbv2: will pass the complete MPEG2 
transport stream to the software demuxer
[5.614866] DVB: registering new adapter (AverMedia AVerTV Volar 
Black HD (A850))

[5.710026] af9013: firmware version 4.95.0.0
[5.712151] DVB: registering adapter 1 frontend 0 (Afatech AF9013)...
[5.813139] MXL5005S: Attached at address 0xc6
[5.818896] usb 1-4: dvb_usbv2: 'AverMedia AVerTV Volar Black HD 
(A850)' successfully initialized and connected

[7.266161] usb 2-1: dvb_usbv2: 2nd usb_bulk_msg() failed=-110
[7.266247] it913x-fe: ADF table value   :00
[9.267200] usb 2-1: dvb_usbv2: 2nd usb_bulk_msg() failed=-110
[   11.267153] usb 2-1: dvb_usbv2: 2nd usb_bulk_msg() failed=-110
[   13.267250] usb 2-1: dvb_usbv2: 2nd usb_bulk_msg() failed=-110
[   15.267089] usb 2-1: dvb_usbv2: 2nd usb_bulk_msg() failed=-110
[   17.267162] usb 2-1: dvb_usbv2: 2nd usb_bulk_msg() failed=-110
[   19.267139] usb 2-1: dvb_usbv2: 2nd usb_bulk_msg() failed=-110
[   19.267218] it913x-fe: Crystal Frequency :1200 Adc Frequency 
:2025 ADC X2: 01
[   19.267296] usb 2-1: dvb_usbv2: 'ITE 9135(9006) Generic' error while 
loading driver (-19)
[   19.267472] usb 2-1: dvb_usbv2: 'ITE 9135(9006) Generic' successfully 
deinitialized and disconnected

---

I'm unfortunately not able to rewrite the driver, but I'm willing to 
provide any information about the device to help its correct 
identification. Here is what lsusb yields :

---
Bus 002 Device 003: ID 0ccd:0099 TerraTec Electronic GmbH
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize064
  idVendor   0x0ccd TerraTec Electronic GmbH
  idProduct  0x0099
  bcdDevice2.00
  iManufacturer   1 ITE Technologies, Inc.
  iProduct2 DVB-T TV Stick
  iSerial 0
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   71
bNumInterfaces  2
bConfigurationValue 1
iConfiguration  0
bmAttributes 0x80
  (Bus Powered)
MaxPower  500mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   4
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass  0
  bInterfaceProtocol  0
  iInterface  0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes2
  Transfer 

Re: [PATCH] usb id addition for Terratec Cinergy T Stick Dual rev. 2

2012-09-28 Thread Damien Bally



Le 28/09/2012 19:55, Antti Palosaari a écrit :


I am not sure what you do here but let it be clear.
There is same ID used by af9015 and it913x. Both drivers are loaded when
that ID appears. What I understand *both* drivers, af9015 and it913x
should detect if device is correct or not. If device is af9015 then
it913x should reject it with -ENODEV most likely without a I/O. If
device is it913x then af9015 should reject the device similarly. And you
must find out how to do that. It is not acceptable both drivers starts
doing I/O for same device same time.



I'd gladly implement this, but I'm not a developper, for the moment ;-)



I'm unfortunately not able to rewrite the driver, but I'm willing to
provide any information about the device to help its correct
identification.

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] usb id addition for Terratec Cinergy T Stick Dual rev. 2

2012-09-27 Thread Damien Bally

This patch adds support for new Terratec Cinergy T Stick Dual rev. 2.

Signed-off-by: Damien Bally bir...@free.fr

--- drivers/media/usb/dvb-usb-v2/it913x.c.orig	2012-09-17 19:04:59.819197365 +0200
+++ drivers/media/usb/dvb-usb-v2/it913x.c	2012-09-17 19:07:27.314015768 +0200
@@ -773,6 +773,9 @@ static const struct usb_device_id it913x
 	{ DVB_USB_DEVICE(USB_VID_ITETECH, USB_PID_ITETECH_IT9135_9006,
 		it913x_properties, ITE 9135(9006) Generic,
 			RC_MAP_IT913X_V1) },
+	{ DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC,
+		it913x_properties, ITE 9135(9006) Generic,
+			RC_MAP_IT913X_V1) },
 	{}		/* Terminating entry */
 };
 






Cinergy T Stick Dual RC (rev. 2)

2012-09-17 Thread Damien Bally

Hello

I bought this card because it is supported since kernel 2.6.37 according 
to this page :


http://linuxtv.org/wiki/index.php/TerraTec_Cinergy_T_USB_Dual_RC

As it it was not recognized by OpenSuse 11.4 (the kernel just sees a 
keyboard) I googled a while and found that rev.2 was not (and noticed 
the little sticker on my device confirming it).


According to this page : 
http://ein-eike.de/2012/08/07/terratec-cinergy-t-stick-dual-rc-revision-2 the 
device contains it9133 and it9137 chips which are supported since 3.4 
kernels. So I patched and compiled successfully the last linux-media 
sources and intalled the adhoc firmwares.


It seems to work quite well with VDR : I managed to record 
simultaneously 2 streams on different transponders while watching live 
TV, but I haven't yet tested the remote control part.


Damien



--- it913x.c.orig	2012-09-17 19:04:59.819197365 +0200
+++ it913x.c	2012-09-14 00:18:42.371616299 +0200
@@ -773,6 +773,9 @@
 	{ DVB_USB_DEVICE(USB_VID_ITETECH, USB_PID_ITETECH_IT9135_9006,
 		it913x_properties, ITE 9135(9006) Generic,
 			RC_MAP_IT913X_V1) },
+	{ DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC,
+		it913x_properties, ITE 9135(9006) Generic,
+			RC_MAP_IT913X_V1) },
 	{}		/* Terminating entry */
 };
 
[ 2686.477020] usb 2-1: new high speed USB device using ehci_hcd and address 3
[ 2686.595464] usb 2-1: New USB device found, idVendor=0ccd, idProduct=0099
[ 2686.595467] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2686.595470] usb 2-1: Product: DVB-T TV Stick
[ 2686.595472] usb 2-1: Manufacturer: ITE Technologies, Inc.
[ 2686.598080] it913x: Chip Version=01 Chip Type=9135
[ 2686.598187] input: ITE Technologies, Inc. DVB-T TV Stick as 
/devices/pci:00/:00:1d.7/usb2/2-1/2-1:1.1/input/input7
[ 2686.598275] generic-usb 0003:0CCD:0099.0002: input,hidraw0: USB HID v1.01 
Keyboard [ITE Technologies, Inc. DVB-T TV Stick] on usb-:00:1d.7-1/input1
[ 2686.599660] it913x: Remote HID mode NOT SUPPORTED
[ 2686.600145] it913x: Dual mode=3 Tuner Type=0
[ 2686.704201] it913x: Chip Version=01 Chip Type=9135
[ 2686.706070] usb 2-1: dvb_usbv2: found a 'ITE 9135(9006) Generic' in cold 
state
[ 2686.707314] usb 2-1: dvb_usbv2: downloading firmware from file 
'dvb-usb-it9135-01.fw'
[ 2686.707694] it913x: FRM Starting Firmware Download
[ 2687.408601] it913x: FRM Firmware Download Completed - Resetting Device
[ 2687.440973] it913x: Chip Version=01 Chip Type=9135
[ 2687.441348] it913x: Firmware Version 204869120
[ 2687.509095] usb 2-1: dvb_usbv2: found a 'ITE 9135(9006) Generic' in warm 
state
[ 2687.509147] usb 2-1: dvb_usbv2: will pass the complete MPEG2 transport 
stream to the software demuxer
[ 2687.509362] DVB: registering new adapter (ITE 9135(9006) Generic)
[ 2687.513588] it913x-fe: ADF table value   :00
[ 2687.517338] it913x-fe: Crystal Frequency :1200 Adc Frequency :2025 
ADC X2: 01
[ 2687.557833] it913x-fe: Tuner LNA type :38
[ 2687.610078] DVB: registering adapter 0 frontend 0 (ITE 9135(9006) 
Generic_1)...
[ 2687.610133] usb 2-1: dvb_usbv2: will pass the complete MPEG2 transport 
stream to the software demuxer
[ 2687.610331] DVB: registering new adapter (ITE 9135(9006) Generic)
[ 2687.624700] it913x-fe: ADF table value   :00
[ 2687.649447] it913x-fe: Crystal Frequency :1200 Adc Frequency :2025 
ADC X2: 01
[ 2687.905914] it913x-fe: Tuner LNA type :38
[ 2688.212137] DVB: registering adapter 1 frontend 0 (ITE 9135(9006) 
Generic_2)...
[ 2688.212208] usb 2-1: dvb_usbv2: 'ITE 9135(9006) Generic' successfully 
initialized and connected