what is wrong with dm8k dvb-usb kernel modules?

  • The 1st step was building the dreambox image:

    Code
    make -f Makefile-opendreambox-1.6 image

    The next step was getting the source from http://linuxtv.org/hg/~anttip/af9015/ with

    Code
    hg clone http://linuxtv.org/hg/~anttip/af9015


    Insert these lines at the beginning of the Makefile in /af9015:

    Code
    export KERNELRELEASE := 2.6.18-r7.0
    export SRCDIR := ~/dreambox/dm8000/build/tmp/work/dm8000-oe-linux/linux-dm8000-2.6.18-r7.0/linux-2.6.18
    export OUTDIR := ~/dreambox/dm8000/build/tmp/work/dm8000-oe-linux/linux-dm8000-2.6.18-r7.0/linux-2.6.18
    export DESTDIR := /tmp
    export LANG := C
    
    
    export AS := /home/dreambox/dreambox/dm8000/build/tmp/cross/mipsel/bin/mipsel-oe-linux-as
    export CC := /home/dreambox/dreambox/dm8000/build/tmp/cross/mipsel/bin/mipsel-oe-linux-gcc
    export LD := /home/dreambox/dreambox/dm8000/build/tmp/cross/mipsel/bin/mipsel-oe-linux-ld

    Next step is to edit the Makefile in /af9015/v4l:
    Edit line 17:

    Code
    # -include $(obj)/.version


    Edit line 182:

    Code
    MYCFLAGS := CFLAGS="-mips32 -I../linux/include -D__KERNEL__ -I$(KDIR)/include -DEXPORT_SYMTAB -I/home/dreambox/dreambox/dm8000/build/tmp/staging/dm8000-oe-linux/kernel/include/asm-mips/mach-generic -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fPIC -mno-abicalls -G 0"


    af9015/v4l/compat.h line 251:

    Code
    #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
    #ifndef _LINUX_TYPES_H
    typedef unsigned long uintptr_t;
    #endif
    #endif


    Whenever the compiler had a problem with list_entry (e.g. v4l2-event.c, v4l2-mem2mem.c) functions, I inserted:

    Code
    /**
    * list_first_entry - get the first element from a list
    * @ptr:        the list head to take the element from.
    * @type:       the type of the struct this is embedded in.
    * @member:     the name of the list_struct within the struct.
    *
    * Note, that list is expected to be not empty.
    */
    #define list_first_entry(ptr, type, member) list_entry((ptr)->next, type, member)


    Before starting the make, I set up the terminal with:

    Code
    export PATH=$PATH:/home/dreambox/dreambox/dm8000/build/tmp/cross/mipsel/bin


    and I also built only the modules I really needed: So before making the modules:

    Code
    make menuconfig


    Then

    Code
    make


    Then

    Code
    make install


    There have been some more changes (I think a typedef with bool), but I think you should start and try to see how far you come.

  • install Avermedia A850(af9015)


    dm800)
    1.
    opkg update
    2.
    opkg install v4l-dvb-module-dvb-usb-af9015 v4l-dvb-module-mxl5005s v4l-dvb-module-mc44s803 v4l-dvb-module-mt2060 v4l-dvb-module-qt1010 v4l-dvb-module-tda18271 v4l-dvb-module-dvb-usb v4l-dvb-module-af9013 v4l-dvb-module-dvb-pll v4l-dvb-firmware-dvb-usb-af9015
    3.
    tar -zxf "/tmp/usbTunerBIN_and_start-stopSH_101217.tar.gz" -C /
    4.
    reboot


    dm8000)
    1.
    opkg update
    2.
    opkg install v4l-dvb-module-dvb-usb-af9015 v4l-dvb-module-mxl5005s v4l-dvb-module-mc44s803 v4l-dvb-module-mt2060 v4l-dvb-module-qt1010 v4l-dvb-module-tda18271 v4l-dvb-module-dvb-usb v4l-dvb-module-af9013 v4l-dvb-module-dvb-pll v4l-dvb-firmware-dvb-usb-af9015
    3.
    # replace these 3 modules
    /lib/modules/2.6.18-7.4-dm8000/kernel/drivers/media/dvb/frontends/af9013.ko
    /lib/modules/2.6.18-7.4-dm8000/kernel/drivers/media/dvb/dvb-usb/dvb-usb.ko
    /lib/modules/2.6.18-7.4-dm8000/kernel/drivers/media/dvb/dvb-usb/dvb-usb-af9015.ko
    by fixed versions from Cleanie, extract from
    tar -zxf "/tmp/af9015_dm8000_Cleanie_110111.tar.gz" -C /
    4.
    tar -zxf "/tmp/usbTunerBIN_and_start-stopSH_101217.tar.gz" -C /
    5.
    reboot


    dm800se)
    1.
    # make babckup copy of official-feed.conf
    cp /etc/opkg/official-feed.conf /etc/opkg/official-feed.conf_bc
    2.
    # change feed addres in the official-feed.conf to
    src/gz official http://addons.enigma2.sifteam.eu/dreambox/test/dm800se
    3.
    opkg update
    4.
    opkg install v4l-dvb-module-dvb-usb-af9015 v4l-dvb-module-mxl5005s v4l-dvb-module-mc44s803 v4l-dvb-module-mt2060 v4l-dvb-module-qt1010 v4l-dvb-module-tda18271 v4l-dvb-module-dvb-usb v4l-dvb-module-af9013 v4l-dvb-module-dvb-pll v4l-dvb-firmware-dvb-usb-af9015
    5.
    # change back feedaddress
    cp /etc/opkg/official-feed.conf /etc/opkg/official-feed.conf_sif
    cp /etc/opkg/official-feed.conf_bc /etc/opkg/official-feed.conf
    6.
    # extract all modules files from af9015-dm800se-sifteam.tar.gz
    tar -zxf "/tmp/af9015-dm800se-sifteam.tar.gz" -C /
    7.
    tar -zxf "/tmp/usbTunerBIN_and_start-stopSH_101217.tar.gz" -C /
    8.
    reboot

  • Thanks i finaly get to see my DVBT USB in tuner configuration but have other problem now
    with my DVBT USB stick pluged in my DVBS2 isnt not working properly it work only Free chanels not crypted and
    keep getting message on screen regarding PAT.
    I noticed that with stick i missing lots of things in
    dvb/adapter0
    but soon as i remove DVBT USB stick and reboot
    dvb/adapter0
    is full and all chanells work again.


    Any advice please?




  • With stick pluged in DVBT work properly but cant get to work scrambled DVBS channels
    and adapter0 is missing lot of stuff when booting with DVBT USB stick.
    Without DVBT USB stick DVBS work properly.
    I think that is something with scripts when booting to load DVBS not fully but DVBT boot ok.
    I try to find in all scripts what could be the cause of it but couldnt find.


    Maybe someone else know what could be wrong.



    THX!!!!!!!

  • Hi all, and thanks for your work & efforts.
    I've got a problem installing the usb-tuner.
    I did all that MartiniB says but when I make an opkg install (2th step after the opkg update) it don't work properly, you can see what's happenning...
    ..."Collected errors:
    * Cannot find package v4l-dvb-firmware-dvb-usb-af9015."
    The rest of the files were installed correctly....
    It seems the box can't find the firmware file, so despite the remaining steps do perfectly, the tuner doesn't work & the box can't see it.
    If I plug the tuner it appears a message "new device found, a0915 usb-tuner....." but anyway the tuner doesn't appear in tuner configuration menu or device manager.
    What can I do? Have anybody got this file to put it on manually by FTP? and ...where have I to put it? The DM8000 hasn't got a /lib/firmware directory (as DM800).
    Thanks in advanced.
    :winking_face:

    Music Is The Best

  • looks like DMM feed doesnt have that file, change feedaddress - steps 1 to 5 in instruction of dm800se


    of course change path for your dreambox model
    from
    src/gz official http://addons.enigma2.sifteam.eu/dreambox/test/dm800se
    to
    src/gz official http://addons.enigma2.sifteam.eu/dreambox/test/dm800

  • when i install after the dm800se way i cant change the volume from dreambox after restarting!
    I think here is a bug!



    Hi, i've got the same bug. And also another bug. When I zap through the sat-channels the error "Channel not found!" appears at every new channel.
    When I restart the DM800se WITHOUT the AF9015 USB Tuner plugged in, everything works normal.


    It would be nice if someone who is familiar with this topic would help us.

  • I have the same symptoms if I boot my DM800 with CinergyT2 USB tuner plugged in, see the USBTuner thread.
    Looking into /dev/dvb I can see the USB tuner is attached to adapter0 and the internal tuner to adapter1. Some parts of the software assume that the adapter0 is the (full-featured) internal tuner which is intermixed with the display and control hardware. In other words the internal adapter has the following items:

    Code
    audio0 ca0 ca1 ca2 demux0 demux1 demux2 dvr0 dvr1 dvr2 frontend0 net0 net1 net2 video0

    whereas the usb adapter only features:

    Code
    demux0 dvr0 frontend0 net0

    .
    Currently my workaround is to boot w/o the USB tuner plugged in and attach it later as the driver is hot-pluggable. I only need to restart enigma2 and it works correctly.
    I attached 2 bootlogs, one w/o USB tuner and one (T2) with. If you compare these you can see the USB tuner driver is loaded first (at line 144) and later the internal tuner (at line 233)...
    Has any linux specialist a solution for this?


    Helge

  • I have the same symptoms if I boot my DM800 with CinergyT2 USB tuner plugged in, see the USBTuner thread.
    Looking into /dev/dvb I can see the USB tuner is attached to adapter0 and the internal tuner to adapter1. Some parts of the software assume that the adapter0 is the (full-featured) internal tuner which is intermixed with the display and control hardware. In other words the internal adapter has the following items:

    Code
    audio0 ca0 ca1 ca2 demux0 demux1 demux2 dvr0 dvr1 dvr2 frontend0 net0 net1 net2 video0

    whereas the usb adapter only features:

    Code
    demux0 dvr0 frontend0 net0

    .
    Currently my workaround is to boot w/o the USB tuner plugged in and attach it later as the driver is hot-pluggable. I only need to restart enigma2 and it works correctly.
    I attached 2 bootlogs, one w/o USB tuner and one (T2) with. If you compare these you can see the USB tuner driver is loaded first (at line 144) and later the internal tuner (at line 233)...
    Has any linux specialist a solution for this?


    Helge


    Hi, thank you for the workaround! It works good with it. :smiling_face:
    It's a good solution until someone finally fix this problem correctly.