Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DVB Adaptors not detected #45

Open
matzingerhh opened this issue Oct 28, 2021 · 44 comments
Open

DVB Adaptors not detected #45

matzingerhh opened this issue Oct 28, 2021 · 44 comments
Assignees
Labels
enhancement Enhancement of the code, not introducing new features. help-wanted We need some extra helping hands or expertise in order to resolve this.

Comments

@matzingerhh
Copy link

matzingerhh commented Oct 28, 2021

Problem/Motivation

Hi I like the addon. I currently use a stand alone container for tv headend.

Expected behavior

Use my tv cards as I can use them with the linuxserver/tvheadend:latest container

4A1FDED2-037D-438A-8B68-443389EEE479

Actual behavior

I installed the addon but my tv cards are not detected. I saw that you mounted in the container as /dev but when I ran the setup no tv cards show up. Drivers are installed on the host and the linuxserver/tvheadend:latest can detect the cards.

Steps to reproduce

Shut down running stand alone container
Install addon
Ran Setup
No tv cards

Proposed changes

I checked the config of the addon container and there the devices are not mapped to the container
7D047BE3-BFFB-487C-97B2-61FE293A4EEE

Maybe the devices are not shared by the /dev mount? This is my stand alone container config. I can share more if you like.
D988926A-0085-4F39-9FCE-32A70C70B5BD

@GauthamVarmaK GauthamVarmaK self-assigned this Nov 1, 2021
@GauthamVarmaK GauthamVarmaK added bug enhancement Enhancement of the code, not introducing new features. labels Nov 1, 2021
GauthamVarmaK added a commit that referenced this issue Nov 1, 2021
@GauthamVarmaK
Copy link
Owner

Thanks for letting me know & Congrats on your first issue here!!

I previously assumed mapping RAW USB into the container should be enough for the DVB Adapters to be accessible from within the container. However, it didn't seem to work (Similar issue: #32). For context, I don't have a DVB Adapter/service.

Addon versions starting with v2.1.0 and above now explicitly mount /dev/dvb/ and /dev/dri/ inside the container. Give it a try and let me know of any issue. Also, feel free to fork it, make changes and open a pull if u wish to make some improvements in general.

@matzingerhh
Copy link
Author

matzingerhh commented Nov 2, 2021

Hi @GauthamVarmaK i updated the addon but the devices are not mounted. Please check my screenshot taken after the the update to 2.1.1
image

GauthamVarmaK added a commit that referenced this issue Nov 3, 2021
@GauthamVarmaK GauthamVarmaK reopened this Nov 3, 2021
@GauthamVarmaK
Copy link
Owner

I made a tiny modification in v2.1.2, could you give it a try and get back?

@github-actions github-actions bot removed the bug label Nov 3, 2021
@matzingerhh
Copy link
Author

Hi unfortunately it is still no device mounted:

image

Maybe mounting /dev / and devices is disturbing the mount of the devices:
image

@GauthamVarmaK
Copy link
Owner

I just discovered all addons mount /dev by default.

Could u run this:

ls -al /dev/dvb /dev/dri
  • Inside the container
  • Outside on the host machine

And send back the result of both?

[Why I am asking for context: If the permissions are not same, apparmor.txt could be the culprit, else some permissions issue within the container, or TVHeadend having some absurd issue connecting or something else]

@matzingerhh
Copy link
Author

sure :-) this is within the container:
image
an this is from host system Debian Bullseye:
image

@github-actions
Copy link

github-actions bot commented Dec 4, 2021

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Dec 4, 2021
@matzingerhh
Copy link
Author

Hey @GauthamVarmaK any news on the issue? Kind regards from Hamburg
Mathias

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Dec 5, 2021
@dbrb2
Copy link

dbrb2 commented Dec 11, 2021

Hmmm....I have just come across this ticket - think I am experiencing exactly the same problem. From the host OS (HA OS) I can see the devices fine, but TVheadend, for some reason, does not detect them

@bruno-dogancic
Copy link

Hey there all, I would like to report this behavior as well. I'm running Home Assistant OS on raspberry Pi 4 B. I have the latest versions of both the OS and the add-on. This is what I get when I run the aforementioned command from the OS (through terminal add-on)

➜  ~ ls -al /dev/dvb /dev/dri
ls: cannot access '/dev/dri': No such file or directory
/dev/dvb:
total 0
drwxr-xr-x  3 root root   60 Dec 30 23:14 .
drwxr-xr-x 19 root root 3980 Dec 30 23:14 ..
drwxr-xr-x  2 root root  120 Dec 30 23:14 adapter0

