[alsa-devel] SND_SOC_DAPM_VIRT_MUX question

Koul, Vinod vinod.koul at intel.com
Thu Apr 7 11:20:08 CEST 2011


I have the audio DSP decoder which I tried to connect to the codec.
The decoder output is treated as Input. For the VIRT MUX i gave register
bits as SND_SOC_NOPM both in MUX as well as enum describing this as my
aim is to create a virtual mux for routing.

Aim is to have usespace be able to use this mux and connect to either
headset or speaker DAI or leave it non connected. Machine driver map is
taking care of this.

But the problem is that the this VIRT mux is not allowing me to change
values :(, set to to 1.
I remember that code checks if the path should be allowed for MUX and
implements only if its allowed, but in virtual mix case it should not do
so... or I am missing something?

static const char *sn95031_decoder_text[] = {"None", "Speaker",
static const struct soc_enum sn95031_decoder_enum =
       	SOC_ENUM_SINGLE(SND_SOC_NOPM, 0, 3, sn95031_decoder_text);
static const struct snd_kcontrol_new sn95031_decoder_control =
	SOC_DAPM_ENUM("Route", sn95031_decoder_enum);

SND_SOC_DAPM_VIRT_MUX_E("Compressed Decoder Mux",
                        SND_SOC_NOPM, 0, 0, &sn95031_decoder_control,
                        sn95031_decoder_event, SND_SOC_DAPM_POST_PMD),
SND_SOC_DAPM_INPUT("Dummy"), /* sst decoder output*/

        /* decoder output map */
        {"Compressed Decoder Mux", NULL, "Compressed Decoder"},
        {"IHFDAC Left", "Speaker", "Compressed Decoder Mux"},
        {"IHFDAC Right", "Speaker", "Compressed Decoder Mux"},
        {"PCM2_IN", "Headset", "Compressed Decoder Mux"},
        {"Dummy", "None", "Compressed Decoder Mux"},


More information about the Alsa-devel mailing list