Page 1 of 1

[Solved] tuner card device file order control with udev

Posted: Tue Mar 16, 2021 5:21 pm
by diyhouse
Greeting all,..
I have just upgraded my system with a new quad SAT tuner,.. to add to my quad Freeview tuner.
By default when the kernel installs, the devices appear in a random order,..
1 sat tuner,.. followed by 4 FView tuners, and then the remaining 3 SAT tuners.

I have seen the udev stuff using the output of the udevadm command to differentiate tuners and cards,.. but unless I'm missing something the TBS6904/6285 only differentiate themselves by their vendor-name,.. and each tuner whether SAT or Fview produces the same parameter list, so no way of identifying each tuner.

Has anyone else out there using TBS ( or similar ) cards already solved this issue,.. or are there other resources I have missed, as the udev/mythtv wiki will take some serious head-scratching to work through.

Many Tx

Re: tuner card device file order control with udev

Posted: Tue Mar 16, 2021 6:41 pm
by paulh
If your linux module driver for your cards supports the 'adapter_nr' parameter you can tell it to use a specific number for each adapter when it boots up.

So if you pass 1,2,3,4 for the 'adapter_nr' parameter for one card it will always have /dev/dvb/adapter1 to /dev/dvb/adapter4.
And for the other you could use 5,6,7,8 so you get /dev/dvb/adapter5 to /dev/dvb/adapter8. The number can be anything you like not necessarily in order like that.

Have a look for something like /sys/module/MODULE_NAME/parameters/adapter_nr to see if the module driver supports the adapter_nr parameter. Obviously substitute MODULE_NAME for the module your cards use.

Re: tuner card device file order control with udev

Posted: Thu Mar 18, 2021 9:35 pm
by diyhouse
Many tx Paul,..

adapter_nr,.. was the solution,... ( light bulb moment you might say ),... as I had seen this else where and not twigged, as they say.

For the TBS cards 6285 & 6904 the solution is as follows:-

vi /etc/modprobe.d/dvb.conf
options tbsecp3 adapter_nr=1,2,3,4
options saa716x_core adapter_nr=10,11,12,13

This then created the device files as expected in the order expected with the numbers given,... so much easier when setting mythtv backend up.

This also probably explains why the wiki udev-mythtv stuff has not been edited for the last 5yrs or so, as adapter_nr fixes it so simply.