[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 09:19:51 CET 2011


On Tue, 08 Mar 2011 18:01:21 +0000
Liam Girdwood <lrg at slimlogic.co.uk> wrote:

> On Tue, 2011-03-08 at 17:25 +0000, Mark Brown wrote:
> > Currently will ignore prefixes when creating DAPM controls. Since currently
> > all control creation goes through snd_soc_cnew() we can fix this by factoring
> > the prefixing into that function.
> > 
> > Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
> 
> Acked-by: Liam Girdwood <lrg at ti.com>
> 
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.

codec driver or soc_probe_codec
 -> snd_soc_dapm_new_controls
  -> snd_soc_dapm_new_control: prefix added to w->name

soc_post_component_init
 -> snd_soc_dapm_new_widgets
  -> dapm_new_mixer/mux: prefix added again to w->name


-- 
Jarkko


More information about the Alsa-devel mailing list