aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-05-14 16:47:22 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-16 04:44:18 -0400
commitfe33d4c5e2b27a4b82aa479a58f2621eec103d1b (patch)
treea12695d4ba13416ca8a5fe681f1cf10813d9af39 /sound/soc
parent018a455ac95a8cb7ad9f0ebe1019bb44cc19284c (diff)
ASoC: don't flip master of DT-instantiated DAI links
Commit 4924082 "ASoC: core: Flip master for CODECs in the CPU slot of a CODEC<->CODEC link" added code that was conditional on there being no PCM/DMA driver for the link. However, it failed to cover the case where the link was instantiated from device tree, and hence was specified by DT node rather than name. This prevents the following error on Toshiba AC100: aplay: pcm_write:1603: write error: Input/output error Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 2783d2b00dba..b37ee8077ed1 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1612,7 +1612,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
1612 } 1612 }
1613 1613
1614 /* If this is a regular CPU link there will be a platform */ 1614 /* If this is a regular CPU link there will be a platform */
1615 if (dai_fmt && dai_link->platform_name) { 1615 if (dai_fmt &&
1616 (dai_link->platform_name || dai_link->platform_of_node)) {
1616 ret = snd_soc_dai_set_fmt(card->rtd[i].cpu_dai, 1617 ret = snd_soc_dai_set_fmt(card->rtd[i].cpu_dai,
1617 dai_fmt); 1618 dai_fmt);
1618 if (ret != 0 && ret != -ENOTSUPP) 1619 if (ret != 0 && ret != -ENOTSUPP)