[mythtvnz] Determining which tuner card for a recording after it is recorded

Tony Sauri hoiho.nz at gmail.com
Mon Sep 7 03:27:18 BST 2015


On 07/09/15 12:20, worik wrote:
> On 07/09/15 11:03, Tony Sauri wrote:
>>> Some body on this list very helpfully suggested a way to query the
>>>> database to determine which tuner recorded a particular recording. To my
>>>> embarrassment  I cannot find the message.
>>>>
>>>> Can anybody help?  I have two tuners, one of which I suspect is a lot
>>>> better than the other.  I need to discern which is recording what.
> 
> [snip]
>>>>
>> I would do something like this:
>>
>>  cat /var/log/mythtv/mythbackend.log | grep HandleRecordingStatusChange
>>
> 
> Thank you.  Obvious!  A really good start.
> 
> I have "cardid 1, sourceid 1" and "cardid 2, sourceid 1" and "cardid 4,
> sourceid 1".
> 
> cat /var/log/mythtv/mythbackend.log | grep
> HandleRecordingStatusChange|perl -e 'while(<>){s/^.+(cardid \d.+)/$1/;
> print }'|sort|uniq -c
>     117 cardid 1, sourceid 1
>      23 cardid 2, sourceid 1
>      44 cardid 4, sourceid 1
> 
> 
> Odd, as I have two tuners:
> 
> $ ls /dev/dvb/
> adapter0  adapter1
> 
> 
> The backend status on MythWEB reports for encoder status:
> 
> Encoder 1 [ DVB : /dev/dvb/adapter0/frontend0 ] is local on backend and
> is recording '3 News' on TV3. This recording is scheduled to end at
> 12:30 PM.
> Encoder 2 [ DVB : /dev/dvb/adapter0/frontend0 ] is local on backend and
> is not recording.
> Encoder 4 [ DVB : /dev/dvb/adapter1/frontend0 ] is local on backend and
> is not recording.
> 
> Does this indicates that adapter0 has two tuners and adapter1 has 1?
> 
> And how do I match these with the information from lsusb?
> 
> $ lsusb|grep 2040
> Bus 001 Device 005: ID 2040:c000 Hauppauge Windham
> Bus 001 Device 004: ID 2040:7070 Hauppauge Nova-T Stick 3
> 
> cheers
> Worik
> 
> 
> 

In this case I would use:

sudo udevadm  info --attribute-walk --name=/dev/dvb/adapter0/frontend0
and
sudo udevadm  info --attribute-walk --name=/dev/dvb/adapter1/frontend0


And yes Nick is correct .... It seems you have more than 1 virtual tuner
per physical card.

An inspection of the capturecard table will allow you to relate a given
cardid to a /dev/dvb/adapter entry.

Tony



More information about the mythtvnz mailing list