Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: MORE THAN 4 DVB DEVICES



Daniel Sáez Domingo wrote:
But I don't use devfs. I have created the /dev/dvb directory with
makedev.napi and this is the result:

[ DVB]# ll /dev/dvb/
total 24
drwxr-xr-x    2 root     root         4096 may 20 10:57 adapter0
drwxr-xr-x    2 root     root         4096 may 20 10:57 adapter1
drwxr-xr-x    2 root     root         4096 may 20 10:57 adapter2
drwxr-xr-x    2 root     root         4096 may 20 10:57 adapter3
drwxr-xr-x    2 root     root         4096 may 20 10:57 adapter4
drwxr-xr-x    2 root     root         4096 may 20 10:57 adapter5

[ DVB]# ll /dev/dvb/adapter0
total 0
crw-rw----    1 root     video    250,   1 may 20 10:57 audio0
crw-rw----    1 root     video    250,   6 may 20 10:57 ca0
crw-rw----    1 root     video    250,   4 may 20 10:57 demux0
crw-rw----    1 root     video    250,   5 may 20 10:57 dvr0
crw-rw----    1 root     video    250,   3 may 20 10:57 frontend0
crw-rw----    1 root     video    250,   7 may 20 10:57 net0
crw-rw----    1 root     video    250,   8 may 20 10:57 osd0
crw-rw----    1 root     video    250,   0 may 20 10:57 video0

[ DVB]# ll /dev/dvb/adapter1
total 0
crw-rw----    1 root     video    250,  65 may 20 10:57 audio0
crw-rw----    1 root     video    250,  70 may 20 10:57 ca0
crw-rw----    1 root     video    250,  68 may 20 10:57 demux0
crw-rw----    1 root     video    250,  69 may 20 10:57 dvr0
crw-rw----    1 root     video    250,  67 may 20 10:57 frontend0
crw-rw----    1 root     video    250,  71 may 20 10:57 net0
crw-rw----    1 root     video    250,  72 may 20 10:57 osd0
crw-rw----    1 root     video    250,  64 may 20 10:57 video0

[ DVB]# ll /dev/dvb/adapter2
total 0
crw-rw----    1 root     video    250, 129 may 20 10:57 audio0
crw-rw----    1 root     video    250, 134 may 20 10:57 ca0
crw-rw----    1 root     video    250, 132 may 20 10:57 demux0
crw-rw----    1 root     video    250, 133 may 20 10:57 dvr0
crw-rw----    1 root     video    250, 131 may 20 10:57 frontend0
crw-rw----    1 root     video    250, 135 may 20 10:57 net0
crw-rw----    1 root     video    250, 136 may 20 10:57 osd0
crw-rw----    1 root     video    250, 128 may 20 10:57 video0

[ DVB]# ll /dev/dvb/adapter3
total 0
crw-rw----    1 root     video    250, 193 may 20 10:57 audio0
crw-rw----    1 root     video    250, 198 may 20 10:57 ca0
crw-rw----    1 root     video    250, 196 may 20 10:57 demux0
crw-rw----    1 root     video    250, 197 may 20 10:57 dvr0
crw-rw----    1 root     video    250, 195 may 20 10:57 frontend0
crw-rw----    1 root     video    250, 199 may 20 10:57 net0
crw-rw----    1 root     video    250, 200 may 20 10:57 osd0
crw-rw----    1 root     video    250, 192 may 20 10:57 video0

[ DVB]# ll /dev/dvb/adapter4
total 0
crw-rw----    1 root     video    251,   1 may 20 10:57 audio0
crw-rw----    1 root     video    251,   6 may 20 10:57 ca0
crw-rw----    1 root     video    251,   4 may 20 10:57 demux0
crw-rw----    1 root     video    251,   5 may 20 10:57 dvr0
crw-rw----    1 root     video    251,   3 may 20 10:57 frontend0
crw-rw----    1 root     video    251,   7 may 20 10:57 net0
crw-rw----    1 root     video    251,   8 may 20 10:57 osd0
crw-rw----    1 root     video    251,   0 may 20 10:57 video0

[ DVB]# ll /dev/dvb/adapter5
total 0
crw-rw----    1 root     video    251,  65 may 20 10:57 audio0
crw-rw----    1 root     video    251,  70 may 20 10:57 ca0
crw-rw----    1 root     video    251,  68 may 20 10:57 demux0
crw-rw----    1 root     video    251,  69 may 20 10:57 dvr0
crw-rw----    1 root     video    251,  67 may 20 10:57 frontend0
crw-rw----    1 root     video    251,  71 may 20 10:57 net0
crw-rw----    1 root     video    251,  72 may 20 10:57 osd0
crw-rw----    1 root     video    251,  64 may 20 10:57 video0

But when I try to access some file in adapter4 or adapter5, the error No
such device appears.

How can I solve this problem without devfs
It's not possible without problems. See dvbdev.c, line 68, macro nums2minor(). The adapter number is encoded using 2 bits, this means that you can adress only 4 DVB cards.

You could hack this macro to encode the adapter number with more bits, but it's a pretty ugly hack.

Better enable devfs in your kernel, install the devfsd deamon to provide all compatiblity devices, start it as one of the first init scripts, and then mount devfs at boottime or in your fstab over the /dev directory.

Holger



--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index