Welcome! Log In Create A New Profile

Advanced

Support for Terratec S2 Box 0ccd:0105

Posted by immergut 
immergut
Support for Terratec S2 Box 0ccd:0105
January 15, 2016 04:32PM
Hi,

it is possible to add support for the Terratec S2 Box 0ccd:0105 device to the 4.2 kernel?

There is a patch working on ubuntu and raspberry but it do not work on my NSA325.
https://forum.ubuntuusers.de/topic/pi-vdr-mit-cinergy-s2-usb-r2-0ccd-0105/4/#post-7981183

Br
immergut
Re: Support for Terratec S2 Box 0ccd:0105
January 16, 2016 12:11AM
immergut Wrote:
-------------------------------------------------------
> Hi,
>
> it is possible to add support for the Terratec S2
> Box 0ccd:0105 device to the 4.2 kernel?
>
> There is a patch working on ubuntu and raspberry
> but it do not work on my NSA325.
> https://forum.ubuntuusers.de/topic/pi-vdr-mit-cine
> rgy-s2-usb-r2-0ccd-0105/4/#post-7981183
>
> Br
> immergut

Do you have more information?

I see now this is a USB gadget. If there is a patch then it would be possible.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 01/16/2016 02:17AM by bodhi.
Re: Support for Terratec S2 Box 0ccd:0105
January 16, 2016 04:03AM
Also check if the dw2102 driver will work or not (it's already in the kernel linux-4.2.0-kirkwood-tld-1 here).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
immergut
Re: Support for Terratec S2 Box 0ccd:0105
January 16, 2016 04:13AM
Sorry for the information gap....

Terratec S2 Box 0ccd:0105 is a USB Sat tuner.

As far as I know, to get this device working a patch to the dvb-usb-dw2102 of the kernel of linux-4.2.0-kirkwood is necessary.

In the linked forum, there is a patched dvb-usb-dw2102 included in a dkms package.
If you unpack the package you get the code.
Could you try to merge the changes into the dw2102 of the kernel?

I need the code related to

dw2102.c
static struct usb_device_id dw2102_table[] = {
....
[TERRATEC_S2_BOX] = {USB_DEVICE(USB_VID_TERRATEC, 0x0105)},

If I see it right, this code was already pached into the kernel but has been removed in linux-4.1.0-kirkwood-tld-1 within "pbg4 for the modified patch for dvb-usb-dw2102 " http://forum.doozan.com/read.php?2,12096,22339#msg-22339
Re: Support for Terratec S2 Box 0ccd:0105
January 16, 2016 04:25AM
immergut Wrote:
-------------------------------------------------------
> Sorry for the information gap....
>
> Terratec S2 Box 0ccd:0105 is a USB Sat tuner.
>
> As far as I know, to get this device working a
> patch to the dvb-usb-dw2102 of the kernel of
> linux-4.2.0-kirkwood is necessary.
>
> In the linked forum, there is a patched
> dvb-usb-dw2102 included in a dkms package.
> If you unpack the package you get the code.
> Could you try to merge the changes into the dw2102
> of the kernel?
>
> I need the code related to
>
> dw2102.c
> static struct usb_device_id dw2102_table[] = {
> ....
> [TERRATEC_S2_BOX] = {USB_DEVICE(USB_VID_TERRATEC,
> 0x0105)},
>
> If I see it right, this code was already pached
> into the kernel but has been removed in
> linux-4.1.0-kirkwood-tld-1 within "pbg4 for the
> modified patch for dvb-usb-dw2102 "
> http://forum.doozan.com/read.php?2,12096,22339#msg
> -22339

I thought all pbg4's patch for dw2102 has been mainlined! I wiil take a look (be back in about a week or so, please remind me).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
immergut
Re: Support for Terratec S2 Box 0ccd:0105
January 16, 2016 05:11AM
bodhi Wrote:
-------------------------------------------------------
> Also check if the dw2102 driver will work or not
> (it's already in the kernel
> linux-4.2.0-kirkwood-tld-1
> [url=http://forum.doozan.com/read.php?2,12096,page
> =1]here[/url]).

dw2102 driver detects the Terratec S2 Box in Debian-3.18.5-kirkwood-tld-1-rootfs-bodhi and linux-4.0.0-kirkwood-tld-2-bodhi, but it don't work in linux-4.2.0-kirkwood-tld-1-bodhi.
Re: Support for Terratec S2 Box 0ccd:0105
January 17, 2016 10:20AM
immergut,

> dw2102 driver detects the Terratec S2 Box in
> Debian-3.18.5-kirkwood-tld-1-rootfs-bodhi and
> linux-4.0.0-kirkwood-tld-2-bodhi, but it don't
> work in linux-4.2.0-kirkwood-tld-1-bodhi.

I will check the patch before releasing the 4.4 kernel build.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Support for Terratec S2 Box 0ccd:0105
January 26, 2016 03:50PM
Hi,

@immergut

when moving to kernel 4.2 my patch for bodhi for dvb-s devices in 3.18.5 and 4.0.0 based on crazy cats git version of the old s2-liplianin drivers was not supportable any longer because of upstream changes, this relates to the terratec S2 usb box and some clones of tevii dvb-s2 usb devices,

if the Terratec S2 Box 0ccd:0105 has a ds3103 dvb-frontend and ts2022 demod, it is similar to the technotrend tt-s2-4600 which is fully supported in mainline by now,

because antti palosaari rewrote m88ds3103.c completely, the calling conventions for the frontend attach process changed, but Olli Salonen wrote a patch for dw2102.c to get the tt-s2-4600 working, I have helped him testing because I have such a device, this has been mainlined by now since 4.2, that is why my patch was not necesary any longer,..

so it may be merely a case of patching vendor and device ids in dw2102.c under the entry for tt-s2-4600, you can test that and recompile the module and report here,

best wishes pbg4



Edited 1 time(s). Last edit at 01/26/2016 03:51PM by pbg4.
Re: Support for Terratec S2 Box 0ccd:0105
January 26, 2016 04:29PM
@pbg4,

Appreciated the quick response to my email!

@immergut,

Hope pbg4 has explained the reason why mainline code no longer has this specific device id. Does pbg4's suggested course of action sound feasible to you?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
immergut
Re: Support for Terratec S2 Box 0ccd:0105
February 01, 2016 02:43PM
Hi pbg4,

thanks for your explanations.

pbg4 Wrote:
-------------------------------------------------------
> when moving to kernel 4.2 my patch for bodhi for
> dvb-s devices in 3.18.5 and 4.0.0 based on crazy
> cats git version of the old s2-liplianin drivers
> was not supportable any longer because of upstream
> changes, this relates to the terratec S2 usb box
> and some clones of tevii dvb-s2 usb devices,

In my first comment, there is a already existing patch linked for kernel 4.2.
Could you take a look at this patch, in best case, this code have to be only merged into your changes.


> so it may be merely a case of patching vendor and
> device ids in dw2102.c under the entry for
> tt-s2-4600, you can test that and recompile the
> module and report here,

I have not compiled a kernel before. But I will give it a try. Can you recommend a tutorial?

What are the build steps?
- Download original kernel sources
- Applying patch file
- changing dw2102.c
- configuring kernel?, is there a config file available?
- compiling kernel


best regards

immergut
Re: Support for Terratec S2 Box 0ccd:0105
February 03, 2016 03:01AM
immergut,

If you have difficulty, stay with kernel 4.2 for now. And remind me before the next release for kernel 4.5, I'll take a look at adding the device back to the driver.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Support for Terratec S2 Box 0ccd:0105
February 09, 2016 03:09PM
Hi

@immergut

best would be to look into your terratec dvb-s2 device if frontend and demodulator chips match the
version of the tt-s2-4600, i.e. montage ds3103 and ts2022, than a simple device and vendor id patch
should work, because the usb bridges should be identical, otherwise the patch in the former kernels
would not have worked,..

than take this short tutorial and compile dvb-usb-dw2102.ko with the changes natively on the arm device without crosscompiling, so the compiler suite and relevant tools must already have been installed,..

than download 4.4.0 kernel sources from kernel.org, decompress the sources in /usr/src, copy the config
from /boot/ as .config into the kernel sources and cd into the source tree,

cp linux-4.4.0-kirkwood-tld1.patch from bodhi's kernel files into /usr/src/.

cd linux-4.4.0/
patch -p 1 < ../linux-4.4.0-kirkwood-tld1.patch --dry-run to test the patch, than apply it without --dry-run,

next:
cp ../linux-headers-4.4.0-kirkwood-tld-1/Module.symvers . <--- this is important, the Module.symvers must get copied in linux-4.4.0 directory!

than make oldconfig:

cp /boot/config-4.4.0-kirkwood-tld-1 .config
make oldconfig

than:

make prepare
make scripts

make SUBDIRS=drivers/media/usb/dvb-usb modules

this will build all dvb-usb modules including dvb-usb-dw2101.ko

where you had before added device and vendor id for the terratec device in the technotrend tt-s2-4600 entry,
if you are unshure what to do you could even as a first hack replace the tt-s2-4600 vid and dev id
by the terratec values and see if it works, i.e. insmod the newly compiled module and plug in the terratec
dvb-s2 device and test it,

best wishes pbg4



Edited 1 time(s). Last edit at 02/11/2016 01:30PM by pbg4.
Re: Support for Terratec S2 Box 0ccd:0105
February 26, 2016 11:34AM
Hi pbg4,

you are right, the Terratec S2 Box and Tevii S662 seems to be clones of the tt-s2-4600.

I merged the patches of the following sites into the attached file:
http://www.spinics.net/lists/linux-media/msg96109.html
https://forum.ubuntuusers.de/topic/dvb-adapter-tevii-s662-mit-media-build/

It works! Thx.

My only problem is to get the new module dvb-usb-dw2102 automatically loaded on startup.
I copied the file to /lib/modules/4.4.0-kirkwood-tld-1/kernel/drivers/media/usb/dvb-usb

modprobe dvb-usb-dw2102
works, and loads all dependencies, insmod doesn't work because dependencies are missing.


best regards

immergut
Attachments:
open | download - dw2102.c (55.1 KB)
Re: Support for Terratec S2 Box 0ccd:0105
February 28, 2016 05:07AM
Hi,

@immergut,

good to know it works, after you copied the new module dvb-usb-dw2102
to /lib/modules/4.4.0-kirkwood-tld-1/kernel/drivers/media/usb/dvb-usb maybe you
forgot a depmod -a ? otherwise use an entry of dvb-usb-dw2102 in /etc/modules for loading at startup,

as you have the device also for further testing I will send an email to Olli Salonen
to include the Terratec S2 Box 0ccd:0105 VID and PID and send it upstream,
lets see if we can get it in the next merge window,

best wishes pbg4
Re: Support for Terratec S2 Box 0ccd:0105
March 07, 2016 04:22PM
Hi,

the Terratec S2 Box and the S662 patch is now already in the media_tree as well,
so should all be included in future releases,

http://git.linuxtv.org/media_tree.git/commit/?id=6ede20f9683c55dac8281b63d80b5cc669640252

best wishes pbg4
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: