Commit df132fa9 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: SOF: use inclusive language for bclk and fsync

Mirror alsa-lib definitions w/ codec_provider (CP) and
codec_consumer (CC).
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20201112163100.5081-3-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f026c123
...@@ -34,15 +34,21 @@ ...@@ -34,15 +34,21 @@
#define SOF_DAI_FMT_IB_NF (3 << 8) /**< invert BCLK + nor FRM */ #define SOF_DAI_FMT_IB_NF (3 << 8) /**< invert BCLK + nor FRM */
#define SOF_DAI_FMT_IB_IF (4 << 8) /**< invert BCLK + FRM */ #define SOF_DAI_FMT_IB_IF (4 << 8) /**< invert BCLK + FRM */
#define SOF_DAI_FMT_CBM_CFM (0 << 12) /**< codec clk & FRM master */ #define SOF_DAI_FMT_CBP_CFP (0 << 12) /**< codec bclk provider & frame provider */
#define SOF_DAI_FMT_CBS_CFM (2 << 12) /**< codec clk slave & FRM master */ #define SOF_DAI_FMT_CBC_CFP (2 << 12) /**< codec bclk consumer & frame provider */
#define SOF_DAI_FMT_CBM_CFS (3 << 12) /**< codec clk master & frame slave */ #define SOF_DAI_FMT_CBP_CFC (3 << 12) /**< codec bclk provider & frame consumer */
#define SOF_DAI_FMT_CBS_CFS (4 << 12) /**< codec clk & FRM slave */ #define SOF_DAI_FMT_CBC_CFC (4 << 12) /**< codec bclk consumer & frame consumer */
/* keep old definitions for backwards compatibility */
#define SOF_DAI_FMT_CBM_CFM SOF_DAI_FMT_CBP_CFP
#define SOF_DAI_FMT_CBS_CFM SOF_DAI_FMT_CBC_CFP
#define SOF_DAI_FMT_CBM_CFS SOF_DAI_FMT_CBP_CFC
#define SOF_DAI_FMT_CBS_CFS SOF_DAI_FMT_CBC_CFC
#define SOF_DAI_FMT_FORMAT_MASK 0x000f #define SOF_DAI_FMT_FORMAT_MASK 0x000f
#define SOF_DAI_FMT_CLOCK_MASK 0x00f0 #define SOF_DAI_FMT_CLOCK_MASK 0x00f0
#define SOF_DAI_FMT_INV_MASK 0x0f00 #define SOF_DAI_FMT_INV_MASK 0x0f00
#define SOF_DAI_FMT_MASTER_MASK 0xf000 #define SOF_DAI_FMT_CLOCK_PROVIDER_MASK 0xf000
/** \brief Types of DAI */ /** \brief Types of DAI */
enum sof_ipc_dai_type { enum sof_ipc_dai_type {
......
...@@ -2777,18 +2777,18 @@ static void sof_dai_set_format(struct snd_soc_tplg_hw_config *hw_config, ...@@ -2777,18 +2777,18 @@ static void sof_dai_set_format(struct snd_soc_tplg_hw_config *hw_config,
struct sof_ipc_dai_config *config) struct sof_ipc_dai_config *config)
{ {
/* clock directions wrt codec */ /* clock directions wrt codec */
if (hw_config->bclk_provider == SND_SOC_TPLG_BCLK_CM) { if (hw_config->bclk_provider == SND_SOC_TPLG_BCLK_CP) {
/* codec is bclk master */ /* codec is bclk provider */
if (hw_config->fsync_provider == SND_SOC_TPLG_FSYNC_CM) if (hw_config->fsync_provider == SND_SOC_TPLG_FSYNC_CP)
config->format |= SOF_DAI_FMT_CBM_CFM; config->format |= SOF_DAI_FMT_CBP_CFP;
else else
config->format |= SOF_DAI_FMT_CBM_CFS; config->format |= SOF_DAI_FMT_CBP_CFC;
} else { } else {
/* codec is bclk slave */ /* codec is bclk consumer */
if (hw_config->fsync_provider == SND_SOC_TPLG_FSYNC_CM) if (hw_config->fsync_provider == SND_SOC_TPLG_FSYNC_CP)
config->format |= SOF_DAI_FMT_CBS_CFM; config->format |= SOF_DAI_FMT_CBC_CFP;
else else
config->format |= SOF_DAI_FMT_CBS_CFS; config->format |= SOF_DAI_FMT_CBC_CFC;
} }
/* inverted clocks ? */ /* inverted clocks ? */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment