ASoC: tlv320aic31xx: Use modern ASoC DAI format terminology
authorMark Brown <broonie@kernel.org>
Thu, 2 Jun 2022 13:53:13 +0000 (15:53 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 6 Jun 2022 12:09:18 +0000 (13:09 +0100)
As part of moving to remove the old style defines for the bus clocks update
the tlv320aic31xx driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-18-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tlv320aic31xx.c

index b2e5958..aacee23 100644 (file)
@@ -1033,8 +1033,8 @@ static int aic31xx_clock_master_routes(struct snd_soc_component *component,
        struct aic31xx_priv *aic31xx = snd_soc_component_get_drvdata(component);
        int ret;
 
-       fmt &= SND_SOC_DAIFMT_MASTER_MASK;
-       if (fmt == SND_SOC_DAIFMT_CBS_CFS &&
+       fmt &= SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK;
+       if (fmt == SND_SOC_DAIFMT_CBC_CFC &&
            aic31xx->master_dapm_route_applied) {
                /*
                 * Remove the DAPM route(s) for codec clock master modes,
@@ -1051,7 +1051,7 @@ static int aic31xx_clock_master_routes(struct snd_soc_component *component,
                        return ret;
 
                aic31xx->master_dapm_route_applied = false;
-       } else if (fmt != SND_SOC_DAIFMT_CBS_CFS &&
+       } else if (fmt != SND_SOC_DAIFMT_CBC_CFC &&
                   !aic31xx->master_dapm_route_applied) {
                /*
                 * Add the needed DAPM route(s) for codec clock master modes,
@@ -1083,21 +1083,20 @@ static int aic31xx_set_dai_fmt(struct snd_soc_dai *codec_dai,
 
        dev_dbg(component->dev, "## %s: fmt = 0x%x\n", __func__, fmt);
 
-       /* set master/slave audio interface */
-       switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
-       case SND_SOC_DAIFMT_CBM_CFM:
+       switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
+       case SND_SOC_DAIFMT_CBP_CFP:
                iface_reg1 |= AIC31XX_BCLK_MASTER | AIC31XX_WCLK_MASTER;
                break;
-       case SND_SOC_DAIFMT_CBS_CFM:
+       case SND_SOC_DAIFMT_CBC_CFP:
                iface_reg1 |= AIC31XX_WCLK_MASTER;
                break;
-       case SND_SOC_DAIFMT_CBM_CFS:
+       case SND_SOC_DAIFMT_CBP_CFC:
                iface_reg1 |= AIC31XX_BCLK_MASTER;
                break;
-       case SND_SOC_DAIFMT_CBS_CFS:
+       case SND_SOC_DAIFMT_CBC_CFC:
                break;
        default:
-               dev_err(component->dev, "Invalid DAI master/slave interface\n");
+               dev_err(component->dev, "Invalid DAI clock provider\n");
                return -EINVAL;
        }