OpenELEC / OpenELEC.tv

OpenELEC - The living room PC for everyone
http://openelec.tv
1.61k stars 881 forks source link

Cinergy S2 USB HD sat TV tuner card rev. 2 not working #1322

Closed bjwelker closed 11 years ago

bjwelker commented 12 years ago

I try my Rev. 2 under 1.99.1 and it don´t show up under TVHeadend Adapters. https://github.com/OpenELEC/OpenELEC.tv/issues/690 in this Request the driver should be included. In dmesg i get

[ 3.598480] dvb-usb: found a 'TeVii S660 USB' in cold state, will try to load a firmware [ 3.685138] dvb-usb: downloading firmware from file 'dvb-usb-s660.fw' [ 3.806706] dvb-usb: found a 'TeVii S660 USB' in warm state. [ 3.806941] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. [ 3.807182] DVB: registering new adapter (TeVii S660 USB) [ 3.938574] dvb-usb: MAC address: ff:ff:ff:ff:ff:ff [ 4.006965] dvb-usb: no frontend was attached by 'TeVii S660 USB' [ 4.007380] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1d.7/usb1/1-5/input/input6 [ 4.007521] dvb-usb: schedule remote query interval to 150 msecs. [ 4.007533] dvb-usb: TeVii S660 USB successfully initialized and connected.

Maybe something wrong here ?

mrdominuzq commented 12 years ago

can you try lastest ?

bjwelker commented 12 years ago

Did you make a patch ?

mrdominuzq commented 12 years ago

nope :) i can just see that everything is as it should be :) it should work :D

bjwelker commented 12 years ago

try the latest yesterday and again s660 would be detected

mrdominuzq commented 12 years ago

we can try the patch to the new kernel and see if it works ?

bjwelker commented 12 years ago

for sure maybe we can talk in irc or so to test it out

mrdominuzq commented 12 years ago

http://www.spinics.net/lists/linux-media/msg47507.html

bjwelker commented 12 years ago

so i build a new oe and replace the patch with the one from you ?

mrdominuzq commented 12 years ago

it's worth a try :) just remember that we have gone up to kernel 3.6.2

bjwelker commented 12 years ago

for the patch it should be no different

bjwelker commented 12 years ago

I just make a new build with the org. patch from openelec and i look into the file drivers/media/dvb/dvb-usb/dw2102.c

Looks like the patch is never done bevor the build

static struct usb_device_id dw2102_table[] = { [CYPRESS_DW2102] = {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW2102)}, [CYPRESS_DW2101] = {USB_DEVICE(USB_VID_CYPRESS, 0x2101)}, [CYPRESS_DW2104] = {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW2104)}, [TEVII_S650] = {USB_DEVICE(0x9022, USB_PID_TEVII_S650)}, [TERRATEC_CINERGY_S] = {USB_DEVICE(USB_VID_TERRATEC, USB_PID_CINERGY_S)}, [CYPRESS_DW3101] = {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW3101)}, [TEVII_S630] = {USB_DEVICE(0x9022, USB_PID_TEVII_S630)}, [PROF_1100] = {USB_DEVICE(0x3011, USB_PID_PROF_1100)}, [TEVII_S660] = {USB_DEVICE(0x9022, USB_PID_TEVII_S660)}, [PROF_7500] = {USB_DEVICE(0x3034, 0x7500)}, [GENIATECH_SU3000] = {USB_DEVICE(0x1f4d, 0x3000)}, [TERRATEC_CINERGY_S2] = {USB_DEVICE(USB_VID_TERRATEC, 0x00a8)}, [TEVII_S480_1] = {USB_DEVICE(0x9022, USB_PID_TEVII_S480_1)}, [TEVII_S480_2] = {USB_DEVICE(0x9022, USB_PID_TEVII_S480_2)}, [X3M_SPC1400HD] = {USB_DEVICE(0x1f4d, 0x3100)}, { } };

Rev.2 Card is missing all over.

mrdominuzq commented 12 years ago

what have you called the patch ?

bjwelker commented 12 years ago

inux-3.6.2-213-cinergy_s2_usb_r2.patch

 APPLY PATCH:   packages/linux/patches/linux-3.6.2-213-cinergy_s2_usb_r2.patch

patching file drivers/media/dvb/dvb-usb/dw2102.c Hunk #1 succeeded at 1177 (offset -66 lines). Hunk #2 FAILED at 1543. Hunk #3 FAILED at 1563. Hunk #4 succeeded at 1860 (offset -104 lines). Hunk #5 succeeded at 1874 with fuzz 2 (offset -104 lines). 2 out of 5 hunks FAILED -- saving rejects to file drivers/media/dvb/dvb-usb/dw2102.c.rej

with your one with the org. one there is 1 patching error

