On Tue, Jun 28, 2005 at 05:49:29PM -0400, Jim Crilly wrote:
> I took a quick look and for OSS devices linphone seems to just loop over
> /dev/dsp* so if the names were moved, I doubt it would work.
>
> But it also seems to have ALSA support and in that case it uses
> snd_card_get_name in a for loop to build a list of available cards, since
> all ALSA functions use card index numbers they should work fine independent
> of device file names.
No, they shouldn't. Try it and see. Yes, your /program/ uses the sound
card index, but that's because the ALSA library internally assumes that
sound card index 0 corresponds to certain device nodes.
Eventually every program has to be able to find the device node. That's
just obvious, if you don't need the device node why have it in the first
place? And if it can't predict what that device node will be named, the
only thing it can do (short of creating its own private device node,
which breaks all sorts of stuff /and/ is dumb /and/ doesn't work unless
you're root) is search over every single device node in /dev to find the
one with the correct major/minor. Or ask the user to type it in
manually, which is all well and good for maybe an admin configuring some
system, but is completely broken for anything GUI or automatic.
Hence my conclusion, predictable device file names are a requirement.
udev's "name the device whatever you want" works fine for running vi on
/etc/fstab, but when you want a program to do anything intelligent like
present a list of available choices, you need to be able to find the
device node.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]