[alsa-devel] Getting the correct capture mixer
Ludovico Cavedon
ludovico.cavedon at gmail.com
Sun Apr 26 06:17:03 CEST 2009
Hi,
I am working on fixing some audio related bugs of a VoIP application
(qutecom) which, like most VoIP applications, allows the user to change
the playback and recording volume.
For playback volume I am opening the "Master" mixer element.
However I am not able to figure out how the application should get the
correct mixer for playback. Is there any rule?
For example, my sound card has two capture volumes, one "Int Mic" and
one "Ext Mic". I guess I should choose on the basis of what is the
user-selected mic. In fact there are also two mutually exclusive
switches "IntMic" and "ExtMic". But how should the application
understand that?
Here part of the output of amixer, my sound card is
"Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]"
----------------------------
Simple mixer control 'Ext Mic',0
Capabilities: pvolume cvolume pswitch cswitch
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 20 Capture 0 - 23
Front Left: Playback 0 [0%] [-30.00dB] [off] Capture 0 [0%] [0.00dB] [off]
Front Right: Playback 0 [0%] [-30.00dB] [off] Capture 0 [0%] [0.00dB]
[off]
Simple mixer control 'ExtMic',0
Capabilities: cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Capture channels: Mono
Mono: Capture [off]
Simple mixer control 'Int Mic',0
Capabilities: pvolume cvolume pswitch cswitch
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 20 Capture 0 - 23
Front Left: Playback 0 [0%] [-30.00dB] [off] Capture 0 [0%] [0.00dB] [off]
Front Right: Playback 0 [0%] [-30.00dB] [off] Capture 0 [0%] [0.00dB]
[off]
Simple mixer control 'IntMic',0
Capabilities: cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Capture channels: Mono
Mono: Capture [on]
------------------------
As an aside, it looks like that the capture volume has no effect, as
well all as the cswitches and pswitches of "Int Mic" and "Ext Mic".
Thanks,
Ludovico
More information about the Alsa-devel
mailing list