* [PATCH] ASoC: dapm: Modify widget stream name according to prefix
@ 2015-05-11 2:36 Koro Chen
2015-05-12 18:07 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Koro Chen @ 2015-05-11 2:36 UTC (permalink / raw)
To: matthias.bgg, broonie, perex, tiwai
Cc: srv_heupstream, linux-mediatek, s.hauer, lgirdwood,
linux-arm-kernel, linux-kernel, alsa-devel, Koro Chen
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@mediatek.com>
---
sound/soc/soc-dapm.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index defe0f0..158204d 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3100,11 +3100,16 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
}
prefix = soc_dapm_prefix(dapm);
- if (prefix)
+ if (prefix) {
w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name);
- else
+ if (widget->sname)
+ w->sname = kasprintf(GFP_KERNEL, "%s %s", prefix,
+ widget->sname);
+ } else {
w->name = kasprintf(GFP_KERNEL, "%s", widget->name);
-
+ if (widget->sname)
+ w->sname = kasprintf(GFP_KERNEL, "%s", widget->sname);
+ }
if (w->name == NULL) {
kfree(w);
return NULL;
--
1.8.1.1.dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: dapm: Modify widget stream name according to prefix
2015-05-11 2:36 [PATCH] ASoC: dapm: Modify widget stream name according to prefix Koro Chen
@ 2015-05-12 18:07 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2015-05-12 18:07 UTC (permalink / raw)
To: Koro Chen
Cc: matthias.bgg, perex, tiwai, srv_heupstream, linux-mediatek,
s.hauer, lgirdwood, linux-arm-kernel, linux-kernel, alsa-devel
[-- Attachment #1: Type: text/plain, Size: 244 bytes --]
On Mon, May 11, 2015 at 10:36:53AM +0800, Koro Chen wrote:
> 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:
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-12 18:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-11 2:36 [PATCH] ASoC: dapm: Modify widget stream name according to prefix Koro Chen
2015-05-12 18:07 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox