[alsa-devel] [PATCH] ASoC: sgtl5000: Enable VAG when DAC/ADC up

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Mar 29 13:16:05 CEST 2012


On Thu, Mar 29, 2012 at 01:51:45PM +0800, Shawn Guo wrote:

> +	SND_SOC_DAPM_ADC_E("ADC", "Capture", SGTL5000_CHIP_ANA_POWER, 1, 0,
> +			power_vag_event,
> +			SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
> +	SND_SOC_DAPM_DAC_E("DAC", "Playback", SGTL5000_CHIP_ANA_POWER, 3, 0,
> +			power_vag_event,
> +			SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),

What would be more idiomatic here would be to make VAG a supply widget
and then connect it to DAC and ADC rather than have the event on both -
It looks like with your current code simultaneous playback and capture
will break, you'll run through the power sequences twice and if you stop
one stream it'll power down the other.

> +	{"Mic Bias", NULL, "MIC_IN"},		/* mic_in --> mic bias */
> +	{"Capture Mux", "MIC_IN", "Mic Bias"},	/* mic bias --> adc_mux */

This should be in the machine driver.
-------------- 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/20120329/4b61bfce/attachment.sig 


More information about the Alsa-devel mailing list