[PATCH 1/2] ASoC: tscs42xx: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update the tscs42xx driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/tscs42xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/tscs42xx.c b/sound/soc/codecs/tscs42xx.c index fb861baf50e8..5b63e017a43b 100644 --- a/sound/soc/codecs/tscs42xx.c +++ b/sound/soc/codecs/tscs42xx.c @@ -1197,9 +1197,9 @@ static int tscs42xx_set_dai_fmt(struct snd_soc_dai *codec_dai, struct snd_soc_component *component = codec_dai->component; int ret;
- /* Slave mode not supported since it needs always-on frame clock */ - switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBM_CFM: + /* Consumer mode not supported since it needs always-on frame clock */ + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBP_CFP: ret = snd_soc_component_update_bits(component, R_AIC1, RM_AIC1_MS, RV_AIC1_MS_MASTER); if (ret < 0) {
As part of moving to remove the old style defines for the bus clocks update the tscs454 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/tscs454.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/sound/soc/codecs/tscs454.c b/sound/soc/codecs/tscs454.c index 43220bb36701..7e1826d6f06f 100644 --- a/sound/soc/codecs/tscs454.c +++ b/sound/soc/codecs/tscs454.c @@ -57,7 +57,7 @@ struct internal_rate {
struct aif { unsigned int id; - bool master; + bool provider; struct pll *pll; };
@@ -756,8 +756,8 @@ static int pll_power_event(struct snd_soc_dapm_widget *w, return 0; }
-static inline int aif_set_master(struct snd_soc_component *component, - unsigned int aif_id, bool master) +static inline int aif_set_provider(struct snd_soc_component *component, + unsigned int aif_id, bool provider) { unsigned int reg; unsigned int mask; @@ -780,12 +780,12 @@ static inline int aif_set_master(struct snd_soc_component *component, return ret; } mask = FM_I2SPCTL_PORTMS; - val = master ? FV_PORTMS_MASTER : FV_PORTMS_SLAVE; + val = provider ? FV_PORTMS_MASTER : FV_PORTMS_SLAVE;
ret = snd_soc_component_update_bits(component, reg, mask, val); if (ret < 0) { dev_err(component->dev, "Failed to set DAI %d to %s (%d)\n", - aif_id, master ? "master" : "slave", ret); + aif_id, provider ? "provider" : "consumer", ret); return ret; }
@@ -797,7 +797,7 @@ int aif_prepare(struct snd_soc_component *component, struct aif *aif) { int ret;
- ret = aif_set_master(component, aif->id, aif->master); + ret = aif_set_provider(component, aif->id, aif->provider); if (ret < 0) return ret;
@@ -820,7 +820,7 @@ static inline int aif_free(struct snd_soc_component *component,
if (!aif_active(&tscs454->aifs_status, aif->id)) { /* Do config in slave mode */ - aif_set_master(component, aif->id, false); + aif_set_provider(component, aif->id, false); dev_dbg(component->dev, "Freeing pll %d from aif %d\n", aif->pll->id, aif->id); free_pll(aif->pll); @@ -2708,17 +2708,17 @@ static int tscs454_set_bclk_ratio(struct snd_soc_dai *dai, return 0; }
-static inline int set_aif_master_from_fmt(struct snd_soc_component *component, +static inline int set_aif_provider_from_fmt(struct snd_soc_component *component, struct aif *aif, unsigned int fmt) { int ret;
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBM_CFM: - aif->master = true; + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBP_CFP: + aif->provider = true; break; - case SND_SOC_DAIFMT_CBS_CFS: - aif->master = false; + case SND_SOC_DAIFMT_CBC_CFC: + aif->provider = false; break; default: ret = -EINVAL; @@ -2888,7 +2888,7 @@ static int tscs454_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) struct aif *aif = &tscs454->aifs[dai->id]; int ret;
- ret = set_aif_master_from_fmt(component, aif, fmt); + ret = set_aif_provider_from_fmt(component, aif, fmt); if (ret < 0) return ret;
On Wed, 23 Feb 2022 00:27:50 +0000, Mark Brown wrote:
As part of moving to remove the old style defines for the bus clocks update the tscs42xx 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!
[1/2] ASoC: tscs42xx: Use modern ASoC DAI format terminology commit: 7cba0b38c3e8eff221afb9c8b55d9aecaa6bcf74 [2/2] ASoC: tscs454: Use modern ASoC DAI format terminology commit: df63fb10a5b7e00dc247f4d2e229f98898ed21c1
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