ASoC: tegra: Update to use set_fmt_new callback
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Thu, 19 May 2022 15:42:45 +0000 (16:42 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 6 Jun 2022 11:33:48 +0000 (12:33 +0100)
As part of updating the core to directly tell drivers if they are clock
provider or consumer update these CPU side drivers to use the new direct
callback.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220519154318.2153729-24-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/tegra/tegra20_i2s.c
sound/soc/tegra/tegra210_i2s.c
sound/soc/tegra/tegra30_i2s.c

index 27365a877e4717f8d2f2c98b5ba6f69aeedf42e8..9abb0e3536d82ccb46bf4d39e019070464ca2c4b 100644 (file)
@@ -95,11 +95,11 @@ static int tegra20_i2s_set_fmt(struct snd_soc_dai *dai,
        }
 
        mask |= TEGRA20_I2S_CTRL_MASTER_ENABLE;
-       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_BP_FP:
                val |= TEGRA20_I2S_CTRL_MASTER_ENABLE;
                break;
-       case SND_SOC_DAIFMT_CBM_CFM:
+       case SND_SOC_DAIFMT_BC_FC:
                break;
        default:
                return -EINVAL;
@@ -311,7 +311,7 @@ static int tegra20_i2s_startup(struct snd_pcm_substream *substream,
 }
 
 static const struct snd_soc_dai_ops tegra20_i2s_dai_ops = {
-       .set_fmt        = tegra20_i2s_set_fmt,
+       .set_fmt_new    = tegra20_i2s_set_fmt,
        .hw_params      = tegra20_i2s_hw_params,
        .trigger        = tegra20_i2s_trigger,
        .startup        = tegra20_i2s_startup,
index 9552bbb939dd1e9343ad989a5bafb036a75db0e0..a304948ee3935434c2ccae59e768bbf9ba869ff3 100644 (file)
@@ -214,11 +214,11 @@ static int tegra210_i2s_set_fmt(struct snd_soc_dai *dai,
        unsigned int mask, val;
 
        mask = I2S_CTRL_MASTER_EN_MASK;
-       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_BP_FP:
                val = 0;
                break;
-       case SND_SOC_DAIFMT_CBM_CFM:
+       case SND_SOC_DAIFMT_BC_FC:
                val = I2S_CTRL_MASTER_EN;
                break;
        default:
@@ -678,7 +678,7 @@ static int tegra210_i2s_hw_params(struct snd_pcm_substream *substream,
 }
 
 static const struct snd_soc_dai_ops tegra210_i2s_dai_ops = {
-       .set_fmt        = tegra210_i2s_set_fmt,
+       .set_fmt_new    = tegra210_i2s_set_fmt,
        .hw_params      = tegra210_i2s_hw_params,
        .set_bclk_ratio = tegra210_i2s_set_dai_bclk_ratio,
        .set_tdm_slot   = tegra210_i2s_set_tdm_slot,
index 084a533bf4f2cc4223a20d25d98949b8889c1239..a4ea5221de6b4ba176f69aea222ec7e990efe9d1 100644 (file)
@@ -87,11 +87,11 @@ static int tegra30_i2s_set_fmt(struct snd_soc_dai *dai,
        }
 
        mask |= TEGRA30_I2S_CTRL_MASTER_ENABLE;
-       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_BP_FP:
                val |= TEGRA30_I2S_CTRL_MASTER_ENABLE;
                break;
-       case SND_SOC_DAIFMT_CBM_CFM:
+       case SND_SOC_DAIFMT_BC_FC:
                break;
        default:
                return -EINVAL;
@@ -304,7 +304,7 @@ static int tegra30_i2s_probe(struct snd_soc_dai *dai)
 }
 
 static const struct snd_soc_dai_ops tegra30_i2s_dai_ops = {
-       .set_fmt        = tegra30_i2s_set_fmt,
+       .set_fmt_new    = tegra30_i2s_set_fmt,
        .hw_params      = tegra30_i2s_hw_params,
        .trigger        = tegra30_i2s_trigger,
        .set_tdm_slot   = tegra30_i2s_set_tdm,