[alsa-devel] [PATCH] ASoC: Fix prefixing of DAPM controls by factoring prefix into snd_soc_cnew()

Jarkko Nikula jhnikula at gmail.com
Wed Mar 9 12:35:56 CET 2011

On Wed, 9 Mar 2011 11:03:14 +0000
Mark Brown <broonie at opensource.wolfsonmicro.com> wrote:

> On Wed, Mar 09, 2011 at 10:19:51AM +0200, Jarkko Nikula wrote:
> > Unfortunately this leads to double prefixing to mixer and mux controls
> > on Nokia RX-51/N900 in today's head. Reason there is that the
> > snd_soc_dapm_new_control has already added the prefix to widget name
> > and the dapm_new_mixer/mux takes this prefixed w->name and prefixes it
> > again.
> The system I'm using isn't affected as there's no unnamed mixers in it.
> I rather suspect this means that the old code is broken for named
> mixers.  Working on a fix just now.

Yeah, just realized the prefixing indeed was broken originally for named
mixers in sound/soc/soc-dapm.c: dapm_new_mixer as only w->name carried
the prefix and which is not included for snd_soc_dapm_mixer_named_ctl
case. My bad...

switch (w->id) {
	snprintf(path->long_name, name_len, "%s %s",
		 w->name, w->kcontrols[i].name);
case snd_soc_dapm_mixer_named_ctl:
	snprintf(path->long_name, name_len, "%s",


More information about the Alsa-devel mailing list