[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1438473757.30946908@decadent.org.uk>
Date: Sun, 02 Aug 2015 01:02:37 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Koro Chen" <koro.chen@...iatek.com>,
"Mark Brown" <broonie@...nel.org>
Subject: [PATCH 3.2 087/164] ASoC: dapm: Modify widget stream name
according to prefix
3.2.70-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Koro Chen <koro.chen@...iatek.com>
commit fdb6eb0a12871d5bfaf266c5a0d5259a5437a72f upstream.
When there is prefix specified, currently we will add this prefix in
widget->name, but not in widget->sname.
it causes failure at snd_soc_dapm_link_dai_widgets:
if (!w->sname || !strstr(w->sname, dai_w->name))
because dai_w->name has prefix added, but w->sname does not.
We should also add prefix for stream name
Signed-off-by: Koro Chen <koro.chen@...iatek.com>
Signed-off-by: Mark Brown <broonie@...nel.org>
[bwh: Backported to 3.2:
- Adjust context
- s/prefix/dapm->codec->name_prefix]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
sound/soc/soc-dapm.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2675,12 +2675,18 @@ int snd_soc_dapm_new_control(struct snd_
kfree(w);
return -ENOMEM;
}
- if (dapm->codec && dapm->codec->name_prefix)
+ if (dapm->codec && dapm->codec->name_prefix) {
snprintf(w->name, name_len, "%s %s",
dapm->codec->name_prefix, widget->name);
- else
+ if (widget->sname)
+ w->sname = kasprintf(GFP_KERNEL, "%s %s",
+ dapm->codec->name_prefix,
+ widget->sname);
+ } else {
snprintf(w->name, name_len, "%s", widget->name);
-
+ if (widget->sname)
+ w->sname = kasprintf(GFP_KERNEL, "%s", widget->sname);
+ }
switch (w->id) {
case snd_soc_dapm_switch:
case snd_soc_dapm_mixer:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists