udo_richter@gmx.de(Udo Richter) 05.02.08 22:51
Theunis Potgieter wrote:
udev rules
Any good rules that could be used as a starting point?
I thought of doing this with udev, but there are some obstacles for that: First, a DVB device has several device files, not just one.
vdr:~# ll /dev/dvb/adapter0/ insgesamt 0 crw-rw---- 1 root video 212, 1 2008-02-11 20:19 audio0 crw-rw---- 1 root video 212, 6 2008-02-11 20:19 ca0 crw-rw---- 1 root video 212, 4 2008-02-11 20:19 demux0 crw-rw---- 1 root video 212, 5 2008-02-11 20:19 dvr0 crw-rw---- 1 root video 212, 3 2008-02-11 20:19 frontend0 crw-rw---- 1 root video 212, 7 2008-02-11 20:19 net0 crw-rw---- 1 root video 212, 8 2008-02-11 20:19 osd0 crw-rw---- 1 root video 212, 0 2008-02-11 20:19 video0 vdr:~# vdr:~# ll /dev/dvb/adapter1/ insgesamt 0 crw-rw---- 1 root video 212, 65 2008-02-11 20:19 audio0 crw-rw---- 1 root video 212, 70 2008-02-11 20:19 ca0 crw-rw---- 1 root video 212, 68 2008-02-11 20:19 demux0 crw-rw---- 1 root video 212, 69 2008-02-11 20:19 dvr0 crw-rw---- 1 root video 212, 67 2008-02-11 20:19 frontend0 crw-rw---- 1 root video 212, 71 2008-02-11 20:19 net0 crw-rw---- 1 root video 212, 72 2008-02-11 20:19 osd0 crw-rw---- 1 root video 212, 64 2008-02-11 20:19 video0
vdr:~# ll /dev/dvb/adapter3/ insgesamt 0 crw-rw---- 1 root video 212, 196 2008-02-11 20:42 demux0 crw-rw---- 1 root video 212, 197 2008-02-11 20:42 dvr0 crw-rw---- 1 root video 212, 195 2008-02-11 20:42 frontend0 crw-rw---- 1 root video 212, 199 2008-02-11 20:42 net0
And second, the usual trick to add a custom name as symlink doesn't work since VDR only accepts /dev/dvb/adapterX/, so /dev/dvb/myprimarycard/ is out.
In setup.conf there is a variable:
vdr:~# grep Prim /var/lib/vdr/setup.conf PrimaryDVB = 1 PrimaryLimit = 0
(PrimaryLimit seems to have no sense anymore?)
What's the problem of a "string" there:
PrimaryDVB = /dev/dvb/myprimarycard/
Currently there is stored where the last time the first FF card was found, what is not allways working good
vdr:~# dmesg | grep frontend DVB: registering frontend 0 (Zarlink MT352 DVB-T)... DVB: registering frontend 1 (ST STV0299 DVB-S)... DVB: registering frontend 2 (ST STV0299 DVB-S)... DVB: registering frontend 3 (ST STV0299 DVB-S)...
will lead to "PrimaryDVB = 2"
After fidling arround i could manage (somettimes) to get: vdr:~# dmesg | grep frontend DVB: registering frontend 0 (ST STV0299 DVB-S)... DVB: registering frontend 1 (ST STV0299 DVB-S)... DVB: registering frontend 2 (ST STV0299 DVB-S)... DVB: registering frontend 3 (Zarlink MT352 DVB-T)...
Wow! but the box does not work anymore...no video, no audio, no OSD.
PrimaryDVB = 2
now points to "frontend 1" where no TV/Sound hardware is connected.
So this "automatic" does not really work, and makes configuration more complicate. (If *i* said: use "PrimaryDVB = 2", the box must do. If this is wrong, VDR could/should issue a warning, but not change the recommended PrimaryDVB.
It would be easier if there could be a symlink be used instead/addition to the single digit.
Remember the history:
This "PrimaryDVB = 2" stems from a time, when there were only badly working FF cards (with severe(!)hardware bugs). No budgets, no DVB-T to be mixed because not supported or not existing! A card found at slot1 stays at the index...
But today?
With udev?
Why not use both? (to be compatible) If 1 or 2 Digits than old else take as device path.
Rainer---<=====> Vertraulich // // <=====>--------------ocholl, Kiel, Germany ------------