[HOW-TO] TBS 5520SE Drivers for LE11, LE12, LE13 on RPi4

  • [EDIT 31/07/2024]

    Attached to this post:

    1. the patches ;
    2. a link to a compilation of LE13-devel with TBS drivers (29 July 2024) aarch64 ;
      https://mega.nz/file/tHpSzBYB#…7SlLfCdxSGceRSU

    Notes:

    • This package was recompiled for aarch64 (following jassi0001 suggestion, thanks) to be aligned with official repositories.
    • arm add-ons will NOT run in aarch64 - Some will update depending on your kodi configuration, others will need to be manually updated (it is not in the scope of this thread to handle with add-on updates)

    ----------

    Following the compiled drivers for TBS 5520 SE DVB receiver for LE10 - LE13 on RPI4 (available here: LE10 & TBS 5520SE on RPi4 // updated drivers [SOLVED])

    I've created this thread to share the source code of the patches to apply, compatible with LE11 and LE12 and LE13 current source code from GITHUB.

    The patches were made by smp (thank you :) ).

    I've just made some small offset adjustments to go on with kernel source code updates.


    - 2 patch files are included :

    a) lepatch_prepare_tbs_module_enable.patch - to enable tbs5520se module compilation in kernel;

    b) lepatch_code_changes_tbs5520se.patch - to add tbs5520se needed source code;


    - how to apply these patches for RPi4:

    download and go into LibreELEC git source local copy:

    Code
    git clone https://github.com/LibreELEC/LibreELEC.tv.git
    cd LibreELEC.tv


    copy the attached patches to LibreELEC git source directory:

    then run:

    Code
    cp lepatch_code_changes_tbs5520se.patch projects/RPi/devices/RPi4/patches/linux
    git apply lepatch_prepare_tbs_module_enable.patch


    - if later on git complains about branches mismatch or similar on updating sources

    Code
    git stash
    git pull

    then, re-apply the patches.


    Goodluck !

    forum.libreelec.tv/core/attachment/9753/

  • For those who only use the satellite tuner I modded the driver to disable the DVB-T/C tuner.

    TBS 5520SE has 2 tuners attached to a single demod. DVB core apparently does not support 2 tuners on 1 demod so the driver used a hacky way to split the adapter in 2 virtual frontends. This cause all sorts of issues with tvheadend (e.g. "no free adapter available"). I modded the driver so si2157 DVB-T tuner is not attached and only 1 DVB-S frontend is created.

    linux-tbs5520se-k66-no-ter.zip

  • Hi,

    can you tell if there is a new version of the patch available ? i tried to alter the existing patch to the newer version of Libreelec, but i failed to compile that completly.

  • The master branch on github now seems to started LibreELEC 13 development.

    There may be some changes at the kernel level that could create issues with TBS patches.

    Give me some days to look at it.


    Meanwhile you can checkout a previous commit - I'm currently using commit 4513878 from April 29th, which compiles tbs patches just fine.

  • ^ changes for kernel 6.6

  • ...

    The compilation of LibreELEC13 devel, commit from today with TBS patches worked just fine.

    But ... The patches are different from thes one i've previosly shared.

    In fact I've changed the patches with the help of smp and forgot to update the last version.

    The last version is already available in the first post.

    Thanks

  • Hi NVDIAS, is is possoble, that the wrong (old) libreelec add on repository i copiled with your version? The Version11.0 is in the image... i think for Version 13 there has to be something like 12.80 ? Am i wrong here ? After migration to the image some apps dont work anymore including tvheadend client and ffpmeg streamig addon, because they dont update and stay on the verision from nexus....

  • yes. updated the first post with it.

    Hi nvdias,

    I whould like to inform, that the compiled Version you provided is arm. The official Repositorys are arm64.... i recompiled my Version and everything is working now.... including updates of add ons, which did not work with the ARM Compilation.... I compiled with ARCH=aarch64. Maybe you can share the latest compiled on in your sharedrive...

  • jassi0001 , done.

    I've updated the first post with the new link for aarch64 compilation.

    Take in mind that if you have arm add-ons installed, they will need to be updated to aarch64 to run properly.


    Thank you for pointing out the aarch64 issue !