From: Pan Xiuli xiuli.pan@linux.intel.com
DAI is codec here in topology pipeline, thus we should not change the settinga into oppsite value, as the tplg file is written from the codec view.
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
--- Test with: Mininow max rt5651 SOF master: 019637ab250daa53c15da0a0a98c54f1c58d8ca3 SOF-Tool master: 33e4b0cc6f6a44e3e7ee849c04c515a5537242c7 https://github.com/plbossart/sound/tree/topic/sof-v4.14: 6fa721a8b7c6567eea0a2181bf9a3d2a12c31b00
Work with patch of SOF-Tool: topology: m4: add default_hw_conf_id --- sound/soc/soc-topology.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index e471352..df3bcf0 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2018,11 +2018,11 @@ static void set_link_hw_format(struct snd_soc_dai_link *link, /* clock signal polarity */ invert_bclk = hw_config->invert_bclk; invert_fsync = hw_config->invert_fsync; - if (!invert_bclk && !invert_fsync) + if (invert_bclk && invert_fsync) link->dai_fmt |= SND_SOC_DAIFMT_NB_NF; - else if (!invert_bclk && invert_fsync) + else if (invert_bclk && invert_fsync) link->dai_fmt |= SND_SOC_DAIFMT_NB_IF; - else if (invert_bclk && !invert_fsync) + else if (!invert_bclk && invert_fsync) link->dai_fmt |= SND_SOC_DAIFMT_IB_NF; else link->dai_fmt |= SND_SOC_DAIFMT_IB_IF; @@ -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;