aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
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:
2476} 2476}
2477 2477
2478static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm, 2478static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm,
2479 const struct snd_soc_dapm_route *route) 2479 const struct snd_soc_dapm_route *route,
2480 unsigned int is_prefixed)
2480{ 2481{
2481 struct snd_soc_dapm_widget *wsource = NULL, *wsink = NULL, *w; 2482 struct snd_soc_dapm_widget *wsource = NULL, *wsink = NULL, *w;
2482 struct snd_soc_dapm_widget *wtsource = NULL, *wtsink = NULL; 2483 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,
2486 char prefixed_source[80]; 2487 char prefixed_source[80];
2487 int ret; 2488 int ret;
2488 2489
2489 if (dapm->codec && dapm->codec->name_prefix) { 2490 if (dapm->codec && dapm->codec->name_prefix && !is_prefixed) {
2490 snprintf(prefixed_sink, sizeof(prefixed_sink), "%s %s", 2491 snprintf(prefixed_sink, sizeof(prefixed_sink), "%s %s",
2491 dapm->codec->name_prefix, route->sink); 2492 dapm->codec->name_prefix, route->sink);
2492 sink = prefixed_sink; 2493 sink = prefixed_sink;
@@ -2614,7 +2615,7 @@ int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
2614 2615
2615 mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); 2616 mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT);
2616 for (i = 0; i < num; i++) { 2617 for (i = 0; i < num; i++) {
2617 r = snd_soc_dapm_add_route(dapm, route); 2618 r = snd_soc_dapm_add_route(dapm, route, false);
2618 if (r < 0) { 2619 if (r < 0) {
2619 dev_err(dapm->dev, "ASoC: Failed to add route %s -> %s -> %s\n", 2620 dev_err(dapm->dev, "ASoC: Failed to add route %s -> %s -> %s\n",
2620 route->source, 2621 route->source,
@@ -3670,7 +3671,7 @@ void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card)
3670 cpu_dai->codec->name, r.source, 3671 cpu_dai->codec->name, r.source,
3671 codec_dai->platform->name, r.sink); 3672 codec_dai->platform->name, r.sink);
3672 3673
3673 snd_soc_dapm_add_route(&card->dapm, &r); 3674 snd_soc_dapm_add_route(&card->dapm, &r, true);
3674 } 3675 }
3675 3676
3676 /* connect BE DAI capture if widgets are valid */ 3677 /* 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)
3681 codec_dai->codec->name, r.source, 3682 codec_dai->codec->name, r.source,
3682 cpu_dai->platform->name, r.sink); 3683 cpu_dai->platform->name, r.sink);
3683 3684
3684 snd_soc_dapm_add_route(&card->dapm, &r); 3685 snd_soc_dapm_add_route(&card->dapm, &r, true);
3685 } 3686 }
3686 3687
3687 } 3688 }