diff options
author | Misael Lopez Cruz <misael.lopez@ti.com> | 2011-06-17 13:35:36 -0700 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-06-20 09:49:06 -0700 |
commit | 18ef4f8c43b5695043ec5e56d8df4956e6a6c9d2 (patch) | |
tree | d8b2d133f4c724ecceabee2edc2585b5aafbc80a /sound/soc/soc-dapm.c | |
parent | f68596f042f07868cf08c93a1b61193c06221858 (diff) | |
download | kernel_samsung_tuna-18ef4f8c43b5695043ec5e56d8df4956e6a6c9d2.zip kernel_samsung_tuna-18ef4f8c43b5695043ec5e56d8df4956e6a6c9d2.tar.gz kernel_samsung_tuna-18ef4f8c43b5695043ec5e56d8df4956e6a6c9d2.tar.bz2 |
ASoC: dapm: Fix long_name pointer for DAPM muxes
DAPM muxes' long_name (widget name for not shared controls
and widget kcontrol name for shared controls) doesn't contain
the prefix name, hence the pointer used to create the kcontrol
shouldn't include the offset of prefix name. Otherwise, kcontrol
name will have garbage characters.
Additionally, for muxes which don't have a codec name_prefix
shouldn't use the widget name as a prefix to avoid name duplication,
as the widget name will be used as long_name parameter to create
their kcontrol.
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Simon Wilson <simonwilson@google.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index dbfc895..6fb473f 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -883,7 +883,7 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w) if (dapm->codec && dapm->codec->name_prefix) prefix = dapm->codec->name_prefix; else - prefix = w->name; + prefix = NULL; if (shared) { name = w->kcontrol_news[0].name; @@ -902,7 +902,7 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w) * cut the prefix off the front of the widget name. */ kcontrol = snd_soc_cnew(&w->kcontrol_news[0], wlist, - name + prefix_len, prefix); + name, prefix); ret = snd_ctl_add(card, kcontrol); if (ret < 0) { dev_err(dapm->dev, |