diff mbox

[FIX] ASoC: topology: Fix logical inversion in set_link_hw_format()

Message ID 1519336888-71831-1-git-send-email-xiuli.pan@linux.intel.com (mailing list archive)
State Accepted
Commit 7f34c3f38e9666216fda155b6ebededd1073f5aa
Headers show

Commit Message

Xiuli Pan Feb. 22, 2018, 10:01 p.m. UTC
From: Pan Xiuli <xiuli.pan@linux.intel.com>

The master/slave conventions are wrt. the codec. The topology code
contains a logical inversion, fix to follow ASoC usage.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
---
 sound/soc/soc-topology.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 561f74d..2931248 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -2030,11 +2030,11 @@  static void set_link_hw_format(struct snd_soc_dai_link *link,
 		/* clock masters */
 		bclk_master = hw_config->bclk_master;
 		fsync_master = hw_config->fsync_master;
-		if (!bclk_master && !fsync_master)
+		if (bclk_master && fsync_master)
 			link->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
-		else if (bclk_master && !fsync_master)
-			link->dai_fmt |= SND_SOC_DAIFMT_CBS_CFM;
 		else if (!bclk_master && fsync_master)
+			link->dai_fmt |= SND_SOC_DAIFMT_CBS_CFM;
+		else if (bclk_master && !fsync_master)
 			link->dai_fmt |= SND_SOC_DAIFMT_CBM_CFS;
 		else
 			link->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;