* SYMLINK+="xxx" can only be used once
@ 2007-02-27 16:39 Yan Seiner
2007-02-27 16:50 ` Alexander E. Patrakov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yan Seiner @ 2007-02-27 16:39 UTC (permalink / raw)
To: linux-hotplug
I'd like to know if this is a bug or a feature. I know it's driving me
nuts.
I have a system with 3 sound cards. I need to assign fixed device names
to these cards. I've tried various combinations of module parameters
and I've found the most reliable way is to use udev to symlink the
device names using udev.
Here's the rule I am using:
#Yamaha Corporation YMF-724F
SYSFS{device}="0x000d", SYSFS{vendor}="0x1073", MODE="0660",
NAME="snd/%k", SYMLINK+="soundcard/Yamaha_YMF_724F", SYMLINK+="dsp01"
What happens is that only the last SYMLINK is created. This is
reproducilble; I can turn the order around and the soundcard link will
be created but not the dsp one.
I can't find any examples of multiple SYMLINK creation, so I suspect
this may be a feature, but I don't quite understand why it would be so.
Can anyone shed some light on this?
Thanks,
--Yan
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SYMLINK+="xxx" can only be used once
2007-02-27 16:39 SYMLINK+="xxx" can only be used once Yan Seiner
@ 2007-02-27 16:50 ` Alexander E. Patrakov
2007-02-27 17:11 ` Yan Seiner
2007-02-27 17:54 ` Bryan Kadzban
2 siblings, 0 replies; 4+ messages in thread
From: Alexander E. Patrakov @ 2007-02-27 16:50 UTC (permalink / raw)
To: linux-hotplug
Yan Seiner wrote:
> SYSFS{device}="0x000d", SYSFS{vendor}="0x1073", MODE="0660",
> NAME="snd/%k", SYMLINK+="soundcard/Yamaha_YMF_724F", SYMLINK+="dsp01"
>
> What happens is that only the last SYMLINK is created.
The documented udev rule syntax would be:
SYSFS{device}="0x000d", SYSFS{vendor}="0x1073", MODE="0660",
NAME="snd/%k", SYMLINK+="soundcard/Yamaha_YMF_724F dsp01"
(i.e., separate the names of the wanted symlinks by spaces). But, due to the
nature of ALSA, the symlinks are not really usable because ALSA library
never looks at them.
--
Alexander E. Patrakov
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SYMLINK+="xxx" can only be used once
2007-02-27 16:39 SYMLINK+="xxx" can only be used once Yan Seiner
2007-02-27 16:50 ` Alexander E. Patrakov
@ 2007-02-27 17:11 ` Yan Seiner
2007-02-27 17:54 ` Bryan Kadzban
2 siblings, 0 replies; 4+ messages in thread
From: Yan Seiner @ 2007-02-27 17:11 UTC (permalink / raw)
To: linux-hotplug
Alexander E. Patrakov wrote:
> Yan Seiner wrote:
>> SYSFS{device}="0x000d", SYSFS{vendor}="0x1073", MODE="0660",
>> NAME="snd/%k", SYMLINK+="soundcard/Yamaha_YMF_724F", SYMLINK+="dsp01"
>>
>> What happens is that only the last SYMLINK is created.
>
> The documented udev rule syntax would be:
>
> SYSFS{device}="0x000d", SYSFS{vendor}="0x1073", MODE="0660",
> NAME="snd/%k", SYMLINK+="soundcard/Yamaha_YMF_724F dsp01"
Thanks!
(Where is this documented? I thought I went through all of the docs...
I must have missed something.)
>
> (i.e., separate the names of the wanted symlinks by spaces). But, due
> to the nature of ALSA, the symlinks are not really usable because ALSA
> library never looks at them.
>
The apps I need to use still use OSS emulation - will that work?
I'm struggling a bit since sound cards have all sorts of mixers, dsps,
etc. and I need to make sure the soundcard device names don't move
around so the sound comes from the right set of speakers.... The
soundcard/ symlinks are just mnemonics for me so I know what hardware I
am dealing with, but obviously the dsp stuff I need to use.
If I create a name like /dev/dsp01 which has /dev/snd/mixer2, will that
work or will things break in weird ways?
--Yan
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SYMLINK+="xxx" can only be used once
2007-02-27 16:39 SYMLINK+="xxx" can only be used once Yan Seiner
2007-02-27 16:50 ` Alexander E. Patrakov
2007-02-27 17:11 ` Yan Seiner
@ 2007-02-27 17:54 ` Bryan Kadzban
2 siblings, 0 replies; 4+ messages in thread
From: Bryan Kadzban @ 2007-02-27 17:54 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 1946 bytes --]
On Tue, Feb 27, 2007 at 09:11:19AM -0800, Yan Seiner wrote:
> Alexander E. Patrakov wrote:
> >
> > (i.e., separate the names of the wanted symlinks by spaces). But, due
> > to the nature of ALSA, the symlinks are not really usable because ALSA
> > library never looks at them.
> >
>
> The apps I need to use still use OSS emulation - will that work?
No. The symlink you're creating here will point at the Alsa device, not
the OSS emulation device.
You have two options. First, you could install alsa-oss and run the
programs under aoss; aoss preloads a library that converts the OSS calls
into their Alsa equivalents.
Second, you could load snd-pcm-oss and use the /dev/dsp* devices
directly. (You can also create symlinks that point at these OSS devices
if you need to; that will work.) Something like this might work for the
symlinks, assuming vendor and device (and whatever else) are attributes
of some parent of the /class/*/dsp* kobjects (you can use udevinfo to
find out):
KERNEL=="dsp*", ATTRS{vendor}=="whatever", etc., SYMLINK+="soundcards/BLAH"
That way you'd get a soundcards/BLAH symlink pointing at the /dev/dsp
device (and /dev/dsp1, /dev/dsp2, etc.). The dsp* devices won't be
stable, but the symlinks will be. If you need stable dsp* devices,
you'll have to use the "index" module parameter for each of your
drivers, and hopefully you don't have two cards sharing a driver.
> If I create a name like /dev/dsp01 which has /dev/snd/mixer2, will that
> work or will things break in weird ways?
Well, first, DSP devices are not mixers. So creating a symlink named
/dev/dsp01 that points at a mixer isn't that great of an idea.
But second, that's the Alsa mixer device, not the OSS mixer. If your
programs use the OSS mixer interface, they'll need to use a symlink
pointing at /dev/mixer*, not /dev/snd/mixer*. In short: Forget about
/dev/snd if your programs use OSS.
[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 226 bytes --]
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-02-27 17:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-27 16:39 SYMLINK+="xxx" can only be used once Yan Seiner
2007-02-27 16:50 ` Alexander E. Patrakov
2007-02-27 17:11 ` Yan Seiner
2007-02-27 17:54 ` Bryan Kadzban
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).