diff mbox

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

Message ID 5064A3AD.70009@free.fr (mailing list archive)
State New, archived
Headers show

Commit Message

Damien Bally Sept. 27, 2012, 7:06 p.m. UTC
This patch adds support for new Terratec Cinergy T Stick Dual rev. 2.

Signed-off-by: Damien Bally <biribi@free.fr>

Comments

Antti Palosaari Sept. 27, 2012, 7:41 p.m. UTC | #1
On 09/27/2012 10:06 PM, Damien Bally wrote:
> This patch adds support for new Terratec Cinergy T Stick Dual rev. 2.
>
> Signed-off-by: Damien Bally <biribi@free.fr>

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.

Antti
Damien Bally Sept. 28, 2012, 4:34 p.m. UTC | #2
> 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/pci0000:00/0000: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-0000: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 :12000000 Adc Frequency 
:20250000 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:
   bLength                18
   bDescriptorType         1
   bcdUSB               2.00
   bDeviceClass            0 (Defined at Interface level)
   bDeviceSubClass         0
   bDeviceProtocol         0
   bMaxPacketSize0        64
   idVendor           0x0ccd TerraTec Electronic GmbH
   idProduct          0x0099
   bcdDevice            2.00
   iManufacturer           1 ITE Technologies, Inc.
   iProduct                2 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
       bInterfaceNumber        0
       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
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval               0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x02  EP 2 OUT
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval               0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x84  EP 4 IN
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval               0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x85  EP 5 IN
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval               0
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        1
       bAlternateSetting       0
       bNumEndpoints           1
       bInterfaceClass         3 Human Interface Device
       bInterfaceSubClass      0 No Subclass
       bInterfaceProtocol      1 Keyboard
       iInterface              0
         HID Device Descriptor:
           bLength                 9
           bDescriptorType        33
           bcdHID               1.01
           bCountryCode            0 Not supported
           bNumDescriptors         1
           bDescriptorType        34 Report
           wDescriptorLength      65
          Report Descriptors:
            ** UNAVAILABLE **
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x83  EP 3 IN
         bmAttributes            3
           Transfer Type            Interrupt
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0040  1x 64 bytes
         bInterval              10
Device Qualifier (for other device speed):
   bLength                10
   bDescriptorType         6
   bcdUSB               2.00
   bDeviceClass            0 (Defined at Interface level)
   bDeviceSubClass         0
   bDeviceProtocol         0
   bMaxPacketSize0        64
   bNumConfigurations      1
Device Status:     0x0000
   (Bus Powered)

Hope that helps...

Damien
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Antti Palosaari Sept. 28, 2012, 5:55 p.m. UTC | #3
On 09/28/2012 07:34 PM, Damien Bally wrote:
>   > 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 :

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.

regards
Antti

