[alsa-devel] SND_SOC_DAPM_VIRT_MUX question

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Apr 11 22:27:54 CEST 2011

On Thu, Apr 07, 2011 at 02:50:08PM +0530, Koul, Vinod wrote:

> 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?

It should be possible to set the mux to any value, the routes will only
be created if they exist but that shouldn't affect the control itself.
The only check _put_enum_virt() does is if the value is greater than the
number of elements in the enumeration.


| static const char *sn95031_decoder_text[] = {"None", "Speaker",
|         "Headset"};
| 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);

...I think you want to be using an ENUM_VIRT here?

More information about the Alsa-devel mailing list