[alsa-devel] ASoC: wm9712: Microphone doesn't work, "Capture Volume" inverted

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Apr 26 13:27:26 CEST 2012

On Wed, Apr 25, 2012 at 10:07:49PM +0200, Christoph Fritz wrote:

> # amixer sset "Mic Select Source" 'Mic 2'
> Simple mixer control 'Mic Select Source',0
>   Capabilities: enum
>   Items: 'Mic 1' 'Differential' 'Mic 2' 'Stereo'
>   Item0: 'Mic 1'

Nothing springing to mind here, can you see logging for the register

> When I tested arecord for line-in, the "Capture Slide" in alsamixer was
> wrongly inverted.
> in sound/soc/codecs/wm9712.c:
>        SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1),
> should get:
>        SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 0),
> If you want I can send a patch in.

Yes, please.  In general this is always a good thing to do if you spot
an error in the code.

> Since patch "ASoC: Sync initial widget state with hardware"
> (commitid: b66a70d5e9929f3b0df5a7177bba75652d2f4c3e) the mic capture doesn't
> work. The MICBIAS bit from the "Power Management" Register are alway 1 (disabled).
> So that the captering works the active status must be set to 1, at the right time.
> That this works the stream name must be set.

This analysis seems a bit confused - how does changing the initial state
affect the dynamic changes at runtime?

>  #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \
> -{	.id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \
> +{	.id = snd_soc_dapm_micbias, .name = wname, .sname = \
> +	"Mic Bias HiFi Capture", .reg = wreg, .shift = wshift, \

This isn't right, the mic bias clearly shouldn't be associated with a
stream as you can do capture without microphone (eg, from a line input)
and you can have a bypass path with no capture.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120426/b2b7c979/attachment.sig 

More information about the Alsa-devel mailing list