ned14 / dvb_ttusb_ned

Just enough of the TechnoTrend S-2400 Linux kernel driver to cold start a faulty tuner
1 stars 0 forks source link

Doesn't work on (Raspbmc kernel 3.12.31) #1

Closed imago54 closed 10 years ago

imago54 commented 10 years ago

TT 2400 is still visible as FX2 board. dmesg usbcore: registered new interface driver dvb_usb_ttusb2_ned usb 1-1.4: USB disconnect, device number 8 usb 1-1.4: new high-speed USB device number 9 using dwc_otg usb 1-1.4: New USB device found, idVendor=04b4, idProduct=8613 usb 1-1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0

and nothing...

ned14 commented 10 years ago

All I can say is that it works here! I think it all depends on how senile your particular TT 2400 decoder is.

I'd suggest you try modifying the hardcoded vid pid in the driver to match the FX2 ids such that that vid pid is now the TT 2400 as far as dvb_usb_ttusb is concerned. It's an easy fix. And it may work for you.

imago54 commented 10 years ago

Unfortunately it doesn't work. As it is visible in my previous post my TT2400 vid and pid are exactly the same as in your code: ttusb2.c:263 { USB_DEVICE(0x04b4, 0x8613) } dmesg once again: usbcore: registered new interface driver dvb_usb_ttusb2ned <-- after insmod ttusb2.ko usb 1-1.4: USB disconnect, device number <-- after TT2400 disconnect_ usb 1-1.4: new high-speed USB device number 9 using dwcotg <-- TT2400 connected again usb 1-1.4: New USB device found, idVendor=04b4, idProduct=8613 **<-- vid and pid of my TT2400**_ usb 1-1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0

and nothing...

ned14 commented 10 years ago

It's not trying to load the TT-2400 firmware?

ned14 commented 10 years ago

Actually it just occurs to me your kernel is vastly newer than mine. This ttusb2 kernel module is from 2.6.32. If it worked properly in 3.12 I would be very surprised.

imago54 commented 10 years ago

For some reason it doesn't try to load TT2400 firmware - is there any way to debug that - are there any debugs in the code, which could be enabled with module debug flag?

ned14 commented 10 years ago

I'd say that's a huge red flag that the 2.6.32 ttusb driver won't run in kernel 3.12. Nor should it, kernel 2.6.32 is ancient.

You could repeat what I did using the driver from 3.12. Simply change its name to something unique so it doesn't conflict with the kernel driver. And change the vid pid to the FX2 ones.

I of course assume you have installed the TT-2400 firmware file into /lib/firmware? Without that you won't get anywhere.

imago54 commented 10 years ago

I can try if you will describe all the changes you've done in original driver. Are there any other beside vid/pid change? Of course I've installed TT2400 firmware in /lib/firmware.

ned14 commented 10 years ago

Modifying the driver is the easy part:

ned@milla:~$ diff -Naur pve-kernel-2.6.32/linux-2.6-2.6.32/drivers/media/dvb/dvb-usb/ttusb2.c dvb_ttusb_ned/ttusb2.c
--- pve-kernel-2.6.32/linux-2.6-2.6.32/drivers/media/dvb/dvb-usb/ttusb2.c       2014-03-03 17:54:44.000000000 +0000
+++ dvb_ttusb_ned/ttusb2.c      2014-05-26 20:37:24.596296370 +0100
@@ -258,8 +258,9 @@
 static struct usb_device_id ttusb2_table [] = {
        { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_400E) },
        { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_450E) },
-       { USB_DEVICE(USB_VID_TECHNOTREND,
-               USB_PID_TECHNOTREND_CONNECT_S2400) },
+/*     { USB_DEVICE(USB_VID_TECHNOTREND,
+               USB_PID_TECHNOTREND_CONNECT_S2400) },*/
+       { USB_DEVICE(0x04b4, 0x8613) },
        { USB_DEVICE(USB_VID_TECHNOTREND,
                USB_PID_TECHNOTREND_CONNECT_CT3650) },
        {}              /* Terminating entry */
@@ -420,7 +421,7 @@
 };

 static struct usb_driver ttusb2_driver = {
-       .name           = "dvb_usb_ttusb2",
+       .name           = "dvb_usb_ttusb2_ned",
        .probe          = ttusb2_probe,
        .disconnect = dvb_usb_device_exit,
        .id_table       = ttusb2_table,

The harder part is figuring out the absolute minimum set of files you need from the kernel to make a standalone module. I did that through trial and error, simple as. I started with just that ttusb2.c file and its header and a basic kernel Makefile. I then repeated trying to build it. Every time it spewed about missing symbols, I searched the kernel source tree for the files with those symbols and added them. You then repeat, and keep repeating until it links.

Not very intelligent, and I'd assume you can shortcut based on my choice of files. I'd upgrade your kernel module Makefile too to whatever is recent.

Good luck!