[linux-audio-dev] Some ALSA mixer API questions

Ross Vandegrift ross at kallisti.us
Tue Mar 13 03:01:26 UTC 2007


Hey everyone,

I'm working my way through a simple mixer application using ALSA's
mixer API.  However, the mixer section of the documentation is blank,
so I've taken to reading through amixer's source code to try and
figure out how it does it's things.

It's a bit hard to piece together how some of the stuff goes together.
I've got the basics of getting/setting volume values and getting
volume ranges from mixer elements.

I'm a bit confused by how to get element types.  It seems like amixer
opens the ctl device to get a mixer element's type?  Am I right about
this?  It seems like a very confusing API to require the ctl device to
get info on an element from the mixer device.

If it does require a handle to the ctl device, could someone give me
the quick overview of how this works together in the big picture?  If
not, I'd appreciate a quick explanation of the right way to determine
the type of a mixer element.


-- 
Ross Vandegrift
ross at kallisti.us

"The good Christian should beware of mathematicians, and all those who
make empty prophecies. The danger already exists that the mathematicians
have made a covenant with the devil to darken the spirit and to confine
man in the bonds of Hell."
	--St. Augustine, De Genesi ad Litteram, Book II, xviii, 37



More information about the Linux-audio-dev mailing list