I am not able to (or don't know how) to access into docker container and run the same command

I have tried

docker pull 835b5c91_tvheadend

But I cannot get inside...

I hope there will be progress on this add-on as it might be the best way for me and many of us to setup multicast tv-server on the same machine that is running HA.

Cheers!

@GauthamVarmaK
Copy link
Owner

GauthamVarmaK commented Jan 2, 2022

I am not 100% sure of the issue, but I suspect it is a permissions issue within the container. Potential fix could be a replication of the permissions model from the linuxserver images.

Also one difference between the linuxserver images and this addon is that here we use a stable packaged version of TVHeadend, v4.28 to be precise, which is old as compared to building it of latest sources like linuxserver images do. But that shouldn't make much of a difference in this case of DVB Adapters.

I am currently busy with my coursework and many other events, and hence unable to spend much time maintaining the addon. Apologies on that front. Anyone who is free/willing to, try copying the permissions model from linuxserver images or any other potential fix, please feel free to star, fork and open a PR!

@GauthamVarmaK GauthamVarmaK added the help-wanted We need some extra helping hands or expertise in order to resolve this. label Jan 2, 2022
@scavara
Copy link

scavara commented Feb 24, 2022

@GauthamVarmaK, you're right. It is a permission issue. I did manage to get it working but (there is always one) in neither secure nor clean way:

Hopefully it is a nudge...

image

@GauthamVarmaK
Copy link
Owner

Thats great news!!

Give full access to hardware like the privileged mode in Docker. Works only for not protected add-ons. Consider using other add-on options instead of this, like devices. If you enable this option, don't add devices, uart, usb or gpio this is not needed

However I want to see if we can narrow down the permissions granted to only those necessary for its operation.

During various versions we had either usb or devices but both didn't work as per few others.

Could you instead try setting privileged with a list of NET_ADMIN, SYS_ADMIN, SYS_RAWIO and check if it works?
[https://developers.home-assistant.io/docs/add-ons/configuration/]

@matzingerhh
Copy link
Author

Hey that’s sounds good.Unfortunately I am not so advanced with the config but I can test. Please let me know if I can assist. Many thanks from Germany

@maody
Copy link

maody commented Mar 31, 2022

Any progress on this issue?

Same problem here: USB DVB Stick is listed in HA tvheadend addon docker container (/dev/dvb/adapter0/), but the addon does not recognize it.

Unfortunately i am not experienced enough to get apply scavaras solution.

@scavara
Copy link

scavara commented Apr 1, 2022

Fwiw, simply because I don't have time to properly test and make PR, here are some diffs. As per @GauthamVarmaK suggestion, I did try privileged setting and it does work as long as addon protection is disabled. Also, with recent HA update, some changes are needed in Dockerfile as well.

config.yaml

17,22d14
< hassio_role: admin
< hassio_api: true
< privileged:
<   - NET_ADMIN
<   - SYS_ADMIN
<   - SYS_RAWIO

Dockerfile

13,14c13,14
<         libxml2-dev=2.9.13-r0 \
<         libxslt-dev=1.1.35-r0 \
---
>         libxml2-dev=2.9.12-r2 \
>         libxslt-dev=1.1.34-r1 \
19c19
<         libxslt=1.1.35-r0 \
---
>         libxslt=1.1.34-r1 \
57d56

@7wells
Copy link

7wells commented Oct 3, 2022

@GauthamVarmaK
Can I maybe contribute/help a bit? I have an AverMedia TD310 DVB-C/T/T2 USB stick which works nicely when connected to my Raspberry Pi 4 as long as it runs Raspberry Pi OS and tvheadend and has these 3 firmware files saved under /lib/firmware/

https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-usb-it9303-01.fw
https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-demod-si2168-02.fw
https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-demod-si2168-b40-01.fw

However, when I use Home Assistant OS and your Tvheadend add-on, the stick is not recognized. First, I would like to know how I can "tail -f" when pluggin it in to see what happens. On plain Raspberry Pi OS, this would be tail -f /var/log/messages. However, on HA OS (despite reading various docu & FAQs), I could not find a way to see anything when plugging the stick in. Therefore, I do not know, if some firmware file(s) is/are missing. If they were, where should I store them, and would the Tvheadend add-on and/or the HA OS recognize them at all?

So far, I cannot setup the Tvheadend add-on with the DVB-C/T/T2 stick, as nothing is shown in the WebGUI config under the DVB inputs/TV adapters.

Thanks for pointing me into the right direction! :)

@weidi
Copy link

weidi commented Nov 1, 2022

@GauthamVarmaK Can I maybe contribute/help a bit? I have an AverMedia TD310 DVB-C/T/T2 USB stick which works nicely when connected to my Raspberry Pi 4 as long as it runs Raspberry Pi OS and tvheadend and has these 3 firmware files saved under /lib/firmware/

https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-usb-it9303-01.fw
https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-demod-si2168-02.fw
https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-demod-si2168-b40-01.fw

However, when I use Home Assistant OS and your Tvheadend add-on, the stick is not recognized. First, I would like to know how I can "tail -f" when pluggin it in to see what happens. On plain Raspberry Pi OS, this would be tail -f /var/log/messages. However, on HA OS (despite reading various docu & FAQs), I could not find a way to see anything when plugging the stick in. Therefore, I do not know, if some firmware file(s) is/are missing. If they were, where should I store them, and would the Tvheadend add-on and/or the HA OS recognize them at all?

So far, I cannot setup the Tvheadend add-on with the DVB-C/T/T2 stick, as nothing is shown in the WebGUI config under the DVB inputs/TV adapters.

Thanks for pointing me into the right direction! :)

I´m digging the same thing with a USB DVB-S2 device. If you use the COMMUNITY SSH & Terminal AddOn you can issue "dmesg" and get your kernel logs.

Mine look like

`dmesg | egrep "firmware|dvb|frontend|usb"

[ 2.701724] usb 1-2.1: New USB device found, idVendor=9022, idProduct=d660, bcdDevice= 0.01
[ 2.701753] usb 1-2.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.717649] usbcore: registered new interface driver btusb`

Looks for me like it is unable to either start a driver or detect the right firmware.

@weidi
Copy link

weidi commented Nov 29, 2022

So, was digging deeper and my Teevi S660 was not loading the driver for the frontend device.
Finally i gave up with this one and switched to a Hauppauge
BTW, HASSOS might not ship with all dvb firmware required so i was only able to get it running on a supervised installation.

@JackoKic
Copy link

Hello.
Does anyone have an idea what is wrong.

from dmesg:

[ 4.349112] dvbdev: DVB: registering new adapter (CXD2880)
[ 4.389547] cxd2880: cxd2880_attach: CXD2880 driver version: Ver 1.4.1 - 1.0.5
[ 4.389701] cxd2880 spi0.0: DVB: registering adapter 0 frontend 0 (Sony CXD2880)...
[ 4.408078] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 4.410180] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 4.417802] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
[ 4.508013] cxd2880_spi: cxd2880_spi_probe: Sony CXD2880 has successfully attached.

and from ls:

[core-ssh ~]$ ls -al /dev/dvb /dev/dri
/dev/dri:
total 0
drwxr-xr-x 3 root root 120 Jun 2 2022 .
drwxr-xr-x 18 root root 4160 Jun 2 2022 ..
drwxr-xr-x 2 root root 100 Dec 16 20:34 by-path
crw-rw---- 1 root netdev 226, 0 Jun 2 2022 card0
crw-rw---- 1 root netdev 226, 1 Dec 16 20:34 card1
crw-rw-rw- 1 root 103 226, 128 Jun 2 2022 renderD128

/dev/dvb:
total 0
drwxr-xr-x 3 root root 60 Jun 2 2022 .
drwxr-xr-x 18 root root 4160 Jun 2 2022 ..
drwxr-xr-x 2 root root 100 Jun 2 2022 adapter0

TvHeadend log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...

Add-on: TVHeadend
TV streaming server and recorder.

Add-on version: 2.3.0
You are running the latest version of this add-on.
System: Home Assistant OS 9.4 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2022.12.6
Home Assistant Supervisor: 2022.11.2

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] customizations.sh: executing...
[cont-init.d] customizations.sh: exited 0.
[cont-init.d] tvheadend.sh: executing...
[08:11:36] INFO: [Webgrab+] Webgrab+ already installed
[08:11:36] INFO: [Webgrab+] Setup completed without errors!!
[cont-init.d] tvheadend.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[08:11:36] INFO: Starting TVHeadend...
2022-12-17 08:11:36.483 [ INFO] main: Log started
2022-12-17 08:11:36.485 [ INFO] http: Starting HTTP server 0.0.0.0:9981
2022-12-17 08:11:36.486 [ INFO] htsp: Starting HTSP server 0.0.0.0:9982
2022-12-17 08:11:36.490 [ INFO] config: loaded
2022-12-17 08:11:36.491 [ INFO] config: scanfile (re)initialization with path
2022-12-17 08:11:37.004 [ INFO] scanfile: DVB-S - loaded 1 regions with 115 networks
2022-12-17 08:11:37.004 [ INFO] scanfile: DVB-T - loaded 44 regions with 1124 networks
2022-12-17 08:11:37.004 [ INFO] scanfile: DVB-C - loaded 19 regions with 64 networks
2022-12-17 08:11:37.004 [ INFO] scanfile: ATSC-T - loaded 2 regions with 12 networks
2022-12-17 08:11:37.004 [ INFO] scanfile: ATSC-C - loaded 1 regions with 5 networks
2022-12-17 08:11:37.004 [ INFO] scanfile: ISDB-T - loaded 2 regions with 1297 networks
2022-12-17 08:11:38.520 [ INFO] dvr: Creating new configuration ''
2022-12-17 08:11:38.525 [ INFO] csa: Using 32bit parallel descrambling
2022-12-17 08:11:38.526 [ INFO] descrambler: adding CAID 2600 as constant crypto-word (BISS)
2022-12-17 08:11:38.526 [ INFO] epggrab: module eit created
2022-12-17 08:11:38.526 [ INFO] epggrab: module uk_freesat created
2022-12-17 08:11:38.526 [ INFO] epggrab: module uk_freeview created
2022-12-17 08:11:38.526 [ INFO] epggrab: module nz_freeview created
2022-12-17 08:11:38.527 [ INFO] epggrab: module viasat_baltic created
2022-12-17 08:11:38.527 [ INFO] epggrab: module Bulsatcom_39E created
2022-12-17 08:11:38.527 [ INFO] epggrab: module psip created
2022-12-17 08:11:38.541 [ INFO] epggrab: module opentv-skyit created
2022-12-17 08:11:38.544 [ INFO] epggrab: module opentv-skyuk created
2022-12-17 08:11:38.545 [ INFO] epggrab: module opentv-skynz created
2022-12-17 08:11:38.545 [ INFO] epggrab: module opentv-ausat created
2022-12-17 08:11:38.547 [ INFO] epggrab: module pyepg created
2022-12-17 08:11:38.547 [ INFO] epggrab: module xmltv created
2022-12-17 08:11:38.551 [ INFO] epgdb: gzip format detected, inflating (ratio 72.3% deflated size 138)
2022-12-17 08:11:38.551 [ INFO] epgdb: parsing 191 bytes
2022-12-17 08:11:38.551 [ INFO] epgdb: loaded v2
2022-12-17 08:11:38.551 [ INFO] epgdb: config 1
2022-12-17 08:11:38.551 [ INFO] epgdb: brands 0
2022-12-17 08:11:38.551 [ INFO] epgdb: seasons 0
2022-12-17 08:11:38.551 [ INFO] epgdb: episodes 0
2022-12-17 08:11:38.551 [ INFO] epgdb: broadcasts 0
2022-12-17 08:11:38.552 [ NOTICE] START: HTS Tvheadend version 4.2.8 started, running as PID:368 UID:0 GID:0, CWD:/run/s6/services/tvheadend CNF:/config/tvheadend

