summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-02-23 01:48:45 +0000
committerMark Brown <broonie@kernel.org>2022-02-28 13:34:01 +0000
commit9231bb1b25348bff738181e4614c997bcdeba7cf (patch)
tree16972cace945078b642766d7a62103a59a832b7a /sound/soc/codecs
parent765e30ac665777d7d7ad4fe75490138a85931d3a (diff)
downloadlinux-9231bb1b25348bff738181e4614c997bcdeba7cf.tar.bz2
ASoC: pcm3168a: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update the pcm3168a driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220223014846.2765382-3-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/pcm3168a.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c
index 7417cf45d916..cf27f05dc46a 100644
--- a/sound/soc/codecs/pcm3168a.c
+++ b/sound/soc/codecs/pcm3168a.c
@@ -48,7 +48,7 @@ static const char *const pcm3168a_supply_names[] = {
/* ADC/DAC side parameters */
struct pcm3168a_io_params {
- bool master_mode;
+ bool provider_mode;
unsigned int format;
int tdm_slots;
u32 tdm_mask;
@@ -357,7 +357,7 @@ static int pcm3168a_set_dai_fmt(struct snd_soc_dai *dai, unsigned int format)
struct snd_soc_component *component = dai->component;
struct pcm3168a_priv *pcm3168a = snd_soc_component_get_drvdata(component);
struct pcm3168a_io_params *io_params = &pcm3168a->io_params[dai->id];
- bool master_mode;
+ bool provider_mode;
switch (format & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_LEFT_J:
@@ -371,15 +371,15 @@ static int pcm3168a_set_dai_fmt(struct snd_soc_dai *dai, unsigned int format)
return -EINVAL;
}
- switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
- case SND_SOC_DAIFMT_CBS_CFS:
- master_mode = false;
+ switch (format & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
+ case SND_SOC_DAIFMT_CBC_CFC:
+ provider_mode = false;
break;
- case SND_SOC_DAIFMT_CBM_CFM:
- master_mode = true;
+ case SND_SOC_DAIFMT_CBP_CFP:
+ provider_mode = true;
break;
default:
- dev_err(component->dev, "unsupported master/slave mode\n");
+ dev_err(component->dev, "unsupported provider mode\n");
return -EINVAL;
}
@@ -390,7 +390,7 @@ static int pcm3168a_set_dai_fmt(struct snd_soc_dai *dai, unsigned int format)
return -EINVAL;
}
- io_params->master_mode = master_mode;
+ io_params->provider_mode = provider_mode;
io_params->format = format & SND_SOC_DAIFMT_FORMAT_MASK;
pcm3168a_update_fixup_pcm_stream(dai);
@@ -440,7 +440,7 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct pcm3168a_priv *pcm3168a = snd_soc_component_get_drvdata(component);
struct pcm3168a_io_params *io_params = &pcm3168a->io_params[dai->id];
- bool master_mode, tdm_mode;
+ bool provider_mode, tdm_mode;
unsigned int format;
unsigned int reg, mask, ms, ms_shift, fmt, fmt_shift, ratio, tdm_slots;
int i, num_scki_ratios, slot_width;
@@ -459,9 +459,9 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream,
fmt_shift = PCM3168A_ADC_FMTAD_SHIFT;
}
- master_mode = io_params->master_mode;
+ provider_mode = io_params->provider_mode;
- if (master_mode) {
+ if (provider_mode) {
ratio = pcm3168a->sysclk / params_rate(params);
for (i = 0; i < num_scki_ratios; i++) {
@@ -488,15 +488,15 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream,
switch (slot_width) {
case 16:
- if (master_mode || (format != SND_SOC_DAIFMT_RIGHT_J)) {
- dev_err(component->dev, "16-bit slots are supported only for slave mode using right justified\n");
+ if (provider_mode || (format != SND_SOC_DAIFMT_RIGHT_J)) {
+ dev_err(component->dev, "16-bit slots are supported only for consumer mode using right justified\n");
return -EINVAL;
}
break;
case 24:
- if (master_mode || (format == SND_SOC_DAIFMT_DSP_A) ||
- (format == SND_SOC_DAIFMT_DSP_B)) {
- dev_err(component->dev, "24-bit slots not supported in master mode, or slave mode using DSP\n");
+ if (provider_mode || (format == SND_SOC_DAIFMT_DSP_A) ||
+ (format == SND_SOC_DAIFMT_DSP_B)) {
+ dev_err(component->dev, "24-bit slots not supported in provider mode, or consumer mode using DSP\n");
return -EINVAL;
}
break;