Commit c536d745 authored by Mark Brown's avatar Mark Brown

ASoC: max98390: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the max98390 driver to use more modern terminology for clocking.
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-4-broonie@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 012df28f
...@@ -174,12 +174,12 @@ static int max98390_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) ...@@ -174,12 +174,12 @@ static int max98390_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt); dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt);
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
case SND_SOC_DAIFMT_CBS_CFS: case SND_SOC_DAIFMT_CBC_CFC:
mode = MAX98390_PCM_MASTER_MODE_SLAVE; mode = MAX98390_PCM_MASTER_MODE_SLAVE;
break; break;
case SND_SOC_DAIFMT_CBM_CFM: case SND_SOC_DAIFMT_CBP_CFP:
max98390->master = true; max98390->provider = true;
mode = MAX98390_PCM_MASTER_MODE_MASTER; mode = MAX98390_PCM_MASTER_MODE_MASTER;
break; break;
default: default:
...@@ -265,7 +265,7 @@ static int max98390_set_clock(struct snd_soc_component *component, ...@@ -265,7 +265,7 @@ static int max98390_set_clock(struct snd_soc_component *component,
* snd_pcm_format_width(params_format(params)); * snd_pcm_format_width(params_format(params));
int value; int value;
if (max98390->master) { if (max98390->provider) {
int i; int i;
/* match rate to closest value */ /* match rate to closest value */
for (i = 0; i < ARRAY_SIZE(rate_table); i++) { for (i = 0; i < ARRAY_SIZE(rate_table); i++) {
......
...@@ -656,7 +656,7 @@ ...@@ -656,7 +656,7 @@
struct max98390_priv { struct max98390_priv {
struct regmap *regmap; struct regmap *regmap;
unsigned int sysclk; unsigned int sysclk;
unsigned int master; unsigned int provider;
unsigned int tdm_mode; unsigned int tdm_mode;
unsigned int v_l_slot; unsigned int v_l_slot;
unsigned int i_l_slot; unsigned int i_l_slot;
......
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