[SOLVED] Max number of tuners ???
Added by se can over 2 years ago
Hi folks,
I would like to ask is there a maximum number of tuners that can be used?
Or is there a limit in linux on the maximum number of devices that can use a driver?
Because I can't start more than 8 tuners.
The tuners are Avermedia TD310 with these fw files and 8 works fine:
dvb-demod-si2168-b40-01.fw
dvb-demod-si2168-02.fw
dvb-usb-it9303-01.fw
According to the dmesg, it seems to be interrupted while the driver is being retracted, and it also says "dvb_usb_af9035: probe of 1-4.1.4:1.0 failed with error -23", but the other 8 works fine.
Physically all the tuners are good, because if I swap them, then they work, but only 8.
The system is Ubuntu 20.04.4 LTS with kernel 5.13.0-41-generic.
Tvheadend 4.3.0 Michael Marley's version with compiled ffmpeg for nvenc support.
Thanks in advance.
dmesg.png (205 KB) dmesg.png | |||
dmesg2.png (207 KB) dmesg2.png | |||
lsusb-t.png (70.6 KB) lsusb-t.png |
Replies (6)
RE: Max number of tuners ??? - Added by Dave Pickles over 2 years ago
Error -23 is "ENFILE file table overflow" - a very strange error indeed.
However looking through the kernel source, dvbdev_get_free_adapter_num () in drivers/media/dvb-core/dvbdev.c triggers this error if the number of adapters exceeds DVB_MAX_ADAPTERS. DVB_MAX_ADAPTERS is a kernel config parameter which has the default value 16; presumably your 8 dual tuners count as 16 adapters which is why you see the error when adding the ninth.
You could try building your own kernel with a higher value for DVB_MAX_ADAPTERS.
RE: Max number of tuners ??? - Added by Dave Pickles over 2 years ago
OK I got it partly right...
Your Avermedia TD310 are single tuners, not double, however Ubuntu set DVB_MAX_ADAPTERS to 8. You'll still need to do a kernel rebuild to increase the number.
RE: Max number of tuners ??? - Added by se can over 2 years ago
Thank you for your reply.
I tried it, but it always gives a check-config error before the build. Do you have any ideas for this?
I have changed the value in the given place.
config.png (146 KB) config.png | |||
config2.png (93.4 KB) config2.png |
RE: Max number of tuners ??? - Added by Dave H over 2 years ago
You don't say (i.e. include a log of the terminal session) exactly what you changed where, so it's difficult to know for sure, but a quick google finds me https://ubuntuforums.org/showthread.php?t=2451036 and a post by norobro that says:
You can try modifying the file "debian.master/config/config.common.ubuntu" Code: CONFIG_DVB_MAX_ADAPTERS=8 If that doesn't work try changing this line in "debian.master/config/annotations" Code: CONFIG_DVB_MAX_ADAPTERS policy<{'amd64': '8', 'arm64': '8', 'armhf': '8', 'i386': '8', 'ppc64el': '8', }>
so it might be worth trying whatever is equivalent on your system.
RE: Max number of tuners ??? - Added by se can over 2 years ago
You are right, I apologize.
Based on this description I made the kernel:
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
and after the command "LANG=C fakeroot debian/rules editconfigs" I changed the value in the config in the Drivers/Multimedia section, but after this the building gave the error that the tuner quantities don't match.
And based on your noroboro quote then changed the values in "debian.master/config/annotations" to the same values as I had specified in the config, and then the kernel build was successful.
Then I downloaded the "grub-customizer" and configured my own kernel as default, because otherwise I could not make it defaults, I think because it is unsigned.
And now all the tuners are working.
So thank you very much for your help.
RE: Max number of tuners ??? - Added by Dave H over 2 years ago
Excellent! Pleased I could help (and amazed that I did, given how little I know