mrdominuzq commented 12 years ago

with the patch from the link i sent you

hunk 1 should be @@ -1177,6 +1177,13 @@ hunk 2 @@ -1444,6 +1451,7 @@ hunk 3 @@ -1462,6 +1470,7 @@ hunk 4 @@ -1621,7 +1630,7 @@ hunk 5 @@ -1635,6 +1644,10 @@

bjwelker commented 12 years ago

Looking fine now patch is going on just build the new kernel

Bjoern Welker Gesendet mit Sparrow (http://www.sparrowmailapp.com/?sig)

Am Montag, 22. Oktober 2012 um 11:45 schrieb Patrick Rasmussen:

with the patch from the link i sent you hunk 1 should be
@@ -1177,6 +1177,13 @@ hunk 2 @@ -1444,6 +1451,7 @@ hunk 3 @@ -1462,6 +1470,7 @@ hunk 4 @@ -1621,7 +1630,7 @@ hunk 5 @@ -1635,6 +1644,10 @@

— Reply to this email directly or view it on GitHub (https://github.com/OpenELEC/OpenELEC.tv/issues/1322#issuecomment-9657940).

bjwelker commented 12 years ago

CC [M] drivers/media/dvb/dvb-usb/dw2102.o drivers/media/dvb/dvb-usb/dw2102.c:1455:2: error: expected ',' or '}' before 'TEVII_S480_1' drivers/media/dvb/dvb-usb/dw2102.c:1474:3: error: 'TEVII_S480_1' undeclared here (not in a function) drivers/media/dvb/dvb-usb/dw2102.c:1474:2: error: array index in initializer not of integer type drivers/media/dvb/dvb-usb/dw2102.c:1474:2: error: (near initialization for 'dw2102_table') drivers/media/dvb/dvb-usb/dw2102.c:1475:3: error: 'TEVII_S480_2' undeclared here (not in a function) drivers/media/dvb/dvb-usb/dw2102.c:1475:2: error: array index in initializer not of integer type drivers/media/dvb/dvb-usb/dw2102.c:1475:2: error: (near initialization for 'dw2102_table') drivers/media/dvb/dvb-usb/dw2102.c:1476:3: error: 'X3M_SPC1400HD' undeclared here (not in a function) drivers/media/dvb/dvb-usb/dw2102.c:1476:2: error: array index in initializer not of integer type drivers/media/dvb/dvb-usb/dw2102.c:1476:2: error: (near initialization for 'dw2102_table') make[5]: * [drivers/media/dvb/dvb-usb/dw2102.o] Error 1 make[4]: * [drivers/media/dvb/dvb-usb] Error 2 make[3]: * [drivers/media/dvb] Error 2 make[2]: * [drivers/media] Error 2 make[1]: * [drivers] Error 2 make: * [release] Fehler 2

mrdominuzq commented 12 years ago

will take a look at it :) maybe i forgot something

bjwelker commented 12 years ago

i found the error i think ... a , is missing

bjwelker commented 12 years ago
diff -Naur linux-3.2.21/drivers/media/dvb/dvb-usb/dw2102.c linux-3.2.21.patch/drivers/media/dvb/dvb-usb/dw2102.c
--- linux-3.2.21/drivers/media/dvb/dvb-usb/dw2102.c     2012-06-20 00:18:30.000000000 +0200
+++ linux-3.2.21.patch/drivers/media/dvb/dvb-usb/dw2102.c       2012-06-28 14:08:50.721691934 +0200
@@ -1177,6 +1177,13 @@
 {
    u8 obuf[3] = { 0xe, 0x80, 0 };
    u8 ibuf[] = { 0 };
+   
+   if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0)
+       err("command 0x0e transfer failed.");
+
+   obuf[0] = 0xe;
+   obuf[1] = 0x02;
+   obuf[2] = 1;

    if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0)
        err("command 0x0e transfer failed.");
@@ -1444,6 +1451,7 @@
    PROF_7500,
    GENIATECH_SU3000,
    TERRATEC_CINERGY_S2,
+   TERRATEC_CINERGY_S2_R2,
    TEVII_S480_1,
    TEVII_S480_2,
    X3M_SPC1400HD,
@@ -1462,6 +1470,7 @@
    [PROF_7500] = {USB_DEVICE(0x3034, 0x7500)},
    [GENIATECH_SU3000] = {USB_DEVICE(0x1f4d, 0x3000)},
    [TERRATEC_CINERGY_S2] = {USB_DEVICE(USB_VID_TERRATEC, 0x00a8)},
+   [TERRATEC_CINERGY_S2_R2] = {USB_DEVICE(USB_VID_TERRATEC, 0x00b0)},
    [TEVII_S480_1] = {USB_DEVICE(0x9022, USB_PID_TEVII_S480_1)},
    [TEVII_S480_2] = {USB_DEVICE(0x9022, USB_PID_TEVII_S480_2)},
    [X3M_SPC1400HD] = {USB_DEVICE(0x1f4d, 0x3100)},
