summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-01-20 12:50:40 +0100
committerMark Brown <broonie@linaro.org>2014-01-20 12:50:40 +0100
commit4cfa1a385fc57999180eb6720ee2487f549f4e03 (patch)
tree0fc332bb4fbaf48dfe2a2b50a03661571169b98d /sound/soc
parentMerge branch 'for-next' into for-linus (diff)
parentASoC: dapm: Fix double prefix addition (diff)
downloadlinux-4cfa1a385fc57999180eb6720ee2487f549f4e03.tar.xz
linux-4cfa1a385fc57999180eb6720ee2487f549f4e03.zip
Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-dapm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 2a44fe9122a2..dc8ff13187f7 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2476,7 +2476,8 @@ err:
}
static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm,
- const struct snd_soc_dapm_route *route)
+ const struct snd_soc_dapm_route *route,
+ unsigned int is_prefixed)
{
struct snd_soc_dapm_widget *wsource = NULL, *wsink = NULL, *w;
struct snd_soc_dapm_widget *wtsource = NULL, *wtsink = NULL;
@@ -2486,7 +2487,7 @@ static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm,
char prefixed_source[80];
int ret;
- if (dapm->codec && dapm->codec->name_prefix) {
+ if (dapm->codec && dapm->codec->name_prefix && !is_prefixed) {
snprintf(prefixed_sink, sizeof(prefixed_sink), "%s %s",
dapm->codec->name_prefix, route->sink);
sink = prefixed_sink;
@@ -2614,7 +2615,7 @@ int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT);
for (i = 0; i < num; i++) {
- r = snd_soc_dapm_add_route(dapm, route);
+ r = snd_soc_dapm_add_route(dapm, route, false);
if (r < 0) {
dev_err(dapm->dev, "ASoC: Failed to add route %s -> %s -> %s\n",
route->source,
@@ -3670,7 +3671,7 @@ void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card)
cpu_dai->codec->name, r.source,
codec_dai->platform->name, r.sink);
- snd_soc_dapm_add_route(&card->dapm, &r);
+ snd_soc_dapm_add_route(&card->dapm, &r, true);
}
/* connect BE DAI capture if widgets are valid */
@@ -3681,7 +3682,7 @@ void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card)
codec_dai->codec->name, r.source,
cpu_dai->platform->name, r.sink);
- snd_soc_dapm_add_route(&card->dapm, &r);
+ snd_soc_dapm_add_route(&card->dapm, &r, true);
}
}