and
no adapter

No adapter in Tvheadend. I use RaspberryPi DVB TV uHAT. On other systems (RaspberyPi OS or Kodi) works fine.

@thatsthat
Copy link

thatsthat commented Jan 4, 2023

I experienced the same issue, and found the solution here:
https://community.home-assistant.io/t/addon-dev-dvb-problem/340528/4

@PePeLLee
Copy link

Just want to let you know that issue is not fixed. Standalone container works, hassio addon dont see adapters

@7wells
Copy link

7wells commented Mar 26, 2023

@weidi @GauthamVarmaK
Please consider my post over there:
home-assistant/operating-system#1157 (comment)

How can I ensure that the necessary drivers remain in /lib/firmware/ after a system restart? Without these drivers, TVHeadend does not detect my DVB-C/T2 USB stick plugged to a Raspberry Pi 4 running a standard Home Assistant installation with the TVHeadend addon. Any help is very much appreciated. Thank you!

PS: Does this help?
home-assistant/operating-system#2222 (comment)
A permanent solution to be able to have drivers stored in /lib/firmware would be great, but that seems to be something beyond the TVHeadend addon.

@maikthulhu
Copy link

maikthulhu commented Jul 25, 2023

@7wells I've seen your struggles around the different issue trackers/forums as I have been fighting this myself. As I was poking around and found my way into the host filesystem, I saw there was a broken symlink at /lib/firmware/updates which points to /mnt/data/supervisor/firmware/. I accessed the supervisor container, created /data/firmware/ and copied a missing firmware file into it (v4l-cx231xx-avcore-01.fw), and saw the symlink was no longer broken. When I re-plugged my USB adapter and checked dmesg, I saw it picks up the file.

So that sounds like a good solution to get firmware files into place, but since it comes from a container's filesystem, it probably(?) won't work until the host is up, then the container comes up, and then the USB device is hotplugged.

Regarding the devices being inaccessible within the container, I'm still experiencing that while using the addon. When I shell into the tvheadend container, I can see /dev/dvb/adapter0/ and devices underneath it, but all attempts to access the devices gives me permission denied. If I access the same devices from the host, no permission denied. This doesn't really add much since we know it appears to be a container permissions issue, but is there a nice/easy way to change permissions to test the currently running add-on without having to clone the repo and build myself?

@maikthulhu
Copy link

After reading the comments again I see what others mentioned: explicitly listing each device under /dev/dvb/adapter0/ (so dvr0, demux0, frontend0, net0) in the devices section was the only change I needed to make to config.yaml. The Dockerfile needed some massaging for dependencies, but there were no extra permissions needed to grant to the add-on.

The obvious problem is we probably can't guess every combination of every adapter combo. I tried permutations using wildcards, etc, but no dice. Is there another, nicer solution?

@LuckyLuckeCZ
Copy link

Hello @GauthamVarmaK ,
I had the same issue and tvheadent dont showed my TV adapter (Raspberry Pi TV HAT)
In the system I saw adapter mounted:
/dev/dvb/adapter0/demux0
/dev/dvb/adapter0/dvr0
/dev/dvb/adapter0/frontend0

and in the Tvheadent nothing.

After reading the comments I tryed change file config.yaml for Tvheadend.
From
devices:

  • /dev/dvb
  • /dev/dri

To
devices:

  • /dev/dvb/adapter0/demux0
  • /dev/dvb/adapter0/dvr0
  • /dev/dvb/adapter0/frontend0
  • /dev/dvb/adapter0/net0

And all seems good, I see TV adapter and all works fine.

My questions is:
Do you can add this devices to the config.yaml or maybe best solution is add the ability to the change options in the addons configuration on Home Assitant?
Same as system_packages and init_commands in Addons configuration.
After that each user will be able to chaged name driver setting easly.

Thank you

@jonagi
Copy link

jonagi commented Oct 12, 2023

Hello @GauthamVarmaK , I had the same issue and tvheadent dont showed my TV adapter (Raspberry Pi TV HAT) In the system I saw adapter mounted: /dev/dvb/adapter0/demux0 /dev/dvb/adapter0/dvr0 /dev/dvb/adapter0/frontend0

and in the Tvheadent nothing.

After reading the comments I tryed change file config.yaml for Tvheadend. From devices:

  • /dev/dvb
  • /dev/dri

To devices:

  • /dev/dvb/adapter0/demux0
  • /dev/dvb/adapter0/dvr0
  • /dev/dvb/adapter0/frontend0
  • /dev/dvb/adapter0/net0

And all seems good, I see TV adapter and all works fine.

My questions is: Do you can add this devices to the config.yaml or maybe best solution is add the ability to the change options in the addons configuration on Home Assitant? Same as system_packages and init_commands in Addons configuration. After that each user will be able to chaged name driver setting easly.

Thank you

How can I change the config.yaml in home assistant OS(supervisor)?
Thanks

@LuckyLuckeCZ
Copy link

Hello @GauthamVarmaK , I had the same issue and tvheadent dont showed my TV adapter (Raspberry Pi TV HAT) In the system I saw adapter mounted: /dev/dvb/adapter0/demux0 /dev/dvb/adapter0/dvr0 /dev/dvb/adapter0/frontend0
and in the Tvheadent nothing.
After reading the comments I tryed change file config.yaml for Tvheadend. From devices:

  • /dev/dvb
  • /dev/dri

