Commit f9482022 authored by Mark Brown's avatar Mark Brown

ASoC: mc13783: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the mc13783 driver to use more modern terminology for clocking.
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223001416.1235951-1-broonie@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent addeb10c
...@@ -181,15 +181,14 @@ static int mc13783_set_fmt(struct snd_soc_dai *dai, unsigned int fmt, ...@@ -181,15 +181,14 @@ static int mc13783_set_fmt(struct snd_soc_dai *dai, unsigned int fmt,
} }
/* DAI clock master masks */ /* DAI clock master masks */
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:
val |= AUDIO_C_CLK_EN; val |= AUDIO_C_CLK_EN;
break; break;
case SND_SOC_DAIFMT_CBS_CFS: case SND_SOC_DAIFMT_CBC_CFC:
val |= AUDIO_CSM; val |= AUDIO_CSM;
break; break;
case SND_SOC_DAIFMT_CBM_CFS: default:
case SND_SOC_DAIFMT_CBS_CFM:
return -EINVAL; return -EINVAL;
} }
...@@ -217,11 +216,11 @@ static int mc13783_set_fmt_sync(struct snd_soc_dai *dai, unsigned int fmt) ...@@ -217,11 +216,11 @@ static int mc13783_set_fmt_sync(struct snd_soc_dai *dai, unsigned int fmt)
return ret; return ret;
/* /*
* In synchronous mode force the voice codec into slave mode * In synchronous mode force the voice codec into consumer mode
* so that the clock / framesync from the stereo DAC is used * so that the clock / framesync from the stereo DAC is used
*/ */
fmt &= ~SND_SOC_DAIFMT_MASTER_MASK; fmt &= ~SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK;
fmt |= SND_SOC_DAIFMT_CBS_CFS; fmt |= SND_SOC_DAIFMT_CBC_CFC;
ret = mc13783_set_fmt(dai, fmt, MC13783_AUDIO_CODEC); ret = mc13783_set_fmt(dai, fmt, MC13783_AUDIO_CODEC);
return ret; return ret;
......
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