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

From: Charles Keepax
Date: Wed Jun 17 2015 - 09:09:26 EST


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@xxxxxxxxxxxxx>
> > > ---
> > > - { "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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/