[alsa-devel] [PATCH v2] ASoC: wm8960: add dapm kcontrols to select left/right ADC input source

Charles Keepax ckeepax at opensource.wolfsonmicro.com
Wed Jun 17 15:09:08 CEST 2015


On Wed, Jun 17, 2015 at 04:58:30PM +0800, Zidan Wang wrote:
> On Tue, Jun 16, 2015 at 01:18:39PM +0100, Charles Keepax wrote:
> > On Tue, Jun 16, 2015 at 02:23:19PM +0800, Zidan Wang wrote:
> > > Add dapm kcontrols to select left/right ADC input source, one to select
> > > the left ADC input source and one for the right ADC input source.
> > > 
> > > In default, the left ADC will select the left input, and the right ADC will
> > > select the right input. When the left(right) ADC select the right(left) input,
> > > the left(right) input path will be powered down.
> > > 
> > > Signed-off-by: Zidan Wang <zidan.wang at freescale.com>
> > > ---
> > > -	{ "Left ADC", NULL, "Left Input Mixer" },
> > > -	{ "Right ADC", NULL, "Right Input Mixer" },
> > > +	{ "ADCL Source", "Left", "Left Input Mixer" },
> > > +	{ "ADCL Source", "Right", "Right Input Mixer" },
> > > +
> > > +	{ "ADCR Source", "Left", "Left Input Mixer" },
> > > +	{ "ADCR Source", "Right", "Right Input Mixer" },
> > > +
> > > +	{ "Left ADC", NULL, "ADCL Source" },
> > > +	{ "Right ADC", NULL, "ADCR Source" },
> > 
> > Are you sure this is correct? My reading is that those bits don't
> > affect routing at all, they mearly determine how the channel is
> > sent out on the AIF.
> > 
> I have tested on my board, it can works, but it has something wrong.
> 
> If set "ADCR Source" to "Left", RINPUT1(RINPUT2 and RINPUT3)->"Right Input Mixer" will
> be powered down, but "Right ADC" is still powered up. Do you have some best method to 
> set the audio route?

I think your last patch that didn't touch DAPM for this was
closer to correct, I would revert back to something similar to
that but fixing up for the other comments on it.

Thanks,
Charles


More information about the Alsa-devel mailing list