Saturday, February 15, 2014

Tvheadend on cubieboard1 with Terratec Cinergy HTC stick HD (0ccd:00b2)

The USB stick doesn't automatically recognized by the Cubieboard1 linux sdcard image. You must compile the kernel and enable em28xx config as module. Here is the example of working config file for this stick and compiled kernel and module.
1. config.
2. uImage.
3. kernel-module.
To install above kernel or if you want to compile the kernel yourself, please follow this instruction from this website. We also need a firmware for the stick, download dvb-usb-terratec-htc-stick-drxk.fw from here and put in /lib/firmware directory.
After reboot, your stick should be recognized by the kernel and em28xx driver should be loaded. The kernel will create dvb device and analog device, but unfortunately, you can not use the analog device to watch analog tv.

Install tvheadend using the howto from tvheadend website, after installation, you can immediately add dvb channel as usual. If you live in germany and have KabelBW as DVB-C provider, the initial tunning data from tvheadend is not complete, so you must create your own using w_scan tool (w_scan -fc -cDE -x > de-KBW) or just grab mine from below:

#------------------------------------------------------------------------------
# file automatically generated by w_scan
# (http://wirbel.htpc-forum.de/w_scan/index2.html)
#! <w_scan> 20130331 1 0 CABLE DE </w_scan>
#------------------------------------------------------------------------------
# location and provider: Germany KabelBW
# date (yyyy-mm-dd)    : 2014-01-17
# provided by (opt)    : arieedzig
#
# C[2] [plp_id] [data_slice_id] [system_id] <freq> <sr> <fec> <mod> [# comment]
#------------------------------------------------------------------------------
C 754000000 6900000 NONE    QAM64       #                                          KBW
C 706000000 6900000 NONE   QAM256
C 746000000 6900000 NONE   QAM256       #                                          KBW
C 418000000 6900000 NONE   QAM256
C 450000000 6900000 NONE   QAM256
C 546000000 6900000 NONE   QAM256
C 466000000 6900000 NONE   QAM256
C 458000000 6900000 NONE   QAM256
C 130000000 6900000 NONE   QAM256
C 554000000 6900000 NONE   QAM256
C 122000000 6900000 NONE   QAM256
C 570000000 6900000 NONE   QAM256
C 610000000 6900000 NONE    QAM64
C 682000000 6900000 NONE   QAM256
C 690000000 6900000 NONE   QAM256
C 762000000 6900000 NONE    QAM64
C 770000000 6900000 NONE    QAM64       #                                          KBW
C 778000000 6900000 NONE    QAM64       #                                          KBW
C 786000000 6900000 NONE    QAM64       #                                          KBW
C 794000000 6900000 NONE    QAM64       #                                          KBW
C 802000000 6900000 NONE    QAM64       #                                          KBW
C 738000000 6900000 NONE   QAM256       #                                          KBW
C 730000000 6900000 NONE   QAM256
C 810000000 6900000 NONE    QAM64       #                                          KBW
C 818000000 6900000 NONE    QAM64       #                                          KBW
C 826000000 6900000 NONE    QAM64       #                                          KBW
C 426000000 6900000 NONE   QAM256
C 434000000 6900000 NONE   QAM256
C 562000000 6900000 NONE   QAM256
C 114000000 6900000 NONE   QAM256
C 442000000 6900000 NONE   QAM256
C 346000000 6900000 NONE   QAM256
C 354000000 6900000 NONE   QAM256
C 362000000 6900000 NONE   QAM256
C 370000000 6900000 NONE   QAM256
C 394000000 6900000 NONE   QAM256
C 386000000 6900000 NONE   QAM256
C 402000000 6900000 NONE   QAM256
C 410000000 6900000 NONE   QAM256
C 378000000 6900000 NONE   QAM256
C 698000000 6900000 NONE   QAM256

And save as /usr/share/tvheadend/data/dvb-scan/dvb-c/de-KBW. After that, choose this file when you add dvb network from tvheadend.
Unfortunately, w_scan on cubieboard can't found any initial tuning data. You must use x86 machine with w_scan, please use your x86 machine to create the initial tuning data or just copy from mine.

With this setup, I can watch 4 or more?(not tested) simultaneous live tv streaming on different PC with only 30% less processor use in cubieboard1. But when I try to watch live tv on cubieboard1 using vlc or gmplayer, I can't even get moving picture and processor use is 100%. I manage to have moving picture using mplayer, but still around 100% processor use with audio delay. I already enabled Allwinner built-in graphics and Cedar-X Video Engine in the kernel but it seems not used by the application. Anyone have suggestion about this?

References:

  • https://romanrm.net/a10/cross-compile-kernel
  • http://linuxtv.org/wiki/index.php/Main_Page
  • https://tvheadend.org/projects/tvheadend/wiki/AptRepository

No comments: