summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhani Kumar Uppalapati <phaniu@codeaurora.org>2015-06-22 20:46:49 -0700
committerKyle Yan <kyan@codeaurora.org>2016-06-21 15:11:54 -0700
commita0da30d1baeb8341fbc1dd70880eb71577b7e0ea (patch)
tree6a6d03ab9bd2b5ce12d86ebf53217a79947664b2
parentddd6e3c8304fb419dd8ec513577f99ef30fa7f72 (diff)
ASoC: dapm: Avoid static route b/w cpu and codec dai
Currently ASoC core creates a static route b/w playback/capture widgets of cpu and codec dai if they are part of the same dai-link. However this will cause codec path to get powered up first followed by the backend dai start during device switch use-case where the front-end is not closed, leading to audio playback failure if either bit-width or sample rate is different. CRs-Fixed: 1029118 Change-Id: I180515f2ad55d1f446ad7eb1ad0bd71809db94bd Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
-rw-r--r--sound/soc/soc-dapm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 6d55ab029541..c16df0a70b11 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3848,6 +3848,9 @@ static void dapm_connect_dai_link_widgets(struct snd_soc_card *card,
for (i = 0; i < rtd->num_codecs; i++) {
struct snd_soc_dai *codec_dai = rtd->codec_dais[i];
+ if (!cpu_dai->component->codec)
+ continue;
+
/* connect BE DAI playback if widgets are valid */
if (codec_dai->playback_widget && cpu_dai->playback_widget) {
source = cpu_dai->playback_widget;