[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"}
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
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
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
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
participants (3)
-
Koul, Vinod
-
Mark Brown
-
peter.ujfalusi@nokia.com