diff options
author | Mark Brown <broonie@kernel.org> | 2022-02-23 00:40:26 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-02-28 14:34:15 +0100 |
commit | 677c90bac3f198434f0256338cefc77e4663bcca (patch) | |
tree | 39ca8e97c639c101017c2b50423e4cfbbd561961 /sound/soc/codecs | |
parent | ASoC: max98926: Use modern ASoC DAI format terminology (diff) | |
download | linux-677c90bac3f198434f0256338cefc77e4663bcca.tar.xz linux-677c90bac3f198434f0256338cefc77e4663bcca.zip |
ASoC: max98927: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the max98927 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-10-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/max98927.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/max98927.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c index fd84780bf689..bf78d3c98514 100644 --- a/sound/soc/codecs/max98927.c +++ b/sound/soc/codecs/max98927.c @@ -148,12 +148,13 @@ static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt); - switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: + max98927->provider = false; mode = MAX98927_PCM_MASTER_MODE_SLAVE; break; - case SND_SOC_DAIFMT_CBM_CFM: - max98927->master = true; + case SND_SOC_DAIFMT_CBP_CFP: + max98927->provider = true; mode = MAX98927_PCM_MASTER_MODE_MASTER; break; default: @@ -270,7 +271,7 @@ static int max98927_set_clock(struct max98927_priv *max98927, int blr_clk_ratio = params_channels(params) * max98927->ch_size; int value; - if (max98927->master) { + if (max98927->provider) { int i; /* match rate to closest value */ for (i = 0; i < ARRAY_SIZE(rate_table); i++) { diff --git a/sound/soc/codecs/max98927.h b/sound/soc/codecs/max98927.h index 13f5066d7419..2353910f5f17 100644 --- a/sound/soc/codecs/max98927.h +++ b/sound/soc/codecs/max98927.h @@ -264,7 +264,7 @@ struct max98927_priv { unsigned int ch_size; unsigned int rate; unsigned int iface; - unsigned int master; + unsigned int provider; unsigned int digital_gain; bool tdm_mode; }; |