From: Andreas Besse <besse@motama.com>
To: linux-media@vger.kernel.org
Subject: Writing udev reuls for dual tuner devices
Date: Mon, 11 Jan 2010 19:12:10 +0100 [thread overview]
Message-ID: <4B4B69FA.40905@motama.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]
Hello,
I use a Media-Pointer MP-S2 Dual DVB-S2 PCIe card with the latest drivers from the git-Repository
http://projects.vdr-developer.org/repositories/show/mediapointer-dvb-s2 .
I tried to write udev rules to define the adapter names of the tuner to avoid that the device names could change at boot. It seems not to be possible to write a udev rule for this dual DVB-S2 device, because there are no attributes to differentiate between tuner 0 and tuner 1. Attached is the output of udevinfo.
The following udev rule allows only to define the adapter name of a single tuner:
SUBSYSTEM=="dvb", ATTRS{vendor}=="0x18c3", ATTRS{device}=="0x0720",
KERNELS=="0000:02:00.0",
PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter0/%%s $${K#*.}'", SYMLINK+="%c"
How can this issue be solved in general? I think the driver should provide an attribute for each tuner, so that it is possible to write udev rules. How this has been solved for other Dual Tuner devices like Pinnacle PCTV Dual DVB-T Diversity, DViCO FusionHDTV DVB-T Dual Express?
[-- Attachment #2: udevinfo.txt --]
[-- Type: text/plain, Size: 3668 bytes --]
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:01.0/0000:01:00.0/dvb/dvb0.frontend0':
KERNEL=="dvb0.frontend0"
SUBSYSTEM=="dvb"
DRIVER==""
ATTR{dev}=="212:2"
looking at parent device '/devices/pci0000:00/0000:00:01.0/0000:01:00.0/dvb':
KERNELS=="dvb"
SUBSYSTEMS==""
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:01.0/0000:01:00.0':
KERNELS=="0000:01:00.0"
SUBSYSTEMS=="pci"
DRIVERS=="ngene"
ATTRS{vendor}=="0x18c3"
ATTRS{device}=="0x0720"
ATTRS{subsystem_vendor}=="0x18c3"
ATTRS{subsystem_device}=="0xabc4"
ATTRS{class}=="0x040000"
ATTRS{irq}=="16"
ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff"
ATTRS{modalias}=="pci:v000018C3d00000720sv000018C3sd0000ABC4bc04sc00i00"
ATTRS{enable}=="1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
looking at parent device '/devices/pci0000:00/0000:00:01.0':
KERNELS=="0000:00:01.0"
SUBSYSTEMS=="pci"
DRIVERS=="pcieport-driver"
ATTRS{vendor}=="0x8086"
ATTRS{device}=="0x2771"
ATTRS{subsystem_vendor}=="0x0000"
ATTRS{subsystem_device}=="0x0000"
ATTRS{class}=="0x060400"
ATTRS{irq}=="223"
ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff"
ATTRS{modalias}=="pci:v00008086d00002771sv00000000sd00000000bc06sc04i00"
ATTRS{enable}=="2"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}=="1"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:01.0/0000:01:00.0/dvb/dvb1.frontend0':
KERNEL=="dvb1.frontend0"
SUBSYSTEM=="dvb"
DRIVER==""
ATTR{dev}=="212:5"
looking at parent device '/devices/pci0000:00/0000:00:01.0/0000:01:00.0/dvb':
KERNELS=="dvb"
SUBSYSTEMS==""
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:01.0/0000:01:00.0':
KERNELS=="0000:01:00.0"
SUBSYSTEMS=="pci"
DRIVERS=="ngene"
ATTRS{vendor}=="0x18c3"
ATTRS{device}=="0x0720"
ATTRS{subsystem_vendor}=="0x18c3"
ATTRS{subsystem_device}=="0xabc4"
ATTRS{class}=="0x040000"
ATTRS{irq}=="16"
ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff"
ATTRS{modalias}=="pci:v000018C3d00000720sv000018C3sd0000ABC4bc04sc00i00"
ATTRS{enable}=="1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
looking at parent device '/devices/pci0000:00/0000:00:01.0':
KERNELS=="0000:00:01.0"
SUBSYSTEMS=="pci"
DRIVERS=="pcieport-driver"
ATTRS{vendor}=="0x8086"
ATTRS{device}=="0x2771"
ATTRS{subsystem_vendor}=="0x0000"
ATTRS{subsystem_device}=="0x0000"
ATTRS{class}=="0x060400"
ATTRS{irq}=="223"
ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff"
ATTRS{modalias}=="pci:v00008086d00002771sv00000000sd00000000bc06sc04i00"
ATTRS{enable}=="2"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}=="1"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
reply other threads:[~2010-01-11 18:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B4B69FA.40905@motama.com \
--to=besse@motama.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox