Commit 14688a14 authored by Mark Brown's avatar Mark Brown

ASoC: max98088: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the max98088 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-1-broonie@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6370c443
...@@ -1156,20 +1156,18 @@ static int max98088_dai1_set_fmt(struct snd_soc_dai *codec_dai, ...@@ -1156,20 +1156,18 @@ static int max98088_dai1_set_fmt(struct snd_soc_dai *codec_dai,
if (fmt != cdata->fmt) { if (fmt != cdata->fmt) {
cdata->fmt = fmt; cdata->fmt = 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:
/* Slave mode PLL */ /* Consumer mode PLL */
snd_soc_component_write(component, M98088_REG_12_DAI1_CLKCFG_HI, snd_soc_component_write(component, M98088_REG_12_DAI1_CLKCFG_HI,
0x80); 0x80);
snd_soc_component_write(component, M98088_REG_13_DAI1_CLKCFG_LO, snd_soc_component_write(component, M98088_REG_13_DAI1_CLKCFG_LO,
0x00); 0x00);
break; break;
case SND_SOC_DAIFMT_CBM_CFM: case SND_SOC_DAIFMT_CBP_CFP:
/* Set to master mode */ /* Set to provider mode */
reg14val |= M98088_DAI_MAS; reg14val |= M98088_DAI_MAS;
break; break;
case SND_SOC_DAIFMT_CBS_CFM:
case SND_SOC_DAIFMT_CBM_CFS:
default: default:
dev_err(component->dev, "Clock mode unsupported"); dev_err(component->dev, "Clock mode unsupported");
return -EINVAL; return -EINVAL;
...@@ -1227,20 +1225,18 @@ static int max98088_dai2_set_fmt(struct snd_soc_dai *codec_dai, ...@@ -1227,20 +1225,18 @@ static int max98088_dai2_set_fmt(struct snd_soc_dai *codec_dai,
if (fmt != cdata->fmt) { if (fmt != cdata->fmt) {
cdata->fmt = fmt; cdata->fmt = 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:
/* Slave mode PLL */ /* Consumer mode PLL */
snd_soc_component_write(component, M98088_REG_1A_DAI2_CLKCFG_HI, snd_soc_component_write(component, M98088_REG_1A_DAI2_CLKCFG_HI,
0x80); 0x80);
snd_soc_component_write(component, M98088_REG_1B_DAI2_CLKCFG_LO, snd_soc_component_write(component, M98088_REG_1B_DAI2_CLKCFG_LO,
0x00); 0x00);
break; break;
case SND_SOC_DAIFMT_CBM_CFM: case SND_SOC_DAIFMT_CBP_CFP:
/* Set to master mode */ /* Set to provider mode */
reg1Cval |= M98088_DAI_MAS; reg1Cval |= M98088_DAI_MAS;
break; break;
case SND_SOC_DAIFMT_CBS_CFM:
case SND_SOC_DAIFMT_CBM_CFS:
default: default:
dev_err(component->dev, "Clock mode unsupported"); dev_err(component->dev, "Clock mode unsupported");
return -EINVAL; return -EINVAL;
......
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