@@ -1621,7 +1630,7 @@
        }},
        }
    },
-   .num_device_descs = 3,
+   .num_device_descs = 4,
    .devices = {
        {"DVBWorld DVB-S 2102 USB2.0",
            {&dw2102_table[CYPRESS_DW2102], NULL},
@@ -1635,6 +1644,10 @@
            {&dw2102_table[TERRATEC_CINERGY_S], NULL},
            {NULL},
        },
+       { "Terratec Cinergy S2 USB HD Rev.2",
+           { &dw2102_table[TERRATEC_CINERGY_S2_R2], NULL },
+           { NULL },
+       },
    }
 };

This one compile with the 3.6.2 now i need to test if the card is running ...

mrdominuzq commented 12 years ago

perfect lets hope it works :)

bjwelker commented 12 years ago

root ~ # dmesg | grep dvb-* [ 3.510217] dvb-usb: found a 'Terratec Cinergy S2 USB HD Rev.2' in cold state, will try to load a firmware [ 3.605509] dvb-usb: downloading firmware from file 'dvb-usb-dw2102.fw' [ 3.730078] dvb-usb: found a 'Terratec Cinergy S2 USB HD Rev.2' in warm state. [ 3.731686] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. [ 10.730225] dvb-usb: MAC address reading failed. [ 20.940233] dvb-usb: no frontend was attached by 'Terratec Cinergy S2 USB HD Rev.2' [ 30.940933] dvb-usb: schedule remote query interval to 150 msecs. [ 30.940945] dvb-usb: Terratec Cinergy S2 USB HD Rev.2 successfully initialized and connected.

