[alsa-devel] [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget

Shawn Guo shawn.guo at linaro.org
Thu Mar 29 07:24:13 CEST 2012


On Wed, Mar 28, 2012 at 08:53:45PM +0100, Mark Brown wrote:
> No current users and it's the last user of MICBIAS_E().
> 
> Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
> ---
>  sound/soc/codecs/sgtl5000.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
> index d192626..77beb6d 100644
> --- a/sound/soc/codecs/sgtl5000.c
> +++ b/sound/soc/codecs/sgtl5000.c
> @@ -197,9 +197,9 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
>  	SND_SOC_DAPM_OUTPUT("HP_OUT"),
>  	SND_SOC_DAPM_OUTPUT("LINE_OUT"),
>  
> -	SND_SOC_DAPM_MICBIAS_E("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> -				mic_bias_event,
> -				SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
> +	SND_SOC_DAPM_SUPPLY("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> +			    mic_bias_event,
> +			    SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
>  
It breaks my capture testing.

I'm not sure these two macros are equivalent, since they have different
.id assignment.  To quickly confirm the problem, I have the capture
back to work with the following change.

 #define SND_SOC_DAPM_SUPPLY(wname, wreg, wshift, winvert, wevent, wflags) \
-{      .id = snd_soc_dapm_supply, .name = wname, .reg = wreg,  \
+{      .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, \
        .shift = wshift, .invert = winvert, .event = wevent, \
        .event_flags = wflags}

-- 
Regards,
Shawn


More information about the Alsa-devel mailing list