> -----------------------------------------------------------------------
> [    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/pci0000:00/0000: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-0000: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 :12000000 Adc Frequency
> :20250000 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:
>    bLength                18
>    bDescriptorType         1
>    bcdUSB               2.00
>    bDeviceClass            0 (Defined at Interface level)
>    bDeviceSubClass         0
>    bDeviceProtocol         0
>    bMaxPacketSize0        64
>    idVendor           0x0ccd TerraTec Electronic GmbH
>    idProduct          0x0099
>    bcdDevice            2.00
>    iManufacturer           1 ITE Technologies, Inc.
>    iProduct                2 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
>        bInterfaceNumber        0
>        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
>          bmAttributes            2
>            Transfer Type            Bulk
>            Synch Type               None
>            Usage Type               Data
>          wMaxPacketSize     0x0200  1x 512 bytes
>          bInterval               0
>        Endpoint Descriptor:
>          bLength                 7
>          bDescriptorType         5
>          bEndpointAddress     0x02  EP 2 OUT
>          bmAttributes            2
>            Transfer Type            Bulk
>            Synch Type               None
>            Usage Type               Data
>          wMaxPacketSize     0x0200  1x 512 bytes
>          bInterval               0
>        Endpoint Descriptor:
>          bLength                 7
>          bDescriptorType         5
>          bEndpointAddress     0x84  EP 4 IN
>          bmAttributes            2
>            Transfer Type            Bulk
>            Synch Type               None
>            Usage Type               Data
>          wMaxPacketSize     0x0200  1x 512 bytes
>          bInterval               0
>        Endpoint Descriptor:
>          bLength                 7
>          bDescriptorType         5
>          bEndpointAddress     0x85  EP 5 IN
>          bmAttributes            2
>            Transfer Type            Bulk
>            Synch Type               None
>            Usage Type               Data
>          wMaxPacketSize     0x0200  1x 512 bytes
>          bInterval               0
>      Interface Descriptor:
>        bLength                 9
>        bDescriptorType         4
>        bInterfaceNumber        1
>        bAlternateSetting       0
>        bNumEndpoints           1
>        bInterfaceClass         3 Human Interface Device
>        bInterfaceSubClass      0 No Subclass
>        bInterfaceProtocol      1 Keyboard
>        iInterface              0
>          HID Device Descriptor:
>            bLength                 9
>            bDescriptorType        33
>            bcdHID               1.01
>            bCountryCode            0 Not supported
>            bNumDescriptors         1
>            bDescriptorType        34 Report
>            wDescriptorLength      65
>           Report Descriptors:
>             ** UNAVAILABLE **
>        Endpoint Descriptor:
>          bLength                 7
>          bDescriptorType         5
>          bEndpointAddress     0x83  EP 3 IN
>          bmAttributes            3
>            Transfer Type            Interrupt
>            Synch Type               None
>            Usage Type               Data
>          wMaxPacketSize     0x0040  1x 64 bytes
>          bInterval              10
> Device Qualifier (for other device speed):
>    bLength                10
>    bDescriptorType         6
>    bcdUSB               2.00
>    bDeviceClass            0 (Defined at Interface level)
>    bDeviceSubClass         0
>    bDeviceProtocol         0
>    bMaxPacketSize0        64
>    bNumConfigurations      1
> Device Status:     0x0000
>    (Bus Powered)
>
> Hope that helps...
>
> Damien
Damien Bally Sept. 28, 2012, 7 p.m. UTC | #4
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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Malcolm Priestley Sept. 28, 2012, 7:30 p.m. UTC | #5
On Fri, 2012-09-28 at 20:55 +0300, Antti Palosaari wrote:
> On 09/28/2012 07:34 PM, Damien Bally wrote:
> >   > 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 :
> 
> 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.
> 
Hi All

Which module is loaded first depends on the order in 

/lib/modules/$(uname -r)/modules.usbmap

Its is likely that af9015 will be first, so the it913x will need to be
loaded first by added it to /etc/modules.

I recall a similar problem exists with the DiB3000M-B driver with its
faulty IDs.

A solution may be for Cinergy to have its own module with extern access
to both dvb_usb_device_properties structures and dvb_usbv2_probe them
twice.


Regards


Malcolm








> regards
> Antti
> 
> > -----------------------------------------------------------------------
> > [    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/pci0000:00/0000: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-0000: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 :12000000 Adc Frequency
> > :20250000 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:
> >    bLength                18
> >    bDescriptorType         1
> >    bcdUSB               2.00
> >    bDeviceClass            0 (Defined at Interface level)
> >    bDeviceSubClass         0
> >    bDeviceProtocol         0
> >    bMaxPacketSize0        64
> >    idVendor           0x0ccd TerraTec Electronic GmbH
> >    idProduct          0x0099
> >    bcdDevice            2.00
> >    iManufacturer           1 ITE Technologies, Inc.
> >    iProduct                2 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
> >        bInterfaceNumber        0
> >        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
> >          bmAttributes            2
> >            Transfer Type            Bulk
> >            Synch Type               None
> >            Usage Type               Data
> >          wMaxPacketSize     0x0200  1x 512 bytes
> >          bInterval               0
> >        Endpoint Descriptor:
> >          bLength                 7
> >          bDescriptorType         5
> >          bEndpointAddress     0x02  EP 2 OUT
> >          bmAttributes            2
> >            Transfer Type            Bulk
> >            Synch Type               None
> >            Usage Type               Data
> >          wMaxPacketSize     0x0200  1x 512 bytes
> >          bInterval               0
> >        Endpoint Descriptor:
> >          bLength                 7
> >          bDescriptorType         5
> >          bEndpointAddress     0x84  EP 4 IN
> >          bmAttributes            2
> >            Transfer Type            Bulk
> >            Synch Type               None
> >            Usage Type               Data
> >          wMaxPacketSize     0x0200  1x 512 bytes
> >          bInterval               0
> >        Endpoint Descriptor:
> >          bLength                 7
> >          bDescriptorType         5
> >          bEndpointAddress     0x85  EP 5 IN
> >          bmAttributes            2
> >            Transfer Type            Bulk
> >            Synch Type               None
> >            Usage Type               Data
> >          wMaxPacketSize     0x0200  1x 512 bytes
> >          bInterval               0
> >      Interface Descriptor:
> >        bLength                 9
> >        bDescriptorType         4
> >        bInterfaceNumber        1
> >        bAlternateSetting       0
> >        bNumEndpoints           1
> >        bInterfaceClass         3 Human Interface Device
> >        bInterfaceSubClass      0 No Subclass
> >        bInterfaceProtocol      1 Keyboard
> >        iInterface              0
> >          HID Device Descriptor:
> >            bLength                 9
> >            bDescriptorType        33
> >            bcdHID               1.01
> >            bCountryCode            0 Not supported
> >            bNumDescriptors         1
> >            bDescriptorType        34 Report
> >            wDescriptorLength      65
> >           Report Descriptors:
> >             ** UNAVAILABLE **
> >        Endpoint Descriptor:
> >          bLength                 7
> >          bDescriptorType         5
> >          bEndpointAddress     0x83  EP 3 IN
> >          bmAttributes            3
> >            Transfer Type            Interrupt
> >            Synch Type               None
> >            Usage Type               Data
> >          wMaxPacketSize     0x0040  1x 64 bytes
> >          bInterval              10
> > Device Qualifier (for other device speed):
> >    bLength                10
> >    bDescriptorType         6
> >    bcdUSB               2.00
> >    bDeviceClass            0 (Defined at Interface level)
> >    bDeviceSubClass         0
> >    bDeviceProtocol         0
> >    bMaxPacketSize0        64
> >    bNumConfigurations      1
> > Device Status:     0x0000
> >    (Bus Powered)
> >
> > Hope that helps...
> >
> > Damien
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mauro Carvalho Chehab Sept. 29, 2012, 5:33 p.m. UTC | #6
Em Fri, 28 Sep 2012 20:30:17 +0100
Malcolm Priestley <tvboxspy@gmail.com> escreveu:

> On Fri, 2012-09-28 at 20:55 +0300, Antti Palosaari wrote:
> > On 09/28/2012 07:34 PM, Damien Bally wrote:
> > >   > 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 :
> > 
> > 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.
> > 
> Hi All
> 
> Which module is loaded first depends on the order in 
> 
> /lib/modules/$(uname -r)/modules.usbmap
> 
> Its is likely that af9015 will be first, so the it913x will need to be
> loaded first by added it to /etc/modules.

Well, builtin modules are loaded before, so if it931x is built with 'Y'
and af9015 with 'M', then it913x will be the first one.

As a general rule, don't trust on one being loaded before the other: the
best thing to do is to detect different USB ID and bcdDevice at the USB
Table. It seems that the it931x variant has bcdDevice equal to 2.00,
from Damien's email:

   idVendor           0x0ccd TerraTec Electronic GmbH
   idProduct          0x0099
   bcdDevice            2.00
   iManufacturer           1 ITE Technologies, Inc.
   iProduct                2 DVB-T TV Stick
   iSerial                 0

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

Btw, cx231xx and dib0700 does that for some Pixelviel devices. This is
how cx231xx declares his device (bcd 40.00 to 40.01):

        {USB_DEVICE_VER(USB_VID_PIXELVIEW, USB_PID_PIXELVIEW_SBTVD, 0x4000, 0x4001),
         .driver_info = CX231XX_BOARD_PV_PLAYTV_USB_HYBRID},

And dib0700 declares the same USB ID with bcdDevice range from 0.00 to 3f.00:

        { USB_DEVICE_VER(USB_VID_PIXELVIEW, USB_PID_PIXELVIEW_SBTVD, 0x000, 0x3f00) },

If the bcdDevice is identical, then the driver should find a way to check it during
.probe time, and return -ENODEV if the device doesn't match. The other USB driver
will handle it properly.

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Damien Bally Sept. 30, 2012, 5:36 p.m. UTC | #7
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
>     bcdDevice            2.00
>     iManufacturer           1 ITE Technologies, Inc.
>     iProduct                2 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:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0ccd TerraTec Electronic GmbH
  idProduct          0x0099 
  bcdDevice            2.00
  iManufacturer           1 Afatech
  iProduct                2 DVB-T 2
  iSerial                 3 xxxxxxxxxxxxxx
  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
      bInterfaceNumber        0
      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
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.01
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      65
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)
Bus 002 Device 003: ID 0ccd:0099 TerraTec Electronic GmbH
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0ccd TerraTec Electronic GmbH
  idProduct          0x0099
  bcdDevice            2.00
  iManufacturer           1 ITE Technologies, Inc.
  iProduct                2 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
      bInterfaceNumber        0
      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
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.01
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      65
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)
Mauro Carvalho Chehab Oct. 1, 2012, 11:15 a.m. UTC | #8
Em Sun, 30 Sep 2012 19:36:50 +0200
Damien Bally <biribi@free.fr> escreveu:

