[patch] simple sysfs sound objects
David Zeuthen
david at fubar.dk
Thu Feb 10 10:46:47 PST 2005
On Wed, 2005-02-09 at 21:41 +0000, Richard Hughes wrote:
> Here is an simple initial patch to expose sound devices so you can see
> what sound devices you've got on your system.
> I'm not sure what do do with objects that don't have a physdev
Ignore such devices for now; AFAIK, all ALSA devices (the one we should
care about) have such links. Otherwise they will get them eventually.
> , or how
> it needs to be organised. Feel free to suggest ideas.
>
> I've commented out the get_prober function, as I'm not sure what policy
> should be.
>
> Comments please.
That's what you use when you need to get information about a device and
that either requires
- certain privileges
- retrieving the information may take a long time
I don't think this is needed for ALSA since everything appears to be
in /proc/asound.
Regarding your patch, it looks like a good start; here are some things
that I think is needed
- patch against the spec documenting the various sound.* properties
- check that it's really an ALSA device and not a OSS device
- I think you can just look at the kernel name (the last element in
the sysfs path (check that it's starting with control or pcm,
but note that ALSA might also expose things such as midi*)
- expose what kind of ALSA device it is; e.g. capture, playback,
control, midi whatever
- expose the name (look at /proc/asound/card%d/pcm%d[cp]/info)
and other information that may be useful
Cheers,
David
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list