ASoC: tegra: convert not to use asoc_xxx()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 11 Sep 2023 23:49:18 +0000 (23:49 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 25 Sep 2023 12:16:30 +0000 (14:16 +0200)
ASoC is now unified asoc_xxx() into snd_soc_xxx().
This patch convert asoc_xxx() to snd_soc_xxx().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87msxsqni9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/tegra/tegra_asoc_machine.c
sound/soc/tegra/tegra_audio_graph_card.c
sound/soc/tegra/tegra_pcm.c
sound/soc/tegra/tegra_wm8903.c

index f5092b4109268d184ab157452a66850fae87e71d..0e75c6d5c0c5916605d6f1ca339441bf07254b7c 100644 (file)
@@ -288,7 +288,7 @@ static int tegra_machine_hw_params(struct snd_pcm_substream *substream,
                                   struct snd_pcm_hw_params *params)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
        struct snd_soc_card *card = rtd->card;
        struct tegra_machine *machine = snd_soc_card_get_drvdata(card);
        unsigned int srate = params_rate(params);
index 4737e776d3837d60135523f64e1dc89f298e23e0..27e9f41188b482ecb7a04b447ae6ecd4894daa54 100644 (file)
@@ -34,7 +34,7 @@ enum srate_type {
 };
 
 struct tegra_audio_priv {
-       struct asoc_simple_priv simple;
+       struct simple_util_priv simple;
        struct clk *clk_plla_out0;
        struct clk *clk_plla;
 };
@@ -64,8 +64,8 @@ static bool need_clk_update(struct snd_soc_dai *dai)
 static int tegra_audio_graph_update_pll(struct snd_pcm_substream *substream,
                                        struct snd_pcm_hw_params *params)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
-       struct asoc_simple_priv *simple = snd_soc_card_get_drvdata(rtd->card);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+       struct simple_util_priv *simple = snd_soc_card_get_drvdata(rtd->card);
        struct tegra_audio_priv *priv = simple_to_tegra_priv(simple);
        struct device *dev = rtd->card->dev;
        const struct tegra_audio_cdata *data = of_device_get_match_data(dev);
@@ -152,8 +152,8 @@ static int tegra_audio_graph_update_pll(struct snd_pcm_substream *substream,
 static int tegra_audio_graph_hw_params(struct snd_pcm_substream *substream,
                                       struct snd_pcm_hw_params *params)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
-       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+       struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
        int err;
 
        if (need_clk_update(cpu_dai)) {
@@ -162,18 +162,18 @@ static int tegra_audio_graph_hw_params(struct snd_pcm_substream *substream,
                        return err;
        }
 
-       return asoc_simple_hw_params(substream, params);
+       return simple_util_hw_params(substream, params);
 }
 
 static const struct snd_soc_ops tegra_audio_graph_ops = {
-       .startup        = asoc_simple_startup,
-       .shutdown       = asoc_simple_shutdown,
+       .startup        = simple_util_startup,
+       .shutdown       = simple_util_shutdown,
        .hw_params      = tegra_audio_graph_hw_params,
 };
 
 static int tegra_audio_graph_card_probe(struct snd_soc_card *card)
 {
-       struct asoc_simple_priv *simple = snd_soc_card_get_drvdata(card);
+       struct simple_util_priv *simple = snd_soc_card_get_drvdata(card);
        struct tegra_audio_priv *priv = simple_to_tegra_priv(simple);
 
        priv->clk_plla = devm_clk_get(card->dev, "pll_a");
@@ -188,7 +188,7 @@ static int tegra_audio_graph_card_probe(struct snd_soc_card *card)
                return PTR_ERR(priv->clk_plla_out0);
        }
 
-       return asoc_graph_card_probe(card);
+       return graph_util_card_probe(card);
 }
 
 static int tegra_audio_graph_probe(struct platform_device *pdev)
@@ -248,7 +248,7 @@ static struct platform_driver tegra_audio_graph_card = {
                .of_match_table = graph_of_tegra_match,
        },
        .probe = tegra_audio_graph_probe,
-       .remove = asoc_simple_remove,
+       .remove = simple_util_remove,
 };
 module_platform_driver(tegra_audio_graph_card);
 
index 0b69cebc9a33c88941e6a09fe4f8dc3cdc0b1bb1..142e8d4eefd574878e859cb759c5dbf4d8f81a00 100644 (file)
@@ -79,7 +79,7 @@ int tegra_pcm_open(struct snd_soc_component *component,
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_dmaengine_dai_dma_data *dmap;
        struct dma_chan *chan;
-       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
+       struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
        int ret;
 
        if (rtd->dai_link->no_pcm)
@@ -151,7 +151,7 @@ int tegra_pcm_hw_params(struct snd_soc_component *component,
        if (rtd->dai_link->no_pcm)
                return 0;
 
-       dmap = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
+       dmap = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream);
        if (!dmap)
                return 0;
 
index b3cd0a34da6371e055bcd6d347a1973af3d22c3c..6116d2e30fcafcf6ef69424baaed2af157bf432d 100644 (file)
@@ -75,7 +75,7 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
                return err;
 
        if (!machine->gpiod_mic_det && machine->asoc->add_mic_jack) {
-               struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
+               struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
                struct snd_soc_component *component = codec_dai->component;
                int shrt = 0;
 
@@ -105,7 +105,7 @@ static int tegra_wm8903_remove(struct snd_soc_card *card)
 {
        struct snd_soc_dai_link *link = &card->dai_link[0];
        struct snd_soc_pcm_runtime *rtd = snd_soc_get_pcm_runtime(card, link);
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
        struct snd_soc_component *component = codec_dai->component;
 
        wm8903_mic_detect(component, NULL, 0, 0);