> 
> 
> 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
> >     bcdDevice            2.00
> >     iManufacturer           1 ITE Technologies, Inc.
> >     iProduct                2 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.

Well, then the alternative is to let both drivers to handle this USB ID,
and add a code there on each of them that will check if the device is the
right one, perhaps by looking at iProduct string. If the driver doesn't
recognize it, it should return -ENODEV at .probe() time. The USB core will
call the second driver.

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Antti Palosaari Oct. 1, 2012, 11:21 a.m. UTC | #9
On 10/01/2012 02:15 PM, Mauro Carvalho Chehab wrote:
> Em Sun, 30 Sep 2012 19:36:50 +0200
> Damien Bally <biribi@free.fr> escreveu:
>
>>
>>
>> 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
>>>      bcdDevice            2.00
>>>      iManufacturer           1 ITE Technologies, Inc.
>>>      iProduct                2 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.
>
> Well, then the alternative is to let both drivers to handle this USB ID,
> and add a code there on each of them that will check if the device is the
> right one, perhaps by looking at iProduct string. If the driver doesn't
> recognize it, it should return -ENODEV at .probe() time. The USB core will
> call the second driver.

It is the easiest solution, but there should be very careful. Those 
strings could change from device to device. I used earlier af9015 eeprom 
hash (those string as coming from the eeprom) to map TerraTec dual 
remote controller and git bug report quite soon as it didn't worked. 
After I looked the reason I found out they was changed some not 
meaningful value.

