[mythtv-users] Any way to tell which tuner card might be bad?

MythTV mythtv at ncc1701.serveftp.net
Thu Feb 11 01:48:24 UTC 2010


> Subject: Re: [mythtv-users] Any way to tell which tuner card might be
> bad?
> 

Short answer is no.

However you can identify which tuner(s) are currently recording.

1) From a shell or terminal, issue the command (as root)
   # lsof | grep adapter..demux

mythbacke  2771     mythtv    8u      CHR              212,3       0t0
5739 /dev/dvb/adapter2/demux0

   If you see "/dev/dvb/adapter0/demux0", then adapter0 is recording.  

2) If there are multiple adapters currently recording, go to mythweb.
Select 'backend status' and
   you will see

   "Encoder 99 is local on mythbox02 and is recording Days of our Lives"
for example.

   note down the 'encoder numbers' which are in use.

3) fire off mysql.

# mysql
> select videodevice from capturecard where cardid=99

The 'videodevice' should be /dev/dvb/adapter<X>/frontend0.  

This is the adapter currently recording "days of our lives".

4) Locate the physical devices..

   find /sys/devices -name dvb<X>.dvr0

   On my system, I get the following :

# find /sys/devices -name dvb?.dvr0

/sys/devices/pci0000:00/0000:00:08.0/0000:01:09.2/dvb/dvb0.dvr0
PCI tuner in slot '9'

/sys/devices/pci0000:00/0000:00:08.0/0000:01:0b.2/dvb/dvb1.dvr0
PCI tuner in slot 'b' (or slot 11).

/sys/devices/pci0000:00/0000:00:04.1/usb2/2-1/dvb/dvb2.dvr0
USB tuner on usb hub 2, device 2-1.

/sys/devices/pci0000:00/0000:00:04.1/usb2/2-1/dvb/dvb3.dvr0
USB tuner on usb hub 2, device 2-1  (ok, its a dual tuner USB)


5) Optional lspci  Use the adapter ID from the /sys line above

/sys/devices/pci0000:00/0000:00:08.0/**** 0000:01:0b.2 ***
/dvb/dvb1.dvr0

# lspci -s 0000:01:09.2
01:09.2 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI
Video and Audio Decoder [MPEG Port] (rev 05)

and/or use the '-v' option.

# lspci -s 0000:01:0b.2 -v
01:0b.2 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI
Video and Audio Decoder [MPEG Port] (rev 05)
        Subsystem: DViCO Corporation Device db30
        Flags: bus master, medium devsel, latency 32, IRQ 18
        Memory at f7000000 (32-bit, non-prefetchable) [size=16M]
        Capabilities: [4c] Power Management version 2
        Kernel driver in use: cx88-mpeg driver manager
        Kernel modules: cx8802

Depending on how well your devices identify themselves, you may need to
experiment
to get them spot on.

EG, my USB is a single device with two tuners and two antenna.  Finding
which tuner matches which antenna
    connector required unplugging and looking for errors.

    PCI slot numbers are unlikely to map directly to physical slot
numbers.  You may need to pull the 
    card out and see what disappears.

Once you know, the relationship should be consistent.  I had a problem
where the conexant(pci) and nova(usb) devices interleaved

eg, adapter0 = nova
    adapter1 = dvico plus
    adapter2 = nova
    adapter3 = dvico pro

The solution was to add to modprobe.conf/tuners.conf -

options cx88-dvb adapter_nr=0,1
options dvb_usb_dib0700 force_lna_activation=1 adapter_nr=2,3

Now all tuners appear in the same order every time.

Hope that helps.  This helped me identify a broken antenna cable on the
USB tuner
when only one in every 20 recordings failed.....

The remain problem is that MYTHTV does not preserve the TUNER->Recording
relationship once
the recording is complete, so you have to catch a bad tuner in
operation.

If there was a 'tunerX recorded programY' in the database, I'd like to
know about it.

Cheers
Dave




More information about the mythtv-users mailing list