lkml.org 
[lkml]   [2005]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [ANNOUNCE] ndevfs - a "nano" devfs
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-29 00:03    [W:0.080 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site