t. Antti
Mauro Carvalho Chehab Oct. 6, 2012, 3:40 p.m. UTC | #10
Em Mon, 01 Oct 2012 14:21:34 +0300
Antti Palosaari <crope@iki.fi> escreveu:

> On 10/01/2012 02:15 PM, Mauro Carvalho Chehab wrote:
> > Em Sun, 30 Sep 2012 19:36:50 +0200
> > Damien Bally <biribi@free.fr> escreveu:
> >
> >>
> >>
> >> 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
> >>>      bcdDevice            2.00
> >>>      iManufacturer           1 ITE Technologies, Inc.
> >>>      iProduct                2 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.
> >
> > Well, then the alternative is to let both drivers to handle this USB ID,
> > and add a code there on each of them that will check if the device is the
> > right one, perhaps by looking at iProduct string. If the driver doesn't
> > recognize it, it should return -ENODEV at .probe() time. The USB core will
> > call the second driver.
> 
> It is the easiest solution, but there should be very careful. Those 
> strings could change from device to device. I used earlier af9015 eeprom 
> hash (those string as coming from the eeprom) to map TerraTec dual 
> remote controller and git bug report quite soon as it didn't worked. 
> After I looked the reason I found out they was changed some not 
> meaningful value.

Yeah, those strings can change, especially when vendors don't care enough
to use a different USB ID/bcdDevice for different models. Yet, seems to
be the cleaner approach, among the alternatives.

