[alsa-devel] RFC: PCM extra attributes
James Courtier-Dutton
james.dutton at gmail.com
Fri Jun 19 13:58:21 CEST 2009
2009/6/19 Takashi Iwai <tiwai at suse.de>:
> Hi,
>
> this is yet another topic I'm (currently) working on -- the addition
> of PCM ioctls to get/set some extra attributes. Basically, it adds
> two simple ioctls for getting/setting extra attributes to the PCM
> substream. The attribute has a sort of TLV form,
>
How is the association done between the pcm and the control?
I would have thought an easy approach could be (from userland):
snd_pcm_open( snd_pcm_t **handle, ...);
snd_pcm_get_attr( handle, int attribute_id, *attributeX );
snd_pcm_set_attr( handle, int attribute_id, *attributeX );
I.e Use the snd_pcm_t handle from the snd_pcm_open call to query and
set any controls associated with the pcm. We could then remove those
controls from being viewable in alsamixer and leave it to the
application to control them.
The only controls left in alsamixer would then be the global controls.
E.g. Speaker arrangement, master gain control etc.
The result being that applications would never need to access the
alsamixer controls, and instead only need to use the
snd_pcm_get/set_attr interface on a per PCM basis that is much more in
line with what applications actually need.
>An important note is that I'm planning to use this framework for
>getting/setting the PCM (surround) channel mapping.
Why would we want this channel mapping info in user space?
Can't we just standardize on a single channel mapping as seen from
user space, and get the driver to do any adaption if needed?
Kind Regards
James
More information about the Alsa-devel
mailing list