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>
This commit is contained in:
Mark Brown 2022-02-22 22:35:34 +00:00
Родитель 58d858ae1c
Коммит 6d2608804e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 24D68B725D5487D0
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -84,7 +84,7 @@ struct es8328_priv {
int mclkdiv2; int mclkdiv2;
const struct snd_pcm_hw_constraint_list *sysclk_constraints; const struct snd_pcm_hw_constraint_list *sysclk_constraints;
const int *mclk_ratios; const int *mclk_ratios;
bool master; bool provider;
struct regulator_bulk_data supplies[ES8328_SUPPLY_NUM]; 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 snd_soc_component *component = dai->component;
struct es8328_priv *es8328 = snd_soc_component_get_drvdata(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, snd_pcm_hw_constraint_list(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_RATE, SNDRV_PCM_HW_PARAM_RATE,
es8328->sysclk_constraints); es8328->sysclk_constraints);
@ -486,7 +486,7 @@ static int es8328_hw_params(struct snd_pcm_substream *substream,
else else
reg = ES8328_ADCCONTROL5; reg = ES8328_ADCCONTROL5;
if (es8328->master) { if (es8328->provider) {
if (!es8328->sysclk_constraints) { if (!es8328->sysclk_constraints) {
dev_err(component->dev, "No MCLK configured\n"); dev_err(component->dev, "No MCLK configured\n");
return -EINVAL; return -EINVAL;
@ -590,19 +590,19 @@ static int es8328_set_dai_fmt(struct snd_soc_dai *codec_dai,
u8 dac_mode = 0; u8 dac_mode = 0;
u8 adc_mode = 0; u8 adc_mode = 0;
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
case SND_SOC_DAIFMT_CBM_CFM: case SND_SOC_DAIFMT_CBP_CFP:
/* Master serial port mode, with BCLK generated automatically */ /* Master serial port mode, with BCLK generated automatically */
snd_soc_component_update_bits(component, ES8328_MASTERMODE, snd_soc_component_update_bits(component, ES8328_MASTERMODE,
ES8328_MASTERMODE_MSC, ES8328_MASTERMODE_MSC,
ES8328_MASTERMODE_MSC); ES8328_MASTERMODE_MSC);
es8328->master = true; es8328->provider = true;
break; break;
case SND_SOC_DAIFMT_CBS_CFS: case SND_SOC_DAIFMT_CBC_CFC:
/* Slave serial port mode */ /* Slave serial port mode */
snd_soc_component_update_bits(component, ES8328_MASTERMODE, snd_soc_component_update_bits(component, ES8328_MASTERMODE,
ES8328_MASTERMODE_MSC, 0); ES8328_MASTERMODE_MSC, 0);
es8328->master = false; es8328->provider = false;
break; break;
default: default:
return -EINVAL; return -EINVAL;