summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/es8328.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-02-22 23:35:34 +0100
committerMark Brown <broonie@kernel.org>2022-02-28 14:33:46 +0100
commit6d2608804ebe3516f9dd30c5428b11d9bc121764 (patch)
treea19f91b85ad7cd0408256c4a4e41c3306a1a8469 /sound/soc/codecs/es8328.c
parentASoC: inno_rk3036: Use modern ASoC DAI format terminology (diff)
downloadlinux-6d2608804ebe3516f9dd30c5428b11d9bc121764.tar.xz
linux-6d2608804ebe3516f9dd30c5428b11d9bc121764.zip
ASoC: es8328: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update the es8328 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220222223534.3212743-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/es8328.c')
-rw-r--r--sound/soc/codecs/es8328.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c
index 9632afc2d4d6..3f00ead97006 100644
--- a/sound/soc/codecs/es8328.c
+++ b/sound/soc/codecs/es8328.c
@@ -84,7 +84,7 @@ struct es8328_priv {
int mclkdiv2;
const struct snd_pcm_hw_constraint_list *sysclk_constraints;
const int *mclk_ratios;
- bool master;
+ bool provider;
struct regulator_bulk_data supplies[ES8328_SUPPLY_NUM];
};
@@ -462,7 +462,7 @@ static int es8328_startup(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component);
- if (es8328->master && es8328->sysclk_constraints)
+ if (es8328->provider && es8328->sysclk_constraints)
snd_pcm_hw_constraint_list(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_RATE,
es8328->sysclk_constraints);
@@ -486,7 +486,7 @@ static int es8328_hw_params(struct snd_pcm_substream *substream,
else
reg = ES8328_ADCCONTROL5;
- if (es8328->master) {
+ if (es8328->provider) {
if (!es8328->sysclk_constraints) {
dev_err(component->dev, "No MCLK configured\n");
return -EINVAL;
@@ -590,19 +590,19 @@ static int es8328_set_dai_fmt(struct snd_soc_dai *codec_dai,
u8 dac_mode = 0;
u8 adc_mode = 0;
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
- case SND_SOC_DAIFMT_CBM_CFM:
+ switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
+ case SND_SOC_DAIFMT_CBP_CFP:
/* Master serial port mode, with BCLK generated automatically */
snd_soc_component_update_bits(component, ES8328_MASTERMODE,
ES8328_MASTERMODE_MSC,
ES8328_MASTERMODE_MSC);
- es8328->master = true;
+ es8328->provider = true;
break;
- case SND_SOC_DAIFMT_CBS_CFS:
+ case SND_SOC_DAIFMT_CBC_CFC:
/* Slave serial port mode */
snd_soc_component_update_bits(component, ES8328_MASTERMODE,
ES8328_MASTERMODE_MSC, 0);
- es8328->master = false;
+ es8328->provider = false;
break;
default:
return -EINVAL;