[alsa-devel] How to implement capture_switch control?
jiang.adam at gmail.com
Wed Jun 22 09:56:26 CEST 2011
2011/6/21 Mark Brown <broonie at opensource.wolfsonmicro.com>:
> On Mon, Jun 20, 2011 at 04:15:38PM +0900, Adam Jiang wrote:
>> I have a device with wm8903 codec. To support mute/unmute capture
>> signal, I was trying to enable/disable PGA on this codec from user
>> space application like
> If the hardware does not physically support mute then this should be
> emulated in software. In the case of the WM8903 the device does not
> have a specific capture mute control, though extremely low gains are
> supported for the Capture Volume control which function as a mute so
> you could also set minimum Capture Volume.
I got the idea about software emulation for mute. Would you please
point me to an example about device/driver where hardware capture
switch is supported?
>> alwasy return false. I guess something is missing in my driver. Could
>> you please give some bright how could I use capture switch to
>> mute/unmute a channel. How could I implement capture_switch control
>> properly? Thank you!
> Not all hardware supports all possible features. Either configure a
> software volume control, the softvol plugin for ALSA should be able to
> do this, or adjust your application to handle this in the application
> has some information on using softvol.
I have solved the problem by enabling/disabling PGA for analog input
paths. For digital mic on wm8903, this function could be implemented
by turning volume to lowest level for mute, and restore volume level
for unmute. Thank you!
More information about the Alsa-devel