From: Stephen Warren Date: Mon, 14 May 2012 20:47:22 +0000 (-0600) Subject: ASoC: don't flip master of DT-instantiated DAI links X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fe33d4c5e2b27a4b82aa479a58f2621eec103d1b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Mark Brown --- 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) } /* If this is a regular CPU link there will be a platform */ - if (dai_fmt && dai_link->platform_name) { + if (dai_fmt && + (dai_link->platform_name || dai_link->platform_of_node)) { ret = snd_soc_dai_set_fmt(card->rtd[i].cpu_dai, dai_fmt); if (ret != 0 && ret != -ENOTSUPP)