All of lore.kernel.org
 help / color / mirror / Atom feed
* question on SND_SOC_DAPM_MUX
@ 2011-01-05 13:38 Koul, Vinod
  2011-01-05 13:43 ` Mark Brown
  2011-01-05 19:03 ` peter.ujfalusi
  0 siblings, 2 replies; 5+ messages in thread
From: Koul, Vinod @ 2011-01-05 13:38 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org; +Cc: Mark Brown, Liam Girdwood

Hi,

I have linein and mic in my codec and a mux which takes these two inputs and
feeds to adc.

So I added this mux as:
static const char *sn95031_mic_texts[] = { "amic", "linein" };

static const struct soc_enum sn95031_micl_enum =
       SOC_ENUM_SINGLE(SN95031_ADCCONFIG, 1, 2, sn95031_mic_texts);

And in my dapm_widget array:
      SND_SOC_DAPM_MUX("Input MICL",
                        SND_SOC_NOPM, 0, 0, &sn95031_micl_mux_control),

I saw at few place in existing codecs that text in MUX (user selection) can be
used as path element (let me know if that's incorrect)


So I added :
  { "MIC1 Enable", "amic", "ADC Left"}

But while adding the routes it returns an error that 
"sn95031: Failed to add route ADC Left->MIC1 Enable "

Is this the right way to go about adding a mux selection?

~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: question on SND_SOC_DAPM_MUX
  2011-01-05 13:38 question on SND_SOC_DAPM_MUX Koul, Vinod
@ 2011-01-05 13:43 ` Mark Brown
  2011-01-05 16:10   ` Koul, Vinod
  2011-01-05 19:03 ` peter.ujfalusi
  1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2011-01-05 13:43 UTC (permalink / raw)
  To: Koul, Vinod; +Cc: alsa-devel@alsa-project.org, Liam Girdwood

On Wed, Jan 05, 2011 at 07:08:51PM +0530, Koul, Vinod wrote:

> Is this the right way to go about adding a mux selection?

It looks plausible.  Have you tried looking at the code that generates
the error and seeing what caused it to do so?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: question on SND_SOC_DAPM_MUX
  2011-01-05 13:43 ` Mark Brown
@ 2011-01-05 16:10   ` Koul, Vinod
  0 siblings, 0 replies; 5+ messages in thread
From: Koul, Vinod @ 2011-01-05 16:10 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel@alsa-project.org, Liam Girdwood

> 
> > Is this the right way to go about adding a mux selection?
> 
> It looks plausible.  Have you tried looking at the code that generates
> the error and seeing what caused it to do so?
Looks like dapm_connect_mixer() is returning ENODEV
It is going there rightly as destination is a switch here

~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: question on SND_SOC_DAPM_MUX
  2011-01-05 13:38 question on SND_SOC_DAPM_MUX Koul, Vinod
  2011-01-05 13:43 ` Mark Brown
@ 2011-01-05 19:03 ` peter.ujfalusi
  2011-01-10 10:50   ` Koul, Vinod
  1 sibling, 1 reply; 5+ messages in thread
From: peter.ujfalusi @ 2011-01-05 19:03 UTC (permalink / raw)
  To: vinod.koul, alsa-devel; +Cc: broonie, lrg

Hi
> ________________________________________
> From: alsa-devel-bounces@alsa-project.org [alsa-devel-bounces@alsa-project.org] on behalf of ext Koul, Vinod [vinod.koul@intel.com]
> Sent: Wednesday, January 05, 2011 15:38
> To: alsa-devel@alsa-project.org
> Cc: Mark Brown; Liam Girdwood
> Subject: [alsa-devel] question on SND_SOC_DAPM_MUX
> 
> Hi,
> 
> I have linein and mic in my codec and a mux which takes these two inputs and
> feeds to adc.
> 
> So I added this mux as:
> static const char *sn95031_mic_texts[] = { "amic", "linein" };
> 
> static const struct soc_enum sn95031_micl_enum =
>        SOC_ENUM_SINGLE(SN95031_ADCCONFIG, 1, 2, sn95031_mic_texts);
> 
> And in my dapm_widget array:
>       SND_SOC_DAPM_MUX("Input MICL",
>                         SND_SOC_NOPM, 0, 0, &sn95031_micl_mux_control),
> 
> I saw at few place in existing codecs that text in MUX (user selection) can be
> used as path element (let me know if that's incorrect)
> 
> 
> So I added :
>   { "MIC1 Enable", "amic", "ADC Left"}

You need to specify the route like:
  { "Input MICL", "amic", "ADC Left"}

So, if the "Input MICL" MUX is in amic position, it will connect to "ADC Left"

> But while adding the routes it returns an error that
> "sn95031: Failed to add route ADC Left->MIC1 Enable "

Since the "MIC1 Enable" widget does not have the amic route, I believe.

Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: question on SND_SOC_DAPM_MUX
  2011-01-05 19:03 ` peter.ujfalusi
@ 2011-01-10 10:50   ` Koul, Vinod
  0 siblings, 0 replies; 5+ messages in thread
From: Koul, Vinod @ 2011-01-10 10:50 UTC (permalink / raw)
  To: peter.ujfalusi@nokia.com, alsa-devel@alsa-project.org
  Cc: broonie@opensource.wolfsonmicro.com, lrg@slimlogic.co.uk

> >
> > So I added :
> >   { "MIC1 Enable", "amic", "ADC Left"}
> 
> You need to specify the route like:
>   { "Input MICL", "amic", "ADC Left"}
> 
> So, if the "Input MICL" MUX is in amic position, it will connect to "ADC Left"
> 
> > But while adding the routes it returns an error that
> > "sn95031: Failed to add route ADC Left->MIC1 Enable "
> 
> Since the "MIC1 Enable" widget does not have the amic route, I believe.
> 
Thanks Peter, 
It worked as you described, I was putting the map wrongly.... inverted actually :(

~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-10 10:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-05 13:38 question on SND_SOC_DAPM_MUX Koul, Vinod
2011-01-05 13:43 ` Mark Brown
2011-01-05 16:10   ` Koul, Vinod
2011-01-05 19:03 ` peter.ujfalusi
2011-01-10 10:50   ` Koul, Vinod

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.