[James Courtier-Dutton]
Tim Goetze wrote:
A provision for reliably identifying the mixer
control(s) belonging to a given
open PCM channel would be very nice to have.
Cheers, Tim
Yes, that's certainly nice to have. :-)
If you only knew how exceptionally hard that is to actually achieve. :-(
From my days of poking around alsa-lib and -driver
sources back when
the ice1712 driver wouldn't support the audiophile out of the
box, I
seem to remember ... yes, it seemed hard then already, and maybe even
more so with drivers capable of dynamic channel assignment, like
snd-via82xx on this box.
There is currently work to achieve this for the Audigy
2 sound card, hopefully
support for that will follow for other sound cards.
What sort of API would you like?
One suggested is where one opens the PCM channel in order to write samples to
it, and then uses the opened handle to talk to the mixer controls.
As far as I remember, I would have liked to give alsa-lib my handle to
the PCM device and the channel number and use that to start an
enumeration of the respective mixer controls.
If I'm not mistaken (it's been awhile and unfortunately current API
docs aren't readily available to me) that would be enough since the
type of a control -- gain, balance, eq or whatever -- is communicated
along with the mixer control id or can easily be queried.
As you suggest, this seems unnecessary for inbound sample streams but
I won't venture to claim that's definite.
Cheers, Tim