To devices:

  • /dev/dvb/adapter0/demux0
  • /dev/dvb/adapter0/dvr0
  • /dev/dvb/adapter0/frontend0
  • /dev/dvb/adapter0/net0

And all seems good, I see TV adapter and all works fine.
My questions is: Do you can add this devices to the config.yaml or maybe best solution is add the ability to the change options in the addons configuration on Home Assitant? Same as system_packages and init_commands in Addons configuration. After that each user will be able to chaged name driver setting easly.
Thank you

How can I change the config.yaml in home assistant OS(supervisor)? Thanks

Hello @jonagi ,
I have tried to do different changes, but after I restarted hassio, the configuration was the same as before changes.

How you can do it, the easiest way is:

  1. first, install Tvheadent from repository:
    https://github.com/GauthamVarmaK/addon-tvheadend
    and do first run. All updates will be downloaded and installed.

  2. than remove Tvheadent and install again from this repository: https://github.com/marious1985/hassio-addons
    Now there is DVB adapter in Tvheadent. (DVB adapter have to installed drivers)

The first step is important, the second repository doesn't download updates.

Second repository have different config.yaml:

/dev/dvb/adapter0/demux0
/dev/dvb/adapter0/dvr0
/dev/dvb/adapter0/frontend0
/dev/dvb/adapter0/net0

I hope the config will be fixed and I will be able to use the original repository in the future.

@7wells
Copy link

7wells commented Dec 3, 2023

Hello!

Is there any progress? I have the same problem, i.e. the device shows up in warm state but does not show up in tvheadend's GUI.

The config.yaml mentioned in this issue - where is it located?

Is there some script available that could automate the necessary steps to make it work? Does this script need to be stored via ssh port 22222 (i.e. the underlying system)?

PS:

# ls -al /dev/dvb /dev/dri
/dev/dri:
total 0
drwxr-xr-x    3 root     root           120 Apr  4  2023 .
drwxr-xr-x   17 root     root          4040 Dec  3 07:38 ..
drwxr-xr-x    2 root     root           100 Apr  4  2023 by-path
crw-rw----    1 root     video     226,   0 Apr  4  2023 card0
crw-rw----    1 root     video     226,   1 Apr  4  2023 card1
crw-rw-rw-    1 root     render    226, 128 Apr  4  2023 renderD128

/dev/dvb:
total 0
drwxr-xr-x    3 root     root            60 Dec  3 07:38 .
drwxr-xr-x   17 root     root          4040 Dec  3 07:38 ..
drwxr-xr-x    2 root     root           120 Dec  3 07:38 adapter0

# ls -al /dev/dri/by-path/
total 0
drwxr-xr-x    2 root     root           100 Apr  4  2023 .
drwxr-xr-x    3 root     root           120 Apr  4  2023 ..
lrwxrwxrwx    1 root     root             8 Apr  4  2023 platform-fec00000.v3d-card -> ../card0
lrwxrwxrwx    1 root     root            13 Apr  4  2023 platform-fec00000.v3d-render -> ../renderD128
lrwxrwxrwx    1 root     root             8 Apr  4  2023 platform-gpu-card -> ../card1

# ls -al /dev/dvb/adapter0/
total 0
drwxr-xr-x    2 root     root           120 Dec  3 07:38 .
drwxr-xr-x    3 root     root            60 Dec  3 07:38 ..
crw-rw----    1 root     video     212,   0 Dec  3 07:38 demux0
crw-rw----    1 root     video     212,   1 Dec  3 07:38 dvr0
crw-rw----    1 root     video     212,   3 Dec  3 07:38 frontend0
crw-rw----    1 root     video     212,   2 Dec  3 07:38 net0

@7wells
Copy link

7wells commented Dec 3, 2023

Hello @LuckyLuckeCZ

Did you directly edit this file ...
/mnt/data/supervisor/addons/git/835b5c91/tvheadend/config.yaml
... or was anything else necessary?

I only replaced the lines ...

- /dev/dvb
- /dev/dri

... by these lines ...

- /dev/dvb/adapter0/demux0
- /dev/dvb/adapter0/dvr0
- /dev/dvb/adapter0/frontend0
- /dev/dvb/adapter0/net0
- /dev/dri

I restarted the whole system, and the log shows me that my DVB-T2 USB stick is in warm state. However, it still does not show up in the WebGUI of tvheadend.

Thanks a lot for your help! ❤️

@7wells
Copy link

7wells commented Dec 3, 2023

After reading the comments again I see what others mentioned: explicitly listing each device under /dev/dvb/adapter0/ (so dvr0, demux0, frontend0, net0) in the devices section was the only change I needed to make to config.yaml. The Dockerfile needed some massaging for dependencies, but there were no extra permissions needed to grant to the add-on.

The obvious problem is we probably can't guess every combination of every adapter combo. I tried permutations using wildcards, etc, but no dice. Is there another, nicer solution?

Hello!

Would you mind sharing your config.yaml? And please also its full path, so I can see if mine is correct at all. Thank you so much! ❤️

My config.yaml is under the following path:
/mnt/data/supervisor/addons/git/835b5c91/tvheadend/config.yaml

Its content is this:

arch:
- aarch64
- amd64
- armhf
- armv7
- i386
description: TV streaming server and recorder.
devices:
- /dev/dvb/adapter0/demux0
- /dev/dvb/adapter0/dvr0
- /dev/dvb/adapter0/frontend0
- /dev/dvb/adapter0/net0
- /dev/dri
image: ghcr.io/gauthamvarmak/tvheadend/{arch}
init: false
map:
- config:rw
name: TVHeadend
options:
  init_commands: []
  system_packages: []
ports:
  9981/tcp: 9981
  9982/tcp: 9982
ports_description:
  9981/tcp: TVH Web Interface
  9982/tcp: TVH HTSP
schema:
  init_commands:
  - str
  system_packages:
  - str
slug: tvheadend
stage: experimental
url: https://github.com/GauthamVarmaK/addon-tvheadend
version: 2.4.4
webui: http://[HOST]:[PORT:9981]/

However, my DVB-T2 USB stick still does not show up in tvheadend's webGUI (despite the device shows up in warm state according to the system log, i.e. the firmware is correctly loaded).

Any further help is very much appreciated! 🤗

@LuckyLuckeCZ
Copy link

Hello @7wells ,
original Tvheadend from GauthamVarmaK have a problem with names of adapters and Tvheadend adapters are no visible.
When I tried to do any change in config file, after reboot it was the same as before.

Try use this steps
#45 (comment)
and after install use Tvheadend from marious1985.
https://github.com/marious1985/hassio-addons

This worked for me.

@7wells
Copy link

7wells commented Dec 3, 2023

It does not help me, unfortunately. I deinstalled tvheadend from the repo of @GauthamVarmaK and (without restart of HA between) then installed tvheadend from the repo of @marious1985. The WebGUI entry for devices is still empty. 🤔

By the way, marious1985's code is 77 commits behind GauthamVarmaK:main and shows 7 Dependabot's PRs, 5 of them with unsuccessful checks, and the remaining 2 with no feedback from the author, i.e. marious1985.

I wish there was a clean solution within GauthamVarmaK's repo. 🙏

@maody
Copy link

