Re: [ANNOUNCE] ndevfs - a "nano" devfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/28/05 11:21:27AM +0200, Arjan van de Ven wrote:
> > 
> > So then explain this to me, I've got a GUI sound player, on first
> > invocation it displays a list of sound cards installed on the system,
> > allows the user to select one, and then plays the sound file. How is it
> > supposed to do that if the device nodes for sound card 0 could be named
> > anything? I can get a list of sound cards from /proc/asound or
> > /sys/class/sound, but unless the sound card device nodes are predictably
> > named there's no way to find them short of searching every node in /dev.
> 
> 
> actually.. linphone for example shows you the name of the device, not
> the device node. And at runtime it finds which device node belongs to
> that name somehow. I didn't look at the code how it does that, but it
> sure isn't impossible since it's done in practice already.

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.


Jim.
-
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]
  Powered by Linux