Regards,
Mauro


> 
> t. Antti
Antti Palosaari Jan. 7, 2013, 7:37 p.m. UTC | #11
On 10/06/2012 06:40 PM, Mauro Carvalho Chehab wrote:
> Em Mon, 01 Oct 2012 14:21:34 +0300
> Antti Palosaari <crope@iki.fi> escreveu:
>
>> On 10/01/2012 02:15 PM, Mauro Carvalho Chehab wrote:
>>> Em Sun, 30 Sep 2012 19:36:50 +0200
>>> Damien Bally <biribi@free.fr> escreveu:
>>>
>>>>
>>>>
>>>> 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
>>>>>       bcdDevice            2.00
>>>>>       iManufacturer           1 ITE Technologies, Inc.
>>>>>       iProduct                2 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.
>>>
>>> Well, then the alternative is to let both drivers to handle this USB ID,
>>> and add a code there on each of them that will check if the device is the
>>> right one, perhaps by looking at iProduct string. If the driver doesn't
>>> recognize it, it should return -ENODEV at .probe() time. The USB core will
>>> call the second driver.
>>
>> It is the easiest solution, but there should be very careful. Those
>> strings could change from device to device. I used earlier af9015 eeprom
>> hash (those string as coming from the eeprom) to map TerraTec dual
>> remote controller and git bug report quite soon as it didn't worked.
>> After I looked the reason I found out they was changed some not
>> meaningful value.
>
> Yeah, those strings can change, especially when vendors don't care enough
> to use a different USB ID/bcdDevice for different models. Yet, seems to
> be the cleaner approach, among the alternatives.

Damien, care to test?
http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs/heads/it9135_tuner

I split tuner out from IT9135 driver and due to that AF9035 driver 
supports IT9135 too (difference between AF9035 and IT9135 is integrated 
RF-tuner). I added iManufacturer based checks for both AF9015 and AF9035 
drivers

regards
Antti
Malcolm Priestley Jan. 7, 2013, 8:13 p.m. UTC | #12
On Mon, 2013-01-07 at 21:37 +0200, Antti Palosaari wrote:
> On 10/06/2012 06:40 PM, Mauro Carvalho Chehab wrote:
> > Em Mon, 01 Oct 2012 14:21:34 +0300
> > Antti Palosaari <crope@iki.fi> escreveu:
> >
> >> On 10/01/2012 02:15 PM, Mauro Carvalho Chehab wrote:
> >>> Em Sun, 30 Sep 2012 19:36:50 +0200
> >>> Damien Bally <biribi@free.fr> escreveu:
> >>>
> >>>>
> >>>>
> >>>> 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
> >>>>>       bcdDevice            2.00
> >>>>>       iManufacturer           1 ITE Technologies, Inc.
> >>>>>       iProduct                2 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.
> >>>
> >>> Well, then the alternative is to let both drivers to handle this USB ID,
> >>> and add a code there on each of them that will check if the device is the
> >>> right one, perhaps by looking at iProduct string. If the driver doesn't
> >>> recognize it, it should return -ENODEV at .probe() time. The USB core will
> >>> call the second driver.
> >>
> >> It is the easiest solution, but there should be very careful. Those
> >> strings could change from device to device. I used earlier af9015 eeprom
> >> hash (those string as coming from the eeprom) to map TerraTec dual
> >> remote controller and git bug report quite soon as it didn't worked.
> >> After I looked the reason I found out they was changed some not
> >> meaningful value.
> >
> > Yeah, those strings can change, especially when vendors don't care enough
> > to use a different USB ID/bcdDevice for different models. Yet, seems to
> > be the cleaner approach, among the alternatives.
> 
> Damien, care to test?
> http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs/heads/it9135_tuner
> 
> I split tuner out from IT9135 driver and due to that AF9035 driver 
> supports IT9135 too (difference between AF9035 and IT9135 is integrated 
> RF-tuner). I added iManufacturer based checks for both AF9015 and AF9035 
> drivers