maody commented Dec 7, 2023

@7wells:

Today i installed your fork after installing/uninstalling GauthamVarmaK original. After a restart of HA my DVB-C Stick is finally showing and working in Home Assistant. But i think there is another issue: The Sat>IPServer of Tvheadend is not accessible from outside of the HA Container.

2023-12-07 21:50:10.827 [ INFO] satips: SAT>IP Server reinitialized
2023-12-07 21:50:10.827 [ INFO] satips: HTTP 172.30.33.9:9981, RTSP 172.30.33.9:554
2023-12-07 21:50:10.827 [ INFO] satips: descramble 1, muxcnf 0
2023-12-07 21:50:10.827 [ INFO] satips: tuner[fe=1]: DVB-C #1

I think the config.yaml needs another 554/tcp: 554 statement?

@7wells
Copy link

7wells commented Dec 11, 2023

@GauthamVarmaK
Can you please comment on this? Thank you! ❤️

@7wells
Copy link

7wells commented Dec 11, 2023

PS: Even after following the work-around, i.e. deinstalling this and installing that other tvheadend repo, the card still does not show up in the WebGUI.

@7wells
Copy link

7wells commented Dec 12, 2023

@LuckyLuckeCZ

  1. first, install Tvheadent from repository:
    https://github.com/GauthamVarmaK/addon-tvheadend
    and do first run. All updates will be downloaded and installed.

Sorry to bother you again. By "... do first run" you mean

  • only starting the add-on and watching the protocol to see if everything is downloaded and updated (networks, alpine packages etc.) and then deinstall and reinstall from the other repo,
  • or before deinstalling also going to the web frontend and starting an initial setup?

@7wells
Copy link

7wells commented Dec 12, 2023

I tried both:

  1. installed from original repo, started add-on, waited until it downloaded and updated, deinstalled add-on, and installed it from fork
  2. installed from original repo, started add-on, waited until it downloaded and updated, went to web GUI, started initial setup, exited web GUI, deinstalled add-on, and installed it from fork

Either way, no DVB card identified, despite its detected as the log (dmesg) tells me ("in warm state" after loading firmware):

dvb_usb_af9035 1-1.1:1.0: prechip_version=83 chip_version=01 chip_type=9306
usb 1-1.1: dvb_usb_v2: found a 'AVerMedia TD310 DVB-T2' in cold state
usb 1-1.1: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9303-01.fw'
dvb_usb_af9035 1-1.1:1.0: firmware version=1.4.0.0
usb 1-1.1: dvb_usb_v2: found a 'AVerMedia TD310 DVB-T2' in warm state
usb 1-1.1: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
dvbdev: DVB: registering new adapter (AVerMedia TD310 DVB-T2)
dvbdev: dvb_create_media_entity: media entity 'dvb-demux' registered.
dvbdev: dvb_create_media_entity: media entity 'Silicon Labs Si2168' registered.
usb 1-1.1: dvb_usb_v2: 'AVerMedia TD310 DVB-T2' successfully initialized and connected

Any further hints and help are very much appreciated! ❤️

@LuckyLuckeCZ
Copy link

Hello @7wells ,
after the first run tvheadend from GauthamVarmaK is created folder /config/tvheadend with basic setting. You can try to rename(backup) or delete this folder. After the next run, it will be created again with a clean configuration. In this step, you can create a user and other settings, but the TVtuner will not be visible.

After uninstalling tvheadend (folder /config/tvheadend was should have preserved otherwise tvheadend cannot be run), install and run tvheadend from repository marious1985 adapter should visible now.

I tryed also TV tuner from AVerMedia TD310 first, but I had a problem with installing drivers and it was in a cold state. Now I use Raspberry Pi TV HAT, and all is OK.

When you have your AVerMedia TD310 in a warm state and if the DVB interface is named

ls /dev/dvb/adapter0

/dev/dvb/adapter0/demux0
/dev/dvb/adapter0/dvr0
/dev/dvb/adapter0/frontend0

The tuner should be visible in tvheadend from marious1985.

@7wells
Copy link

7wells commented Dec 17, 2023

Hi @LuckyLuckeCZ,

It seems that my device does not show up anymore under /dev. Two weeks ago, I saw this (which looked ok and should still be like this now, I guess):

# ls -al /dev/dvb /dev/dri
/dev/dri:
total 0
drwxr-xr-x    3 root     root           120 Apr  4  2023 .
drwxr-xr-x   17 root     root          4040 Dec  3 07:38 ..
drwxr-xr-x    2 root     root           100 Apr  4  2023 by-path
crw-rw----    1 root     video     226,   0 Apr  4  2023 card0
crw-rw----    1 root     video     226,   1 Apr  4  2023 card1
crw-rw-rw-    1 root     render    226, 128 Apr  4  2023 renderD128

/dev/dvb:
total 0
drwxr-xr-x    3 root     root            60 Dec  3 07:38 .
drwxr-xr-x   17 root     root          4040 Dec  3 07:38 ..
drwxr-xr-x    2 root     root           120 Dec  3 07:38 adapter0

# ls -al /dev/dri/by-path/
total 0
drwxr-xr-x    2 root     root           100 Apr  4  2023 .
drwxr-xr-x    3 root     root           120 Apr  4  2023 ..
lrwxrwxrwx    1 root     root             8 Apr  4  2023 platform-fec00000.v3d-card -> ../card0
lrwxrwxrwx    1 root     root            13 Apr  4  2023 platform-fec00000.v3d-render -> ../renderD128
lrwxrwxrwx    1 root     root             8 Apr  4  2023 platform-gpu-card -> ../card1

# ls -al /dev/dvb/adapter0/
total 0
drwxr-xr-x    2 root     root           120 Dec  3 07:38 .
drwxr-xr-x    3 root     root            60 Dec  3 07:38 ..
crw-rw----    1 root     video     212,   0 Dec  3 07:38 demux0
crw-rw----    1 root     video     212,   1 Dec  3 07:38 dvr0
crw-rw----    1 root     video     212,   3 Dec  3 07:38 frontend0
crw-rw----    1 root     video     212,   2 Dec  3 07:38 net0

However, now I only get this:

# ls -al /dev/dvb /dev/dri
ls: /dev/dvb: No such file or directory
/dev/dri:
total 0
drwxr-xr-x    3 root     root           120 Apr  4  2023 .
drwxr-xr-x   16 root     root          3960 Dec 17 18:57 ..
drwxr-xr-x    2 root     root           100 Apr  4  2023 by-path
crw-rw----    1 root     netdev    226,   0 Apr  4  2023 card0
crw-rw----    1 root     netdev    226,   1 Apr  4  2023 card1
crw-rw-rw-    1 root     plugdev   226, 128 Apr  4  2023 renderD128

I have no clue why /dev/dvb/ does not exist anymore. 🤔 I haven't changed anything since then.

@7wells
Copy link

7wells commented Dec 17, 2023

After a reboot of my Raspberry Pi 4 that runs Home Assistant, it's back again:

ls -al /dev/dvb /dev/dri
/dev/dri:
total 0
drwxr-xr-x    3 root     root           120 Apr  4  2023 .
drwxr-xr-x   17 root     root          4040 Apr  4  2023 ..
drwxr-xr-x    2 root     root           100 Apr  4  2023 by-path
crw-rw----    1 root     netdev    226,   0 Apr  4  2023 card0
crw-rw----    1 root     netdev    226,   1 Apr  4  2023 card1
crw-rw-rw-    1 root     plugdev   226, 128 Apr  4  2023 renderD128

