[mythtv-users] Working out which tuner was used for which recording

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Jun 3 16:36:49 UTC 2015


On Wed, 3 Jun 2015 17:35:28 +0200, you wrote:

>Hoi Stephen,
>
>Wednesday, June 3, 2015, 5:07:24 PM, you wrote:
>
>> On Wed, 03 Jun 2015 15:52:07 +0100, you wrote:
>
>
>>>Tip: instead of getting the less-than-friendly /dev/dvb/adapter0/frontend0 names 
>>>displayed, I use udev to give my tuners more useful names:
>>>
>>>/dev/dvb/adapter-T-0/frontend0
>>>/dev/dvb/adapter-T-1/frontend0
>>>/dev/dvb/adapter-T2-0/frontend0
>>>
>>> From those and using the serial numbers in the udev rule I now know exactly 
>>>which tuner is which. You have to leave certain strings such as 'adapter' in the 
>>>name since mythtv-setup looks for those.
>
>> That only works if you have useful things that the udev rules can
>> differentiate on to allow you to set the names.  Unfortunately, that
>> is not always the case - I think last time I looked, the only way I
>> had to differentiate my AverTV tuner from my Nova-TD ones was the PCI
>> and USB addresses, which will change if the card is moved to a
>> different slot or the USB tuner is plugged into a different USB port.
>> I would only want to use those to differentiate devices if I was
>> desperate for a way to do it, which fortunately I am not.
>> _______________________________________________
>
>If they use different drivers? You can use DRIVERS==
>But even if the PCI/USB ID is the only difference, it's better then
>leaving it to chance, on who next time is fastest. In the past with
>two audio-cards I had to force it by placing one in-kernel and the
>other as a module ;(

That is the exact problem - they use the same driver.  But in my case,
as one is a real USB and the other a PCI card with its own USB host
controller and two USB tuners on it, the real USB tuner will always be
enumerated first by the kernel, before any USBs on plug in PCI cards.
And within one card, the kernel always enumerates the two USBs in the
same order.  Hence I can just assign all three tuners as
"adapter_nr=0,1,2" to the driver and they will always come up as 0 =
AverTV, 1 = first Nova-TD 500, 2 = second Nova-TD 500.  Using
adapter_nr settings for the other tuners (which do have different
drivers) then makes sure that the order for all tuners is completely
fixed with no need for any udev rules.  A nice piece of luck, really.

I do have to have udev rules for the tuners' IR inputs though, but in
that case they do use different hardware IDs which show up in udevadm
and can be differentiated easily:

# Hauppauge ("SMK Manufacturing, Inc. eHome Infrared Receiver") USB
MCE remote control IR receiver
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{idVendor}=="0609",
ATTRS{idProduct}=="031d", SYMLINK+="lirc-mce"

# Hauppauge WinTV Nova TD-500 remote control IR receiver
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{idVendor}=="2040",
ATTRS{idProduct}=="8400", SYMLINK+="lirc-nova-td-500"

# AverMedia AVerTV DVB-T Volar USB remote control IR receiver
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{idVendor}=="07ca",
ATTRS{idProduct}=="b808", SYMLINK+="lirc-volar"

# TBS QBox 5922 USB remote control IR receiver
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{idVendor}=="734c",
ATTRS{idProduct}=="5922", SYMLINK+="lirc-tbs-5922"


More information about the mythtv-users mailing list