[PATCH 01/10] 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: Mark Brown broonie@kernel.org --- sound/soc/codecs/max98088.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index f8e49e45ce33..429717d4ac5a 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c @@ -1156,20 +1156,18 @@ static int max98088_dai1_set_fmt(struct snd_soc_dai *codec_dai, if (fmt != cdata->fmt) { cdata->fmt = fmt;
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: - /* Slave mode PLL */ + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: + /* Consumer mode PLL */ snd_soc_component_write(component, M98088_REG_12_DAI1_CLKCFG_HI, 0x80); snd_soc_component_write(component, M98088_REG_13_DAI1_CLKCFG_LO, 0x00); break; - case SND_SOC_DAIFMT_CBM_CFM: - /* Set to master mode */ + case SND_SOC_DAIFMT_CBP_CFP: + /* Set to provider mode */ reg14val |= M98088_DAI_MAS; break; - case SND_SOC_DAIFMT_CBS_CFM: - case SND_SOC_DAIFMT_CBM_CFS: default: dev_err(component->dev, "Clock mode unsupported"); return -EINVAL; @@ -1227,20 +1225,18 @@ static int max98088_dai2_set_fmt(struct snd_soc_dai *codec_dai, if (fmt != cdata->fmt) { cdata->fmt = fmt;
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: - /* Slave mode PLL */ + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: + /* Consumer mode PLL */ snd_soc_component_write(component, M98088_REG_1A_DAI2_CLKCFG_HI, 0x80); snd_soc_component_write(component, M98088_REG_1B_DAI2_CLKCFG_LO, 0x00); break; - case SND_SOC_DAIFMT_CBM_CFM: - /* Set to master mode */ + case SND_SOC_DAIFMT_CBP_CFP: + /* Set to provider mode */ reg1Cval |= M98088_DAI_MAS; break; - case SND_SOC_DAIFMT_CBS_CFM: - case SND_SOC_DAIFMT_CBM_CFS: default: dev_err(component->dev, "Clock mode unsupported"); return -EINVAL;
As part of moving to remove the old style defines for the bus clocks update the max98095 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/max98095.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-)
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index 736cd70be725..4977b00ddf5f 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c @@ -1168,20 +1168,18 @@ static int max98095_dai1_set_fmt(struct snd_soc_dai *codec_dai, if (fmt != cdata->fmt) { cdata->fmt = fmt;
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: - /* Slave mode PLL */ + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: + /* Consumer mode PLL */ snd_soc_component_write(component, M98095_028_DAI1_CLKCFG_HI, 0x80); snd_soc_component_write(component, M98095_029_DAI1_CLKCFG_LO, 0x00); break; - case SND_SOC_DAIFMT_CBM_CFM: - /* Set to master mode */ + case SND_SOC_DAIFMT_CBP_CFP: + /* Set to provider mode */ regval |= M98095_DAI_MAS; break; - case SND_SOC_DAIFMT_CBS_CFM: - case SND_SOC_DAIFMT_CBM_CFS: default: dev_err(component->dev, "Clock mode unsupported"); return -EINVAL; @@ -1236,20 +1234,18 @@ static int max98095_dai2_set_fmt(struct snd_soc_dai *codec_dai, if (fmt != cdata->fmt) { cdata->fmt = fmt;
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: - /* Slave mode PLL */ + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: + /* Consumer mode PLL */ snd_soc_component_write(component, M98095_032_DAI2_CLKCFG_HI, 0x80); snd_soc_component_write(component, M98095_033_DAI2_CLKCFG_LO, 0x00); break; - case SND_SOC_DAIFMT_CBM_CFM: - /* Set to master mode */ + case SND_SOC_DAIFMT_CBP_CFP: + /* Set to provider mode */ regval |= M98095_DAI_MAS; break; - case SND_SOC_DAIFMT_CBS_CFM: - case SND_SOC_DAIFMT_CBM_CFS: default: dev_err(component->dev, "Clock mode unsupported"); return -EINVAL; @@ -1305,20 +1301,18 @@ static int max98095_dai3_set_fmt(struct snd_soc_dai *codec_dai, if (fmt != cdata->fmt) { cdata->fmt = fmt;
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: - /* Slave mode PLL */ + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: + /* Consumer mode PLL */ snd_soc_component_write(component, M98095_03C_DAI3_CLKCFG_HI, 0x80); snd_soc_component_write(component, M98095_03D_DAI3_CLKCFG_LO, 0x00); break; - case SND_SOC_DAIFMT_CBM_CFM: - /* Set to master mode */ + case SND_SOC_DAIFMT_CBP_CFP: + /* Set to provider mode */ regval |= M98095_DAI_MAS; break; - case SND_SOC_DAIFMT_CBS_CFM: - case SND_SOC_DAIFMT_CBM_CFS: default: dev_err(component->dev, "Clock mode unsupported"); return -EINVAL;
As part of moving to remove the old style defines for the bus clocks update the max98371 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/max98371.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/max98371.c b/sound/soc/codecs/max98371.c index e424779db02b..8d42f523e420 100644 --- a/sound/soc/codecs/max98371.c +++ b/sound/soc/codecs/max98371.c @@ -184,8 +184,8 @@ static int max98371_dai_set_fmt(struct snd_soc_dai *codec_dai, struct max98371_priv *max98371 = snd_soc_component_get_drvdata(component); unsigned int val = 0;
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: break; default: dev_err(component->dev, "DAI clock mode unsupported");
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: Mark Brown broonie@kernel.org --- sound/soc/codecs/max98390.c | 10 +++++----- sound/soc/codecs/max98390.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/max98390.c b/sound/soc/codecs/max98390.c index d1882cbc9381..40fd6f363f35 100644 --- a/sound/soc/codecs/max98390.c +++ b/sound/soc/codecs/max98390.c @@ -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);
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: mode = MAX98390_PCM_MASTER_MODE_SLAVE; break; - case SND_SOC_DAIFMT_CBM_CFM: - max98390->master = true; + case SND_SOC_DAIFMT_CBP_CFP: + max98390->provider = true; mode = MAX98390_PCM_MASTER_MODE_MASTER; break; default: @@ -265,7 +265,7 @@ static int max98390_set_clock(struct snd_soc_component *component, * snd_pcm_format_width(params_format(params)); int value;
- if (max98390->master) { + if (max98390->provider) { int i; /* match rate to closest value */ for (i = 0; i < ARRAY_SIZE(rate_table); i++) { diff --git a/sound/soc/codecs/max98390.h b/sound/soc/codecs/max98390.h index c250740f73a2..f4d6758ab4c6 100644 --- a/sound/soc/codecs/max98390.h +++ b/sound/soc/codecs/max98390.h @@ -656,7 +656,7 @@ struct max98390_priv { struct regmap *regmap; unsigned int sysclk; - unsigned int master; + unsigned int provider; unsigned int tdm_mode; unsigned int v_l_slot; unsigned int i_l_slot;
As part of moving to remove the old style defines for the bus clocks update the max9850 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/max9850.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/max9850.c b/sound/soc/codecs/max9850.c index dec51893af74..e073f0e029be 100644 --- a/sound/soc/codecs/max9850.c +++ b/sound/soc/codecs/max9850.c @@ -173,12 +173,12 @@ static int max9850_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) struct snd_soc_component *component = codec_dai->component; u8 da = 0;
- /* set master/slave audio interface */ - switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBM_CFM: + /* set clock provider for audio interface */ + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBP_CFP: da |= MAX9850_MASTER; break; - case SND_SOC_DAIFMT_CBS_CFS: + case SND_SOC_DAIFMT_CBC_CFC: break; default: return -EINVAL;
As part of moving to remove the old style defines for the bus clocks update the max9860 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/max9860.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/max9860.c b/sound/soc/codecs/max9860.c index 7c9686be59d9..82f20a8e27ad 100644 --- a/sound/soc/codecs/max9860.c +++ b/sound/soc/codecs/max9860.c @@ -268,11 +268,11 @@ static int max9860_hw_params(struct snd_pcm_substream *substream, if (params_channels(params) == 2) ifc1b |= MAX9860_ST;
- switch (max9860->fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: + switch (max9860->fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: master = 0; break; - case SND_SOC_DAIFMT_CBM_CFM: + case SND_SOC_DAIFMT_CBP_CFP: master = MAX9860_MASTER; break; default:
As part of moving to remove the old style defines for the bus clocks update the max9867 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/max9867.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index 09b2d730e9fd..c2b1151c75cc 100644 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -19,7 +19,7 @@ struct max9867_priv { struct regmap *regmap; const struct snd_pcm_hw_constraint_list *constraints; unsigned int sysclk, pclk; - bool master, dsp_a; + bool provider, dsp_a; unsigned int adc_dac_active; };
@@ -335,7 +335,7 @@ static int max9867_dai_hw_params(struct snd_pcm_substream *substream, MAX9867_NI_HIGH_MASK, (0xFF00 & ni) >> 8); regmap_update_bits(max9867->regmap, MAX9867_AUDIOCLKLOW, MAX9867_NI_LOW_MASK, 0x00FF & ni); - if (max9867->master) { + if (max9867->provider) { if (max9867->dsp_a) { value = MAX9867_IFC1B_48X; } else { @@ -442,14 +442,14 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai, struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); u8 iface1A, iface1B;
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBM_CFM: - max9867->master = true; + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBP_CFP: + max9867->provider = true; iface1A = MAX9867_MASTER; iface1B = MAX9867_IFC1B_48X; break; - case SND_SOC_DAIFMT_CBS_CFS: - max9867->master = false; + case SND_SOC_DAIFMT_CBC_CFC: + max9867->provider = false; iface1A = iface1B = 0; break; default:
As part of moving to remove the old style defines for the bus clocks update the max98925 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/max98925.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/max98925.c b/sound/soc/codecs/max98925.c index ddaccc24b0cb..f34fa274ae4f 100644 --- a/sound/soc/codecs/max98925.c +++ b/sound/soc/codecs/max98925.c @@ -300,25 +300,22 @@ static int max98925_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int invert = 0;
dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt); - switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: - /* set DAI to slave mode */ + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: regmap_update_bits(max98925->regmap, MAX98925_DAI_CLK_MODE2, M98925_DAI_MAS_MASK, 0); max98925_set_sense_data(max98925); break; - case SND_SOC_DAIFMT_CBM_CFM: + case SND_SOC_DAIFMT_CBP_CFP: /* - * set left channel DAI to master mode, - * right channel always slave + * set left channel DAI to provider mode, + * right channel always consumer */ regmap_update_bits(max98925->regmap, MAX98925_DAI_CLK_MODE2, M98925_DAI_MAS_MASK, M98925_DAI_MAS_MASK); break; - case SND_SOC_DAIFMT_CBS_CFM: - case SND_SOC_DAIFMT_CBM_CFS: default: dev_err(component->dev, "DAI clock mode unsupported"); return -EINVAL;
As part of moving to remove the old style defines for the bus clocks update the max98926 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/max98926.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/max98926.c b/sound/soc/codecs/max98926.c index f286e572263e..1fbbc62bb0a2 100644 --- a/sound/soc/codecs/max98926.c +++ b/sound/soc/codecs/max98926.c @@ -331,8 +331,8 @@ static int max98926_dai_set_fmt(struct snd_soc_dai *codec_dai,
dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt);
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: max98926_set_sense_data(max98926); break; default:
As part of moving to remove the old style defines for the bus clocks update the max98927 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/max98927.c | 11 ++++++----- sound/soc/codecs/max98927.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c index fd84780bf689..bf78d3c98514 100644 --- a/sound/soc/codecs/max98927.c +++ b/sound/soc/codecs/max98927.c @@ -148,12 +148,13 @@ static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt);
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: + max98927->provider = false; mode = MAX98927_PCM_MASTER_MODE_SLAVE; break; - case SND_SOC_DAIFMT_CBM_CFM: - max98927->master = true; + case SND_SOC_DAIFMT_CBP_CFP: + max98927->provider = true; mode = MAX98927_PCM_MASTER_MODE_MASTER; break; default: @@ -270,7 +271,7 @@ static int max98927_set_clock(struct max98927_priv *max98927, int blr_clk_ratio = params_channels(params) * max98927->ch_size; int value;
- if (max98927->master) { + if (max98927->provider) { int i; /* match rate to closest value */ for (i = 0; i < ARRAY_SIZE(rate_table); i++) { diff --git a/sound/soc/codecs/max98927.h b/sound/soc/codecs/max98927.h index 13f5066d7419..2353910f5f17 100644 --- a/sound/soc/codecs/max98927.h +++ b/sound/soc/codecs/max98927.h @@ -264,7 +264,7 @@ struct max98927_priv { unsigned int ch_size; unsigned int rate; unsigned int iface; - unsigned int master; + unsigned int provider; unsigned int digital_gain; bool tdm_mode; };
On Tue, 22 Feb 2022 23:40:17 +0000, Mark Brown wrote:
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.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[01/10] ASoC: max98088: Use modern ASoC DAI format terminology commit: 14688a14dac34aac979c1e5386278f914a73164f [02/10] ASoC: max98095: Use modern ASoC DAI format terminology commit: 2232314b7dbcf19a897e72e00d154b19669181e5 [03/10] ASoC: max98371: Use modern ASoC DAI format terminology commit: 012df28f5e143747c82d2b03428f607445fda893 [04/10] ASoC: max98390: Use modern ASoC DAI format terminology commit: c536d745adbc83abb782077a212a8cbdd7300b54 [05/10] ASoC: max9850: Use modern ASoC DAI format terminology commit: 9dcef176c4d68abc9765b420c38cca6aa85600da [06/10] ASoC: max9860: Use modern ASoC DAI format terminology commit: d14c87d8ef0da4500ee8a0a3273972f4bb549412 [07/10] ASoC: max9867: Use modern ASoC DAI format terminology commit: 2594d0aaedade65b4f746cda0f304400eb1a9870 [08/10] ASoC: max98925: Use modern ASoC DAI format terminology commit: 02dd4e6ba25ca343adf228c34955ca0036a6ade3 [09/10] ASoC: max98926: Use modern ASoC DAI format terminology commit: 502e1c8d07222561b046a1da7b8207696f575288 [10/10] ASoC: max98927: Use modern ASoC DAI format terminology commit: 677c90bac3f198434f0256338cefc77e4663bcca
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (1)
-
Mark Brown