Re: [vdr] sparse DVB adapter numbers
On Mon, Mar 23, 2009 at 03:39:43PM +0100, Patrick Rother wrote: On Sun, Mar 22, 2009 at 02:21:07PM +0100, Klaus Schmidinger wrote: On 21.03.2009 14:17, Artur Skawina wrote: Patrick Rother wrote: For a reason not to go in details too much here, I would like to make vdr recognise sparse DVB adapter numbers. I have: r...@vdr:/dev/dvb# ls -l total 0 drwxr-xr-x 2 root root 200 Mar 19 11:59 adapter0/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter1/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter5/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter6/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter7/ r...@vdr:/dev/dvb# But vdr uses only the first two devices. Is there any easy possibility to patch the code accordingly? ./vdr -D 0 -D 1 -D 5 -D 6 -D 7 I'm afraid this won't work, because VDR stops scaning for DVB devices as soon as it hits a gap. You might want to try changing this function: bool cDvbDevice::Initialize(void) { int found = 0; int i; for (i = 0; i MAXDVBDEVICES; i++) { if (UseDevice(NextCardIndex())) { if (Probe(*cDvbName(DEV_DVB_FRONTEND, i))) { new cDvbDevice(i); found++; } else NextCardIndex(1); // skips this one === changed line } else NextCardIndex(1); // skips this one } NextCardIndex(MAXDVBDEVICES - i); // skips the rest if (found 0) isyslog(found %d video device%s, found, found 1 ? s : ); else isyslog(no DVB device found); return found 0; } Untested, don't know if it will actually work as expected. I will test this and let you know. Thank you! This seems not to work. Does anybody have another idea? Thank you. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] sparse DVB adapter numbers
On Sun, Mar 22, 2009 at 02:21:07PM +0100, Klaus Schmidinger wrote: On 21.03.2009 14:17, Artur Skawina wrote: Patrick Rother wrote: For a reason not to go in details too much here, I would like to make vdr recognise sparse DVB adapter numbers. I have: r...@vdr:/dev/dvb# ls -l total 0 drwxr-xr-x 2 root root 200 Mar 19 11:59 adapter0/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter1/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter5/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter6/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter7/ r...@vdr:/dev/dvb# But vdr uses only the first two devices. Is there any easy possibility to patch the code accordingly? ./vdr -D 0 -D 1 -D 5 -D 6 -D 7 I'm afraid this won't work, because VDR stops scaning for DVB devices as soon as it hits a gap. You might want to try changing this function: bool cDvbDevice::Initialize(void) { int found = 0; int i; for (i = 0; i MAXDVBDEVICES; i++) { if (UseDevice(NextCardIndex())) { if (Probe(*cDvbName(DEV_DVB_FRONTEND, i))) { new cDvbDevice(i); found++; } else NextCardIndex(1); // skips this one === changed line } else NextCardIndex(1); // skips this one } NextCardIndex(MAXDVBDEVICES - i); // skips the rest if (found 0) isyslog(found %d video device%s, found, found 1 ? s : ); else isyslog(no DVB device found); return found 0; } Untested, don't know if it will actually work as expected. I will test this and let you know. Thank you! pgpWKWwcEZ4QV.pgp Description: PGP signature ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] sparse DVB adapter numbers
On 21.03.2009 14:17, Artur Skawina wrote: Patrick Rother wrote: For a reason not to go in details too much here, I would like to make vdr recognise sparse DVB adapter numbers. I have: r...@vdr:/dev/dvb# ls -l total 0 drwxr-xr-x 2 root root 200 Mar 19 11:59 adapter0/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter1/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter5/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter6/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter7/ r...@vdr:/dev/dvb# But vdr uses only the first two devices. Is there any easy possibility to patch the code accordingly? ./vdr -D 0 -D 1 -D 5 -D 6 -D 7 I'm afraid this won't work, because VDR stops scaning for DVB devices as soon as it hits a gap. You might want to try changing this function: bool cDvbDevice::Initialize(void) { int found = 0; int i; for (i = 0; i MAXDVBDEVICES; i++) { if (UseDevice(NextCardIndex())) { if (Probe(*cDvbName(DEV_DVB_FRONTEND, i))) { new cDvbDevice(i); found++; } else NextCardIndex(1); // skips this one === changed line } else NextCardIndex(1); // skips this one } NextCardIndex(MAXDVBDEVICES - i); // skips the rest if (found 0) isyslog(found %d video device%s, found, found 1 ? s : ); else isyslog(no DVB device found); return found 0; } Untested, don't know if it will actually work as expected. Klaus ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] sparse DVB adapter numbers
Klaus Schmidinger wrote: On 21.03.2009 14:17, Artur Skawina wrote: Patrick Rother wrote: For a reason not to go in details too much here, I would like to make vdr recognise sparse DVB adapter numbers. drwxr-xr-x 2 root root 200 Mar 19 11:59 adapter0/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter1/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter5/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter6/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter7/ But vdr uses only the first two devices. Is there any easy possibility to patch the code accordingly? ./vdr -D 0 -D 1 -D 5 -D 6 -D 7 I'm afraid this won't work, because VDR stops scaning for DVB devices as soon as it hits a gap. Good i didn't know that years ago when setting up my vdr boxes... :) IOW this approach has been working for me for quite a while w/o any problems. Note i'm still at 1.4.x and my 'gaps' actually contain adapters (unused by this vdr instance). If the gaps really are a problem you could always renumber the adapters using udev rules such as SUBSYSTEM==dvb, SUBSYSTEMS==pci, KERNELS==:00:0e.0, PROGRAM=/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s 0 $${K#*.}', NAME:=%c SUBSYSTEM==dvb, SUBSYSTEMS==pci, KERNELS==:02:09.0, PROGRAM=/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s 1 $${K#*.}', NAME:=%c etc artur ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
[vdr] sparse DVB adapter numbers
Dear vdr fellows. For a reason not to go in details too much here, I would like to make vdr recognise sparse DVB adapter numbers. I have: r...@vdr:/dev/dvb# ls -l total 0 drwxr-xr-x 2 root root 200 Mar 19 11:59 adapter0/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter1/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter5/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter6/ drwxr-xr-x 2 root root 120 Mar 19 11:59 adapter7/ r...@vdr:/dev/dvb# But vdr uses only the first two devices. Is there any easy possibility to patch the code accordingly? Thank you. pgpVNxuvVBhfv.pgp Description: PGP signature ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr