ASoC: dapm: Modify widget stream name according to prefix
authorKoro Chen <koro.chen@mediatek.com>
Mon, 11 May 2015 02:36:53 +0000 (10:36 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 6 Aug 2015 23:32:11 +0000 (00:32 +0100)
commitb9d2bbcdce078d8b59c45e5e101c13ed1e35b6e8
tree96b04d4a3f7e48c83d3a6af6f6641b00f7f097ce
parentc36b570ffcc2cf8d0de724f24ac9fc99e2f16421
ASoC: dapm: Modify widget stream name according to prefix

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@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
[bwh: Backported to 3.2:
 - Adjust context
 - s/prefix/dapm->codec->name_prefix]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
sound/soc/soc-dapm.c