/dev/dvb:
total 0
drwxr-xr-x    3 root     root            60 Apr  4  2023 .
drwxr-xr-x   17 root     root          4040 Apr  4  2023 ..
drwxr-xr-x    2 root     root           120 Apr  4  2023 adapter0

But after about 10 seconds later, it's gone again:

ls -al /dev/dvb /dev/dri
ls: /dev/dvb: No such file or directory
/dev/dri:
total 0
drwxr-xr-x    3 root     root           120 Apr  4  2023 .
drwxr-xr-x   16 root     root          3960 Dec 17 19:17 ..
drwxr-xr-x    2 root     root           100 Apr  4  2023 by-path
crw-rw----    1 root     netdev    226,   0 Apr  4  2023 card0
crw-rw----    1 root     netdev    226,   1 Apr  4  2023 card1
crw-rw-rw-    1 root     plugdev   226, 128 Apr  4  2023 renderD128

WTH?! 🫢

@7wells
Copy link

7wells commented Dec 17, 2023

@LuckyLuckeCZ

After unplugging and replugging it, it's visible again. Maybe the problem is connected with what was described there: home-assistant/operating-system#1157 (comment)

So now I see this, like you posted in #45 (comment)

ls -al /dev/dvb/adapter0
total 0
drwxr-xr-x    2 root     root           120 Dec 17 19:42 .
drwxr-xr-x    3 root     root            60 Dec 17 19:42 ..
crw-rw----    1 root     netdev    212,   0 Dec 17 19:42 demux0
crw-rw----    1 root     netdev    212,   1 Dec 17 19:42 dvr0
crw-rw----    1 root     netdev    212,   3 Dec 17 19:42 frontend0
crw-rw----    1 root     netdev    212,   2 Dec 17 19:42 net0

Hooray - it's visible in the GUI now, too! 😀👍

grafik

Thanks a lot to @LuckyLuckeCZ and everybody else in this thread for your patience and help. ❤️

@obert0
Copy link

obert0 commented Feb 10, 2024

Hi everyone,
I try to fork the project to repair the bug see in this topic and add COMSKIP and network drive mapping in this project.
But for the moment I have some problem with my tuner doesn't show up in TvHeadend. I have a Hauppauge WINTV 950Q and I figured the firmware isn't in the Kernel. So as I see in GitHub and thanks to @7wells I enter in the HAOS in SSH to the port 22222 and add "firmware_class.path=/mnt/data/supervisor/share/firmware" in "/mnt/boot/cmdline.txt". I download the firmware and put it in "/share/firmware" with the ssh addon. Now on HAOS startup, the firmware is in place and TvHeadend start on boot. After boot I can't see the tuner in TvHeadend. This is the Kernel logs:

[ 1.798495] snd_hda_codec_realtek hdaudioC0D2: autoconfig for ALC662 rev3: line_outs=1 (0x15/0x0/0x0/0x0/0x0) type:speaker

[ 1.798503] snd_hda_codec_realtek hdaudioC0D2: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 1.798506] snd_hda_codec_realtek hdaudioC0D2: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[ 1.798509] snd_hda_codec_realtek hdaudioC0D2: mono: mono_out=0x0
[ 1.798511] snd_hda_codec_realtek hdaudioC0D2: inputs:
[ 1.798513] snd_hda_codec_realtek hdaudioC0D2: Mic=0x19
[ 1.802459] au0828: i2c bus registered
[ 1.859720] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input3
[ 1.861332] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input4
[ 1.861405] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input5
[ 1.911797] tveeprom: Hauppauge model 72001, rev B3F0, serial# 4034595432
[ 1.911804] tveeprom: MAC address is 00:0d:fe:7b:0a:68
[ 1.911807] tveeprom: tuner model is Xceive XC5000 (idx 150, type 76)
[ 1.911809] tveeprom: TV standards NTSC(M) ATSC/DVB Digital (eeprom 0x88)
[ 1.911812] tveeprom: audio processor is AU8522 (idx 44)
[ 1.911814] tveeprom: decoder processor is AU8522 (idx 42)
[ 1.911815] tveeprom: has no radio, has IR receiver, has no IR transmitter
[ 1.911817] au0828: hauppauge_eeprom: hauppauge eeprom: model=72001
[ 1.914875] au8522 9-0047: creating new instance
[ 1.914879] au8522_decoder creating new instance...
[ 1.918812] tuner: 9-0061: Tuner -1 found with type(s) Radio TV.
[ 1.918832] xc5000 9-0061: creating new instance
[ 1.923706] xc5000: Successfully identified at address 0x61
[ 1.923710] xc5000: Firmware has not been loaded previously
[ 1.964245] EXT4-fs (sda8): mounted filesystem with ordered data mode. Quota mode: none.
[ 1.982879] EXT4-fs (sda8): resizing filesystem from 58429329 to 58429329 blocks
[ 2.016345] Adding 2627988k swap on /mnt/data/swapfile. Priority:-2 extents:92 across:192290816k SSFS
[ 2.020457] EXT4-fs (zram2): mounted filesystem without journal. Quota mode: none.
[ 2.078602] systemd-journald[133]: Received client request to flush runtime journal.
[ 2.226062] au8522 9-0047: attaching existing instance
[ 2.229806] xc5000 9-0061: attaching existing instance
[ 2.234675] xc5000: Successfully identified at address 0x61
[ 2.234680] xc5000: Firmware has not been loaded previously
[ 2.234683] dvbdev: DVB: registering new adapter (au0828)
[ 2.234689] usb 2-1.3.1: DVB: registering adapter 0 frontend 0 (Auvitek AU8522 QAM/8VSB Frontend)...
[ 2.234700] dvbdev: dvb_create_media_entity: media entity 'Auvitek AU8522 QAM/8VSB Frontend' registered.
[ 2.234989] dvbdev: dvb_create_media_entity: media entity 'dvb-demux' registered.
[ 2.235302] au0828: Registered device AU0828 [Hauppauge HVR950Q]
[ 2.235362] usbcore: registered new interface driver au0828
[ 2.245657] usbcore: registered new interface driver snd-usb-audio
[ 2.298359] au0828: Enabled Source: Xceive XC5000->au8522 9-0047->au0828a vbi Ret 0
[ 2.298482] au0828: Disabled Source: Xceive XC5000->au8522 9-0047->au0828a vbi Ret 0
[ 2.362222] audit: type=1334 audit(1707593858.297:4): prog-id=8 op=LOAD
[ 2.979317] audit: type=1334 audit(1707593858.914:5): prog-id=9 op=LOAD
[ 2.979451] audit: type=1334 audit(1707593858.914:6): prog-id=10 op=LOAD
[ 2.979500] audit: type=1334 audit(1707593858.915:7): prog-id=11 op=LOAD
`

Now if I unplugged and replugged the tunner I can see it in TVHeadend, but it is not usable. When I try to use it more line

usb 2-1.3.1L Tuner is busy. Error -16
appear. Here the Kernel logs:

[ 600.085231] usb 2-1.3: USB disconnect, device number 3

[ 600.085236] usb 2-1.3.1: USB disconnect, device number 5
[ 600.085981] usb 2-1.3.1: cannot submit urb (err = -19)
[ 600.086592] au8522 9-0047: destroying instance
[ 600.086666] xc5000 9-0061: destroying instance
[ 603.328945] usb 2-1.3: new high-speed USB device number 6 using ehci-pci
[ 603.408990] usb 2-1.3: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice= 7.02
[ 603.408995] usb 2-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 603.408997] usb 2-1.3: Product: USB2.0 Hub
[ 603.409544] hub 2-1.3:1.0: USB hub found
[ 603.409959] hub 2-1.3:1.0: 4 ports detected
[ 603.686935] usb 2-1.3.1: new high-speed USB device number 7 using ehci-pci
[ 603.765363] usb 2-1.3.1: config 1 interface 0 altsetting 0 endpoint 0x81 has invalid wMaxPacketSize 0
[ 603.787738] usb 2-1.3.1: New USB device found, idVendor=2040, idProduct=7200, bcdDevice= 0.05
[ 603.787742] usb 2-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=10
[ 603.787743] usb 2-1.3.1: Product: WinTV HVR-950
[ 603.787745] usb 2-1.3.1: Manufacturer: Hauppauge
[ 603.787746] usb 2-1.3.1: SerialNumber: 4034595432
[ 604.149982] au0828: i2c bus registered
[ 604.247326] tveeprom: Hauppauge model 72001, rev B3F0, serial# 4034595432
[ 604.247331] tveeprom: MAC address is 00:0d:fe:7b:0a:68
[ 604.247332] tveeprom: tuner model is Xceive XC5000 (idx 150, type 76)
[ 604.247333] tveeprom: TV standards NTSC(M) ATSC/DVB Digital (eeprom 0x88)
[ 604.247335] tveeprom: audio processor is AU8522 (idx 44)
[ 604.247336] tveeprom: decoder processor is AU8522 (idx 42)
[ 604.247336] tveeprom: has no radio, has IR receiver, has no IR transmitter
[ 604.247337] au0828: hauppauge_eeprom: hauppauge eeprom: model=72001
[ 604.249051] au8522 9-0047: creating new instance
[ 604.249055] au8522_decoder creating new instance...
[ 604.251769] tuner: 9-0061: Tuner -1 found with type(s) Radio TV.
[ 604.251799] xc5000 9-0061: creating new instance
[ 604.256699] xc5000: Successfully identified at address 0x61
[ 604.256702] xc5000: Firmware has not been loaded previously
[ 604.538997] au8522 9-0047: attaching existing instance
[ 604.542977] xc5000 9-0061: attaching existing instance
[ 604.547822] xc5000: Successfully identified at address 0x61
[ 604.547823] xc5000: Firmware has not been loaded previously
[ 604.547824] dvbdev: DVB: registering new adapter (au0828)
[ 604.547827] usb 2-1.3.1: DVB: registering adapter 0 frontend 0 (Auvitek AU8522 QAM/8VSB Frontend)...
[ 604.547831] dvbdev: dvb_create_media_entity: media entity 'Auvitek AU8522 QAM/8VSB Frontend' registered.
[ 604.548330] dvbdev: dvb_create_media_entity: media entity 'dvb-demux' registered.
[ 604.548749] au0828: Registered device AU0828 [Hauppauge HVR950Q]
[ 604.612512] au0828: Enabled Source: Xceive XC5000->au8522 9-0047->au0828a video Ret 0
[ 604.612648] au0828: Disabled Source: Xceive XC5000->au8522 9-0047->au0828a video Ret 0
[ 606.564413] kauditd_printk_skb: 163 callbacks suppressed
[ 606.564416] audit: type=1334 audit(1707594463.438:573): prog-id=139 op=LOAD
[ 606.564606] audit: type=1334 audit(1707594463.438:574): prog-id=89 op=UNLOAD
[ 606.565084] audit: type=1334 audit(1707594463.439:575): prog-id=140 op=LOAD
[ 606.565095] audit: type=1300 audit(1707594463.439:575): arch=c000003e syscall=321 success=yes exit=12 a0=5 a1=c0001382b8 a2=78 a3=0 items=0 ppid=210 pid=14006 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="runc" exe="/usr/bin/runc" subj=unconfined key=(null)
[ 606.565099] audit: type=1327 audit(1707594463.439:575): proctitle=72756E63002D2D726F6F74002F7661722F72756E2F646F636B65722F72756E74696D652D72756E632F6D6F62792F00757064617465002D2D7265736F7572636573002D00366264333762303732333532623934316263376466306135616362646538646534633338366132666266373536373963363763336666633535333038
[ 606.565153] audit: type=1334 audit(1707594463.439:576): prog-id=141 op=LOAD
[ 606.565163] audit: type=1300 audit(1707594463.439:576): arch=c000003e syscall=321 success=yes exit=14 a0=5 a1=c000138050 a2=78 a3=0 items=0 ppid=210 pid=14006 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="runc" exe="/usr/bin/runc" subj=unconfined key=(null)
[ 606.565167] audit: type=1327 audit(1707594463.439:576): proctitle=72756E63002D2D726F6F74002F7661722F72756E2F646F636B65722F72756E74696D652D72756E632F6D6F62792F00757064617465002D2D7265736F7572636573002D00366264333762303732333532623934316263376466306135616362646538646534633338366132666266373536373963363763336666633535333038
[ 606.565172] audit: type=1334 audit(1707594463.439:577): prog-id=141 op=UNLOAD
[ 606.565224] audit: type=1334 audit(1707594463.439:578): prog-id=140 op=UNLOAD
[ 606.623800] au0828: Enabled Source: Xceive XC5000->au8522 9-0047->USB Audio Ret 0
[ 606.627160] au0828: Disabled Source: Xceive XC5000->au8522 9-0047->USB Audio Ret 0
[ 606.627704] au0828: Enabled Source: Xceive XC5000->au8522 9-0047->USB Audio Ret 0
[ 606.627900] au0828: Disabled Source: Xceive XC5000->au8522 9-0047->USB Audio Ret 0
[ 606.632636] au0828: Enabled Source: Xceive XC5000->au8522 9-0047->USB Audio Ret 0
[ 607.755054] xc5000: Firmware dvb-fe-xc5000-1.6.114.fw loaded and running.
[ 607.756338] usb 2-1.3.1: DVB: adapter 0 frontend 0 frequency 0 out of range (54000000..858000000)
[ 607.757372] usb 2-1.3.1: Tuner is busy. Error -16
[ 669.479407] usb 2-1.3.1: Tuner is busy. Error -16
[ 673.484406] usb 2-1.3.1: Tuner is busy. Error -16

Now if I remove the firmware from the folder and unplugged/replugged the tunner I can still see it in TVHeadend, but it is not usable. When I try to use it more line:

usb 2-1.3.1: Direct firmware load for dvb-fe-xc5000-1.6.114.fw failed with error -2
xc5000: Upload failed. rc -2
appear. Here the Kernel logs:

[ 947.574731] retire_capture_urb: 46 callbacks suppressed

[ 947.730988] usb 2-1.3: USB disconnect, device number 6
[ 947.730995] usb 2-1.3.1: USB disconnect, device number 7
[ 947.731695] usb 2-1.3.1: cannot submit urb (err = -19)
[ 947.733606] au8522 9-0047: destroying instance
[ 947.733657] xc5000 9-0061: destroying instance
[ 950.207160] usb 2-1.3: new high-speed USB device number 8 using ehci-pci
[ 950.287220] usb 2-1.3: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice= 7.02
[ 950.287229] usb 2-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 950.287232] usb 2-1.3: Product: USB2.0 Hub
[ 950.287969] hub 2-1.3:1.0: USB hub found
[ 950.288433] hub 2-1.3:1.0: 4 ports detected
[ 950.564136] usb 2-1.3.1: new high-speed USB device number 9 using ehci-pci
[ 950.642596] usb 2-1.3.1: config 1 interface 0 altsetting 0 endpoint 0x81 has invalid wMaxPacketSize 0
[ 950.664965] usb 2-1.3.1: New USB device found, idVendor=2040, idProduct=7200, bcdDevice= 0.05
[ 950.664973] usb 2-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=10
[ 950.664976] usb 2-1.3.1: Product: WinTV HVR-950
[ 950.664979] usb 2-1.3.1: Manufacturer: Hauppauge
[ 950.664981] usb 2-1.3.1: SerialNumber: 4034595432
[ 951.026244] au0828: i2c bus registered
[ 951.123545] tveeprom: Hauppauge model 72001, rev B3F0, serial# 4034595432
[ 951.123553] tveeprom: MAC address is 00:0d:fe:7b:0a:68
[ 951.123556] tveeprom: tuner model is Xceive XC5000 (idx 150, type 76)
[ 951.123558] tveeprom: TV standards NTSC(M) ATSC/DVB Digital (eeprom 0x88)
[ 951.123561] tveeprom: audio processor is AU8522 (idx 44)
[ 951.123563] tveeprom: decoder processor is AU8522 (idx 42)
[ 951.123564] tveeprom: has no radio, has IR receiver, has no IR transmitter
[ 951.123566] au0828: hauppauge_eeprom: hauppauge eeprom: model=72001
[ 951.125338] au8522 9-0047: creating new instance
[ 951.125345] au8522_decoder creating new instance...
[ 951.128402] tuner: 9-0061: Tuner -1 found with type(s) Radio TV.
[ 951.128441] xc5000 9-0061: creating new instance
[ 951.133294] xc5000: Successfully identified at address 0x61
[ 951.133299] xc5000: Firmware has not been loaded previously
[ 951.415778] au8522 9-0047: attaching existing instance
[ 951.419547] xc5000 9-0061: attaching existing instance
[ 951.424443] xc5000: Successfully identified at address 0x61
[ 951.424449] xc5000: Firmware has not been loaded previously
[ 951.424451] dvbdev: DVB: registering new adapter (au0828)
[ 951.424455] usb 2-1.3.1: DVB: registering adapter 0 frontend 0 (Auvitek AU8522 QAM/8VSB Frontend)...
[ 951.424464] dvbdev: dvb_create_media_entity: media entity 'Auvitek AU8522 QAM/8VSB Frontend' registered.
[ 951.425493] dvbdev: dvb_create_media_entity: media entity 'dvb-demux' registered.
[ 951.426994] au0828: Registered device AU0828 [Hauppauge HVR950Q]
[ 951.437288] usb 2-1.3.1: Direct firmware load for dvb-fe-xc5000-1.6.114.fw failed with error -2
[ 951.437295] xc5000: Upload failed. rc -2
[ 951.437477] xc5000: Unable to initialise tuner
[ 951.438933] usb 2-1.3.1: DVB: adapter 0 frontend 0 frequency 0 out of range (54000000..858000000)
[ 951.439195] au0828: Enabled Source: Xceive XC5000->Auvitek AU8522 QAM/8VSB Frontend->Auvitek AU8522 QAM/8VSB Frontend Ret 0
[ 951.454317] usb 2-1.3.1: Direct firmware load for dvb-fe-xc5000-1.6.114.fw failed with error -2
[ 951.454323] xc5000: Upload failed. rc -2
[ 951.454518] xc5000: Unable to initialise tuner
[ 953.449495] kauditd_printk_skb: 148 callbacks suppressed
[ 953.449498] audit: type=1334 audit(1707594810.328:605): prog-id=155 op=LOAD
[ 953.449512] audit: type=1334 audit(1707594810.328:606): prog-id=151 op=UNLOAD
[ 953.449942] audit: type=1334 audit(1707594810.328:607): prog-id=156 op=LOAD
[ 953.449965] audit: type=1300 audit(1707594810.328:607): arch=c000003e syscall=321 success=yes exit=12 a0=5 a1=c0001302b8 a2=78 a3=0 items=0 ppid=210 pid=15883 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="runc" exe="/usr/bin/runc" subj=unconfined key=(null)
[ 953.449978] audit: type=1327 audit(1707594810.328:607): proctitle=72756E63002D2D726F6F74002F7661722F72756E2F646F636B65722F72756E74696D652D72756E632F6D6F62792F00757064617465002D2D7265736F7572636573002D00366264333762303732333532623934316263376466306135616362646538646534633338366132666266373536373963363763336666633535333038
[ 953.450054] audit: type=1334 audit(1707594810.328:608): prog-id=157 op=LOAD
[ 953.450079] audit: type=1300 audit(1707594810.328:608): arch=c000003e syscall=321 success=yes exit=14 a0=5 a1=c000130050 a2=78 a3=0 items=0 ppid=210 pid=15883 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="runc" exe="/usr/bin/runc" subj=unconfined key=(null)
[ 953.450088] audit: type=1327 audit(1707594810.328:608): proctitle=72756E63002D2D726F6F74002F7661722F72756E2F646F636B65722F72756E74696D652D72756E632F6D6F62792F00757064617465002D2D7265736F7572636573002D00366264333762303732333532623934316263376466306135616362646538646534633338366132666266373536373963363763336666633535333038
[ 953.450120] audit: type=1334 audit(1707594810.329:609): prog-id=157 op=UNLOAD
[ 953.450154] audit: type=1334 audit(1707594810.329:610): prog-id=156 op=UNLOAD
[ 982.840750] usb 2-1.3.1: Direct firmware load for dvb-fe-xc5000-1.6.114.fw failed with error -2
[ 982.840758] xc5000: Upload failed. rc -2

Finally if put back the firmware in the folder and use TvHeadend I got this line:

[ 1296.524396] xc5000: Firmware dvb-fe-xc5000-1.6.114.fw loaded and running

And now it work in TvHeadend... But on each startup I have to :

  • Removed the firmware
  • Unplugged and Replugged the Tuner
  • Wait few seconds
  • Copy the firmware
  • Than everything work fine

Anyone have a idea of the problem?
Many thanks

@dfigus
Copy link

dfigus commented Feb 14, 2024

Hi everyone,

I forked this addon some months ago and have been developing it further over here dfigus/addon-tvheadend. I removed the fork link as it diverted too much... I would encourage you all to look into my addon and provide feedback. Also happy to work on this topic, but my testing is a bit limited as I don't have a DVB tuner...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of the code, not introducing new features. help-wanted We need some extra helping hands or expertise in order to resolve this.
Projects
None yet
Development

No branches or pull requests