* [linux-dvb] device file ordering w/multiple cards
@ 2009-01-22 21:42 Joseph Shraibman
2009-01-22 23:01 ` e9hack
2009-01-22 23:22 ` Andy Zivkovic
0 siblings, 2 replies; 4+ messages in thread
From: Joseph Shraibman @ 2009-01-22 21:42 UTC (permalink / raw)
To: linux-dvb
I have two dvb cards in my system. Is there any way to change the order
of the device files?
_______________________________________________
linux-dvb users mailing list
For V4L/DVB development, please use instead linux-media@vger.kernel.org
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-dvb] device file ordering w/multiple cards
2009-01-22 21:42 [linux-dvb] device file ordering w/multiple cards Joseph Shraibman
@ 2009-01-22 23:01 ` e9hack
2009-01-22 23:22 ` Andy Zivkovic
1 sibling, 0 replies; 4+ messages in thread
From: e9hack @ 2009-01-22 23:01 UTC (permalink / raw)
To: linux-media
Joseph Shraibman schrieb:
> I have two dvb cards in my system. Is there any way to change the order
> of the device files?
Usually, the device files (/dev/dvb/adapter?/..) are create by a udev-rule. If you modify
the rule, you can assign every dvb card to a specific number. In my case, I'm using Suse,
which comes withe following udev rule in /etc/udev/rules.d/50-udev-default.rules:
# DVB video
SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s
$${K%%%%.*} $${K#*.}'", NAME="%c"
I've two DVB cards, one FF and one budget. The FF should be always the adapter #0. I've
disabled the default DVB rule and add my one rule, which assigns the numbers depend on the
pci vendor/device numbers:
# DVB video
#SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s
$${K%%%%.*} $${K#*.}'", NAME="%c"
SUBSYSTEM=="dvb", SYSFS{subsystem_device}=="0x1156", SYSFS{subsystem_vendor}=="0x153b",
PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s 1 $${K#*.}'", NAME="%c
SUBSYSTEM=="dvb", SYSFS{subsystem_device}=="0x000a", SYSFS{subsystem_vendor}=="0x13c2",
PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s 0 $${K#*.}'", NAME="%c
If you use two identical cards, you can use the pci slot number:
# DVB video
#SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s
$${K%%%%.*} $${K#*.}'", NAME="%c"
SUBSYSTEM=="dvb", SUBSYSTEMS=="pci", KERNELS=="0000:04:07.0", PROGRAM="/bin/sh -c 'K=%k;
K=$${K#dvb}; printf dvb/adapter%%i/%%s 1 $${K#*.}'", NAME="%c"
SUBSYSTEM=="dvb", SUBSYSTEMS=="pci", KERNELS=="0000:04:06.0", PROGRAM="/bin/sh -c 'K=%k;
K=$${K#dvb}; printf dvb/adapter%%i/%%s 0 $${K#*.}'", NAME="%c"
Regards,
Hartmut
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-dvb] device file ordering w/multiple cards
2009-01-22 21:42 [linux-dvb] device file ordering w/multiple cards Joseph Shraibman
2009-01-22 23:01 ` e9hack
@ 2009-01-22 23:22 ` Andy Zivkovic
2009-01-23 7:39 ` Jaap Crezee
1 sibling, 1 reply; 4+ messages in thread
From: Andy Zivkovic @ 2009-01-22 23:22 UTC (permalink / raw)
To: linux-media; +Cc: linux-dvb, linuxtv.org
Joseph Shraibman wrote:
> I have two dvb cards in my system. Is there any way to change the order
> of the device files?
If the different cards use different drivers, you can pass the
adapter_nr parameter to the module.
In my /etc/modprobe.conf I have:
options dvb_usb_dib0700 adapter_nr=0,1,2,3
options mantis adapter_nr=4
Andy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-dvb] device file ordering w/multiple cards
2009-01-22 23:22 ` Andy Zivkovic
@ 2009-01-23 7:39 ` Jaap Crezee
0 siblings, 0 replies; 4+ messages in thread
From: Jaap Crezee @ 2009-01-23 7:39 UTC (permalink / raw)
To: linux-media
Andy Zivkovic wrote:
> Joseph Shraibman wrote:
> I have two dvb cards in my system. Is there any way to change the order
> of the device files?
It might also be possible to use udev for this kind of ordering. Maybe just like the persistent-[net|storage] scripts in
/etc/udev/rules.d
Regards,
Jaap Crezee
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-23 7:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 21:42 [linux-dvb] device file ordering w/multiple cards Joseph Shraibman
2009-01-22 23:01 ` e9hack
2009-01-22 23:22 ` Andy Zivkovic
2009-01-23 7:39 ` Jaap Crezee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox