[mythtv-users] Backend starting before DVB cards initialised.
Bruce Nordstrand
brucen at ksl.com.au
Sat Aug 19 16:01:34 UTC 2006
Hi all
I have my system working to a point but am having problems automating
things. I am using 2 DVB cards and have implemented some of the
functionality of MythDora in my custom FC4 install to recognise and
initialise the 2 cards. Without these changes, saa7134-dvb fails to be
run. But setting mythbackend to start automatically with the init script
causes it to fail due to the DVB cards not initialising before it runs.
This is mythbackend.log from a new reboot:
2006-08-20 01:32:37.465 Using runtime prefix = /usr/local
2006-08-20 01:32:37.758 New DB connection, total: 1
2006-08-20 01:32:37.815 Connected to database 'mythconverg' at host:
localhost
2006-08-20 01:32:37.885 Current Schema Version: 1155
Starting up as the master server.
2006-08-20 01:32:38.001 New DB connection, total: 2
2006-08-20 01:32:38.031 Connected to database 'mythconverg' at host:
localhost
2006-08-20 01:32:38.068 EITHelper: localtime offset 10:00:00
2006-08-20 01:32:38.123 DVBChan(0) Error: Opening DVB frontend device
failed.
eno: No such file or directory (2)
2006-08-20 01:32:38.152 EITHelper: localtime offset 10:00:00
2006-08-20 01:32:38.178 DVBChan(1) Error: Opening DVB frontend device
failed.
eno: No such file or directory (2)
ERROR: no valid capture cards are defined in the database.
Perhaps you should read the installation instructions?
2006-08-20 01:32:38.269 Main::Starting HttpServer
2006-08-20 01:32:38.327 Main::Registering HttpStatus Extension
2006-08-20 01:32:38.393 mythbackend version: 0.19.20060708-1 www.mythtv.org
2006-08-20 01:32:38.422 Enabled verbose msgs: important general
2006-08-20 01:32:38.483 AutoExpire: Found 0 recorders w/max rate of 0
MiB/min
2006-08-20 01:32:38.514 AutoExpire: Required Free Space: 1.0 GB w/freq:
10 min
As you can see, it fails to open any cards because they haven't been
initialised yet. However after the reboot is complete, the following is
from dmesg:
Linux video capture interface: v2.00
saa7130/34: v4l2 driver version 0.2.14 loaded
ACPI: PCI Interrupt 0000:00:0a.0[A] -> Link [LNKC] -> GSI 7 (level, low)
-> IRQ 7
saa7133[0]: found at 0000:00:0a.0, rev: 208, irq: 7, latency: 32, mmio:
0xdf101000
saa7133[0]: subsystem: 17de:7201, board: Tevion/KWorld DVB-T 220RF
[card=88,autodetected]
saa7133[0]: board init: gpio is 100
tuner 0-004b: chip found @ 0x96 (saa7133[0])
tuner 0-004b: setting tuner address to 61
tuner 0-004b: type set to tda8290+75a
saa7133[0]: i2c eeprom 00: de 17 01 72 ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: registered device video0 [v4l2]
saa7133[0]: registered device vbi0
saa7133[0]: registered device radio0
ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [LNKD] -> GSI 11 (level,
low) -> IRQ 11
saa7134[1]: found at 0000:00:0b.0, rev: 1, irq: 11, latency: 32, mmio:
0xdf102000
saa7134[1]: subsystem: 185b:c900, board: Compro Videomate DVB-T300
[card=70,autodetected]
saa7134[1]: board init: gpio is 840000
input: saa7134 IR (Compro Videomate DV as /class/input/input3
tuner 1-0043: chip found @ 0x86 (saa7134[1])
tda9887 1-0043: tda988[5/6/7] found @ 0x43 (tuner)
tuner 1-0061: chip found @ 0xc2 (saa7134[1])
tuner 1-0061: type set to 67 (Philips TD1316 Hybrid Tuner)
tuner 1-0068: chip found @ 0xd0 (saa7134[1])
saa7134[1]: i2c eeprom 00: 5b 18 00 c9 54 20 1c 00 43 43 a9 1c 55 d2 b2 92
saa7134[1]: i2c eeprom 10: 00 ff 86 0f ff 20 ff ff ff ff ff ff ff ff ff ff
saa7134[1]: i2c eeprom 20: 01 40 01 03 03 ff 03 01 08 ff 00 87 ff ff ff ff
saa7134[1]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7134[1]: i2c eeprom 40: ff 02 00 c2 86 10 ff ff ff ff ff ff ff ff ff ff
saa7134[1]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff cb
saa7134[1]: i2c eeprom 60: 34 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7134[1]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7134[1]: registered device video1 [v4l2]
saa7134[1]: registered device vbi1
DVB: registering new adapter (saa7133[0]).
DVB: registering frontend 0 (Philips TDA10046H DVB-T)...
DVB: registering new adapter (saa7134[1]).
DVB: registering frontend 1 (Philips TDA10046H DVB-T)...
saa7134 ALSA driver for DMA sound loaded
saa7133[0]/alsa: saa7133[0] at 0xdf101000 irq 7 registered as card -1
saa7134[1]/alsa: saa7134[1] at 0xdf102000 irq 11 registered as card -1
showing that the cards are now active. If I stop the current mythbackend
and restart it from the commandline, everything is fine. Mythfrontend
runs fine.
The changes I have made to the system to get the cards recognised are:
/etc/rc.d/rc.local:
# Remove modules
/sbin/modprobe -r saa7134
/sbin/modprobe -r saa7134-dvb
/sbin/modprobe saa7134-dvb
/sbin/modprobe saa7134-alsa
sleep 5
chmod -R 777 /dev/dvb/adapter0
chmod -R 777 /dev/dvb/adapter1
(ex-MythDora) This is done because leaving the saa7134 module to load on
it's own won't initialise saa7134-dvb and therefore no dvb directory
under /dev.
/etc/modprobe.conf:
# video4linux capture drivers
for module in `/sbin/modprobe -c | awk
'/^alias[[:space:]]+char-major-81-[[:digit:]]+[[:space:]]/ { print $3
}'`; do
load_module $module
done
# lirc drivers
for module in `/sbin/modprobe -c | awk
'/^alias[[:space:]]+char-major-61+[[:space:]]/ { print $3 }'`; do
load_module $module
done
echo -n $" multimedia"
# Everything else (duck and cover)
for module in $other ; do
load_module $module
done
(Ex-MythDora)
I put these in because they are the only thing that would get both DVB
cards going automagically.....but I am not a linux guru by any means, I
just see things done and copy them.
So, can anyone suggest a better way or a way to get mythbackend to run
via an init script AFTER my cards are recognised or a better way to get
2 DVB cards recognised and installed without this trickery...
Thanks in advance
Cheers
Bruce
More information about the mythtv-users
mailing list