OpenWrt Forum Archive

Topic: DVB-T usb streaming with BackFire 10.03 and tp-link 1043 with af9015

The content of this topic has been archived on 17 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I have prepared custom packages for af9015 usb tunner
this tuner is very popular because of it's price (~ USD 7$ ) on china online stores, ebay and others
example of tuner and it's price: http://www.buyincoins.com/digital-tv-hd … ct-70.html

With these packages, I am able to stream DVB-T channels, 5 channels eating 6 % CPU when nobody is watching, and on each connection it takes ~ 10% CPU with mumudvb

packages are for 10.03 branch
kernel 2.6.32.10
tp-link 1043

This kernel doesn't support TDA18218 NXP chip inside USB Sttick
support is present in 2.6.36 kernel, so i have to patch toolchain sources of 2.6.32.10 kernel



patch is from here: https://patchwork.kernel.org/patch/82494/

packages are here: https://docs.google.com/leaf?id=0B8oQFO … &hl=en

... what's about tvheadend? Could you ve a look, if this is also possible (sometimes in the future, would be awesome ...) .. thanks!

meta96 wrote:

... what's about tvheadend? Could you ve a look, if this is also possible (sometimes in the future, would be awesome ...) .. thanks!

actually, I have been uploaded in my repository mumudvb module for streaming smile
more info you can find here: http://mumudvb.braice.net/mumudrupal/node/36

everything is there for streaming, it works very nice,
I just compiled dvb-usb-af9015 module with TDA18218 chip


after installing module, you may have to load modules after reboot. So make file:
/etc/modules.d/91-dbv-af9015:

dvb-core
dvb-usb force_pid_filter_usage=1
dvb-pll
mxl5005s
tda18271
qt1010
mt2060
af9013
mc44s803
tda18218
dvb-usb-af9015

(Last edited by ltrifonov on 14 Jan 2011, 15:55)

meta96 wrote:

... what's about tvheadend? Could you ve a look, if this is also possible (sometimes in the future, would be awesome ...) .. thanks!

you win smile
i managed to compile tvheadend for openwrt,

I still need little help from coders, but it seem to work smile

compiled tvheadend package is here:
    https://docs.google.com/leaf?id=0B8oQFO … &hl=en

i hope following forum  will help with small issues i have with compiling
   https://www.lonelycoder.com/redmine/boards/5/topics/361

(Last edited by ltrifonov on 7 Apr 2011, 15:38)

jow wrote:
ltrifonov wrote:

I still need little help from coders, but it seem to work smile

http://lists.uclibc.org/pipermail/uclib … 43660.html

Seems we must patch uClibc to provide clock_nanosleep(). Its actually only a wrapper for a Linux syscall.

I tried to include patch directly into my code, but it doesn't work...
i am not so good in coding...

is it possible? instead patching librt, just add this into my code?

i added this in  file rawtsinput.c which uses this nanosleep function

#include <errno.h>
#include <stdlib.h>
#include <time.h>
#include <sys/syscall.h>

#include "kernel-posix-timers.h"

#ifdef __NR_clock_nanosleep

#define __NR___syscall_clock_nanosleep __NR_clock_nanosleep


static __inline__ _syscall4(long, __syscall_clock_nanosleep,
                           clockid_t, clock_id, int, flags,
                           const struct timespec *, req,
                           struct timespec *, rem);



long clock_nanosleep(clockid_t clock_id, int flags,
                   const struct timespec *req,
                   struct timespec *rem)
{
       return __syscall_clock_nanosleep(clock_id, flags, req, rem);
}

#endif

but result is:

Entering directory `/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6'
mips-openwrt-linux-uclibc-gcc -MD -g -funsigned-char -O2  -D_FILE_OFFSET_BITS=64 -Ibuild.Linux -I/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6/src -I/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6 -DHTS_VERSION=\"2.12.99\" -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float -I/usr/src/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib/libiconv-stub/include -I/usr/src/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib/libintl-stub/include  -I/usr/src/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include -I/usr/src/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/include -I/usr/src/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include -I/usr/src/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/include -I/usr/src/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib/libiconv-stub/include -I/usr/src/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib/libintl-stub/include -std=gnu99 -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations -I/usr/src/openwrt/backfire/staging_dir/host/include/ -Wmissing-prototypes -I/usr/src/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr//include -c -o build.Linux/src/rawtsinput.o /usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6/src/rawtsinput.c
/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6/src/rawtsinput.c:51: error: expected declaration specifiers or '...' before '__syscall_clock_nanosleep'
/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6/src/rawtsinput.c:52: error: expected declaration specifiers or '...' before 'clock_id'
/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6/src/rawtsinput.c:52: error: expected declaration specifiers or '...' before 'flags'
/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6/src/rawtsinput.c:53: error: expected declaration specifiers or '...' before 'req'
/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6/src/rawtsinput.c:54: error: expected declaration specifiers or '...' before 'rem'
cc1: warnings being treated as errors
/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6/src/rawtsinput.c:54: error: type defaults to 'int' in declaration of '_syscall4'
/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6/src/rawtsinput.c:58: error: no previous prototype for 'clock_nanosleep'
/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6/src/rawtsinput.c: In function 'clock_nanosleep':
/usr/src/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/andoma-tvheadend-d2101f6/src/rawtsinput.c:62: error: implicit declaration of function '__syscall_clock_nanosleep'
make[3]: *** [build.Linux/src/rawtsinput.o] Error 1

late this evening i will try patching librt

The discussion might have continued from here.