I can't see the point of adding this to the af9035/af9033 driver. It is
going to turn into one enormous blob.

The it913x is a stable driver and has it own entity moving forward.

The only thing that needs to happen is the id is added to it913x driver
and if it doesn't apply drop it.

Nack.


Regards


Malcolm

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Antti Palosaari Jan. 7, 2013, 9:06 p.m. UTC | #13
On 01/07/2013 10:13 PM, Malcolm Priestley wrote:
> On Mon, 2013-01-07 at 21:37 +0200, Antti Palosaari wrote:
>> On 10/06/2012 06:40 PM, Mauro Carvalho Chehab wrote:
>>> Em Mon, 01 Oct 2012 14:21:34 +0300
>>> Antti Palosaari <crope@iki.fi> escreveu:
>>>
>>>> On 10/01/2012 02:15 PM, Mauro Carvalho Chehab wrote:
>>>>> Em Sun, 30 Sep 2012 19:36:50 +0200
>>>>> Damien Bally <biribi@free.fr> escreveu:
>>>>>
>>>>>>
>>>>>>
>>>>>> 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
>>>>>>>        bcdDevice            2.00
>>>>>>>        iManufacturer           1 ITE Technologies, Inc.
>>>>>>>        iProduct                2 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.
>>>>>
>>>>> Well, then the alternative is to let both drivers to handle this USB ID,
>>>>> and add a code there on each of them that will check if the device is the
>>>>> right one, perhaps by looking at iProduct string. If the driver doesn't
>>>>> recognize it, it should return -ENODEV at .probe() time. The USB core will
>>>>> call the second driver.
>>>>
>>>> It is the easiest solution, but there should be very careful. Those
>>>> strings could change from device to device. I used earlier af9015 eeprom
>>>> hash (those string as coming from the eeprom) to map TerraTec dual
>>>> remote controller and git bug report quite soon as it didn't worked.
>>>> After I looked the reason I found out they was changed some not
>>>> meaningful value.
>>>
>>> Yeah, those strings can change, especially when vendors don't care enough
>>> to use a different USB ID/bcdDevice for different models. Yet, seems to
>>> be the cleaner approach, among the alternatives.
>>
>> Damien, care to test?
>> http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs/heads/it9135_tuner
>>
>> I split tuner out from IT9135 driver and due to that AF9035 driver
>> supports IT9135 too (difference between AF9035 and IT9135 is integrated
>> RF-tuner). I added iManufacturer based checks for both AF9015 and AF9035
>> drivers
>
> I can't see the point of adding this to the af9035/af9033 driver. It is
> going to turn into one enormous blob.

Stop speaking bullshit! It increases AF9035/AF9033 driver size 
marginally. I could guess total binary size of AF9035+AF9033+IT913X 
(IT913X == that new tuner driver) is smaller than size of your IT9135 blob.

> The it913x is a stable driver and has it own entity moving forward.
>
> The only thing that needs to happen is the id is added to it913x driver
> and if it doesn't apply drop it.
>
> Nack.

If you remember about year back when IT9135 was mainlined I reviewed 
that stuff and criticized it wasn't split correctly. I also pointed out 
all what is needed is new RF-tuner driver as AF9035/AF9033 is just same 
silicon, but without a integrated tuner. You said on one mail something 
like it is too much different than AF9035 family, I didn't cared to 
start stupid yes/no discussion on that time.

You don't have any technical reason to NACK it. Last time I was 
"discussing" with DS3000+TS2020 split with you and you were against. 
Same happens now. I ask you to look driver guidelines [1] and stop 
speaking BS, instead start fixing your own stuff and you will never end 
up situation like that.

[1] http://lwn.net/Articles/529490/

Antti
diff mbox

Patch

--- 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 */
 };