Card don´t work cause fronteend is missing :(

bjwelker commented 12 years ago

Maybe i use the wrong Firmware. I rename the dvb-fe-3000.fw to dvb-usb-dw2102.fw will test the dw2102.fw file

bjwelker commented 12 years ago

root ~ # dmesg | grep dvb-* [ 3.285351] dvb-usb: found a 'Terratec Cinergy S2 USB HD Rev.2' in cold state, will try to load a firmware [ 3.826951] dvb-usb: downloading firmware from file 'dvb-usb-dw2102.fw' [ 3.996745] dvb-usb: found a 'Terratec Cinergy S2 USB HD Rev.2' in warm state. [ 3.997079] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. [ 3.998756] dvb-usb: MAC address reading failed. [ 14.223581] dvb-usb: no frontend was attached by 'Terratec Cinergy S2 USB HD Rev.2' [ 14.225385] dvb-usb: schedule remote query interval to 150 msecs. [ 14.225400] dvb-usb: Terratec Cinergy S2 USB HD Rev.2 successfully initialized and connected.

tested again with dw2102 firmware but no luck :( Maybe someone can help out here

sraue commented 12 years ago

paste a dmesg and lsmod output from a running linux live system (ubuntu, fedora, suse...) where this stick works so we see which frontend driver is needed

bjwelker commented 12 years ago

ok will post some logs from a enigma2 linux stb where the card is running

bjwelker commented 12 years ago

Here is dmesg from the Dreambox

dvb: module_layout: kernel tainted.
input: dreambox advanced remote control (native) as /devices/virtual/input/input1
DVB: registering new adapter (dvb0)
dvb-usb: found a 'Terratec Cinergy S2 USB HD Rev.2' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
dvb-usb: MAC address: ff:ff:ff:ff:ff:ff
dvb-usb: Terratec Cinergy S2 USB HD Rev.2 successfully initialized and connected.
ds3000_firmware_ondemand: Waiting for firmware upload (dvb-fe-ds3000.fw)...

a second one

dvb-usb: found a 'Terratec Cinergy S2 USB HD Rev.2' in warm state.
dw2102: su3000_power_ctrl: 1, initialized 0

dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (Terratec Cinergy S2 USB HD Rev.2)
dvb-usb: MAC address: ff:ff:ff:ff:ff:ff
DS3000 chip version: 0.192 attached.
dw2102: Attached DS3000!

DVB: registering adapter 1 frontend 0 (Montage Technology DS3000/TS2020)...
input: IR-receiver inside an USB DVB receiver as /devices/platform/ehci-brcm.0/usb1/1-2/input/input3
dvb-usb: schedule remote query interval to 150 msecs.
dw2102: su3000_power_ctrl: 0, initialized 1

dvb-usb: Terratec Cinergy S2 USB HD Rev.2 successfully initialized and connected.
usbcore: registered new interface driver dw2102
DVB: registering adapter 0 frontend 2 (vtuner)...
dw2102: su3000_power_ctrl: 1, initialized 1

ds3000_firmware_ondemand: Waiting for firmware upload (dvb-fe-ds3000.fw)...

lsmod

Module                  Size  Used by
zd1211rw               55965  0 
usbserial              32891  0 
rtl8187                54102  0 
rt73usb                24447  0 
rt2800usb              13040  0 
rt2800lib              45612  1 rt2800usb
rt2500usb              18208  0 
rt2x00usb              11065  3 rt73usb,rt2800usb,rt2500usb
rt2x00lib              40406  5 rt73usb,rt2800usb,rt2800lib,rt2500usb,rt2x00usb
r8712u                173762  0 
8192cu                542853  0 
ipv6                  351559  10 
dvb_usb_dw2102         30025  1 
stv6110                 4731  1 dvb_usb_dw2102
dvb_pll                 8324  1 dvb_usb_dw2102
stb6100                 5853  1 dvb_usb_dw2102
cx24116                14170  1 dvb_usb_dw2102
tda10023                6295  1 dvb_usb_dw2102
stb6000                 2583  1 dvb_usb_dw2102
ds3000                 13002  1 dvb_usb_dw2102
si21xx                  8593  1 dvb_usb_dw2102
mt312                   7349  1 dvb_usb_dw2102
stv0900                60558  1 dvb_usb_dw2102
zl10039                 3500  1 dvb_usb_dw2102
stv0299                 9273  1 dvb_usb_dw2102
stv0288                 6683  1 dvb_usb_dw2102
carl9170               85949  0 
ath9k_htc              63867  0 
mac80211              235756  7 zd1211rw,rtl8187,rt2800lib,rt2x00usb,rt2x00lib,carl9170,ath9k_htc
ath9k_common            1704  1 ath9k_htc
ath9k_hw              365245  2 ath9k_htc,ath9k_common
ath                    17666  4 carl9170,ath9k_htc,ath9k_common,ath9k_hw
dvb                  4731836  32 
modloader2             33264  1 dvb
modloader              22329  0 
tpm                     7905  3 dvb,modloader2,modloader
diff -Naur a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c
--- a/drivers/media/dvb/dvb-usb/dw2102.c    2011-12-16 22:31:14.000000000 +0100
+++ b/drivers/media/dvb/dvb-usb/dw2102.c    2011-12-16 22:12:29.000000000 +0100
@@ -1181,6 +1181,13 @@
 {
    u8 obuf[3] = { 0xe, 0x80, 0 };
    u8 ibuf[] = { 0 };
+   
+   if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0)
+       err("command 0x0e transfer failed."); 
+   //power on su3000
+   obuf[0] = 0xe;
+   obuf[1] = 0x02;
+   obuf[2] = 1;

    if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0)
        err("command 0x0e transfer failed.");
@@ -1451,6 +1458,7 @@
    {USB_DEVICE(0x9022, USB_PID_TEVII_S480_1)},
    {USB_DEVICE(0x9022, USB_PID_TEVII_S480_2)},
    {USB_DEVICE(0x1f4d, 0x3100)},
+   {USB_DEVICE(USB_VID_TERRATEC, 0x00b0)},
    { }
 };

@@ -1824,7 +1832,7 @@
            }
        }
    },
-   .num_device_descs = 3,
+   .num_device_descs = 4,
    .devices = {
        { "SU3000HD DVB-S USB2.0",
            { &dw2102_table[10], NULL },
@@ -1838,6 +1846,10 @@
            { &dw2102_table[14], NULL },
            { NULL },
        },
+       { "Terratec Cinergy S2 USB HD Rev.2",
+           { &dw2102_table[15], NULL },
+           { NULL },
+       },
    }
 };

this is the patch wich is used in the openpli image on the dreambox

ghost commented 11 years ago

For me the patch is working fine. you don't need to rename the firmware from dvb-fe-3000.fw to dvb-usb-dw2102.fw simply yust copy the firmware from the tar archive to /lib/firmware

sraue commented 11 years ago

what is still needed? i compared our included drivers/modules with the list above as well the firmwares, all stuff should be included in OpenELEC (compared with latest 3.0 RC2 build)

ghost commented 11 years ago

As i don't use openelec anymore i can't tell if it's included. I compiled a fresh vanilla kernel with 3.7.4 for my Goflexnet (similar to dockstar) and the patch for Cinergy S2 USB HD rev.2 is still missing in the mainline kernel. I don't know if you include it already. If it's included you should close this issue, as i thought it's still not fixed. If you know how to post a patch to mainline, I would love it if you could post them, it's weird to wait 2 years and the driver is still not included Greetings Godofdream

jenkins101 commented 11 years ago

@sraue @stefansaraev This is included now?

stefansaraev commented 11 years ago

48d528b3c