ASoC: intel: avs: convert not to use asoc_xxx()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 11 Sep 2023 23:50:41 +0000 (23:50 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 25 Sep 2023 12:16:41 +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/871qf4qnfz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
13 files changed:
sound/soc/intel/avs/boards/da7219.c
sound/soc/intel/avs/boards/es8336.c
sound/soc/intel/avs/boards/i2s_test.c
sound/soc/intel/avs/boards/max98373.c
sound/soc/intel/avs/boards/max98927.c
sound/soc/intel/avs/boards/nau8825.c
sound/soc/intel/avs/boards/rt274.c
sound/soc/intel/avs/boards/rt286.c
sound/soc/intel/avs/boards/rt298.c
sound/soc/intel/avs/boards/rt5663.c
sound/soc/intel/avs/boards/rt5682.c
sound/soc/intel/avs/boards/ssm4567.c
sound/soc/intel/avs/pcm.c

index 85014d98f7e8ab79ea083777f24d78b9611e259a..2059d6156738439eed8654451f42b92f0f7a2076 100644 (file)
@@ -90,7 +90,7 @@ static const struct snd_soc_jack_pin card_headset_pins[] = {
 
 static int avs_da7219_codec_init(struct snd_soc_pcm_runtime *runtime)
 {
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0);
        struct snd_soc_component *component = codec_dai->component;
        struct snd_soc_card *card = runtime->card;
        struct snd_soc_jack_pin *pins;
@@ -140,7 +140,7 @@ static int avs_da7219_codec_init(struct snd_soc_pcm_runtime *runtime)
 
 static void avs_da7219_codec_exit(struct snd_soc_pcm_runtime *rtd)
 {
-       snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
+       snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
 }
 
 static int
index 0a023f871d93ac6b08f4c1f078dc4089154a0ff2..6d2a7c8e445e4b82f2c5690f4e43b6e9043b5804 100644 (file)
@@ -97,7 +97,7 @@ static struct snd_soc_jack_pin card_headset_pins[] = {
 
 static int avs_es8336_codec_init(struct snd_soc_pcm_runtime *runtime)
 {
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0);
        struct snd_soc_component *component = codec_dai->component;
        struct snd_soc_card *card = runtime->card;
        struct snd_soc_jack_pin *pins;
@@ -138,7 +138,7 @@ static int avs_es8336_codec_init(struct snd_soc_pcm_runtime *runtime)
 static void avs_es8336_codec_exit(struct snd_soc_pcm_runtime *runtime)
 {
        struct avs_card_drvdata *data = snd_soc_card_get_drvdata(runtime->card);
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0);
 
        snd_soc_component_set_jack(codec_dai->component, NULL, NULL);
        gpiod_put(data->gpiod);
@@ -147,8 +147,8 @@ static void avs_es8336_codec_exit(struct snd_soc_pcm_runtime *runtime)
 static int avs_es8336_hw_params(struct snd_pcm_substream *substream,
                                struct snd_pcm_hw_params *params)
 {
-       struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream);
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0);
+       struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0);
        int clk_freq;
        int ret;
 
index bc3065c6ceda7568490b4801e331c42dc72a6a88..1dd0c59a8d91b90fab6319564043aac5d6f7948e 100644 (file)
@@ -32,7 +32,7 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in
                return -ENOMEM;
 
        dl->cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d Pin", ssp_port);
-       dl->codecs = &asoc_dummy_dlc;
+       dl->codecs = &snd_soc_dummy_dlc;
        if (!dl->cpus->dai_name || !dl->codecs->name || !dl->codecs->dai_name)
                return -ENOMEM;
 
index 3833251ade2657c6f8d4e8cf3053e3fed9f24def..7820435e3a53efe0d8317c61f3fefe38451bab9e 100644 (file)
@@ -66,7 +66,7 @@ avs_max98373_be_fixup(struct snd_soc_pcm_runtime *runrime, struct snd_pcm_hw_par
 static int avs_max98373_hw_params(struct snd_pcm_substream *substream,
                                  struct snd_pcm_hw_params *params)
 {
-       struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream);
        struct snd_soc_dai *codec_dai;
        int ret, i;
 
index 09b231bf4e6d6a32a226dbd5df10de8676bcea77..ae465b231249cd02b94fb0e6b7066054f2d883a6 100644 (file)
@@ -66,7 +66,7 @@ avs_max98927_be_fixup(struct snd_soc_pcm_runtime *runrime, struct snd_pcm_hw_par
 static int avs_max98927_hw_params(struct snd_pcm_substream *substream,
                                  struct snd_pcm_hw_params *params)
 {
-       struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream);
        struct snd_soc_dai *codec_dai;
        int ret = 0;
        int i;
index 38c5087d98e9792051c8ac9af551bb920bd6c90c..9f15b22a3c3f66442fd1b8c4fae3c430f776c979 100644 (file)
@@ -106,12 +106,12 @@ static int avs_nau8825_codec_init(struct snd_soc_pcm_runtime *runtime)
        snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
        snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
 
-       return snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, jack, NULL);
+       return snd_soc_component_set_jack(snd_soc_rtd_to_codec(runtime, 0)->component, jack, NULL);
 }
 
 static void avs_nau8825_codec_exit(struct snd_soc_pcm_runtime *rtd)
 {
-       snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
+       snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
 }
 
 static int
@@ -138,8 +138,8 @@ avs_nau8825_be_fixup(struct snd_soc_pcm_runtime *runtime, struct snd_pcm_hw_para
 static int avs_nau8825_trigger(struct snd_pcm_substream *substream, int cmd)
 {
        struct snd_pcm_runtime *runtime = substream->runtime;
-       struct snd_soc_pcm_runtime *rtm = asoc_substream_to_rtd(substream);
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtm, 0);
+       struct snd_soc_pcm_runtime *rtm = snd_soc_substream_to_rtd(substream);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtm, 0);
        int ret = 0;
 
        switch (cmd) {
index ebfee54814ceed4bed30c2d35f887cea2b07753b..b376d4c2d7063db8a21fb757bcdb3902d27c8cbc 100644 (file)
@@ -87,7 +87,7 @@ static struct snd_soc_jack_pin card_headset_pins[] = {
 
 static int avs_rt274_codec_init(struct snd_soc_pcm_runtime *runtime)
 {
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0);
        struct snd_soc_component *component = codec_dai->component;
        struct snd_soc_jack_pin *pins;
        struct snd_soc_jack *jack;
@@ -121,7 +121,7 @@ static int avs_rt274_codec_init(struct snd_soc_pcm_runtime *runtime)
 
 static void avs_rt274_codec_exit(struct snd_soc_pcm_runtime *rtd)
 {
-       snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
+       snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
 }
 
 static int avs_rt274_be_fixup(struct snd_soc_pcm_runtime *runtime, struct snd_pcm_hw_params *params)
index 84cf9a0c8dfed2bd79b6fb0c302a66184e7d3181..36da0578d5b4786fdde2bf78821db3b1abc97fb0 100644 (file)
@@ -67,12 +67,12 @@ static int avs_rt286_codec_init(struct snd_soc_pcm_runtime *runtime)
        if (ret)
                return ret;
 
-       return snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, jack, NULL);
+       return snd_soc_component_set_jack(snd_soc_rtd_to_codec(runtime, 0)->component, jack, NULL);
 }
 
 static void avs_rt286_codec_exit(struct snd_soc_pcm_runtime *rtd)
 {
-       snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
+       snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
 }
 
 static int avs_rt286_be_fixup(struct snd_soc_pcm_runtime *runtime, struct snd_pcm_hw_params *params)
@@ -98,8 +98,8 @@ static int avs_rt286_be_fixup(struct snd_soc_pcm_runtime *runtime, struct snd_pc
 static int
 avs_rt286_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params)
 {
-       struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream);
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0);
+       struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0);
        int ret;
 
        ret = snd_soc_dai_set_sysclk(codec_dai, RT286_SCLK_S_PLL, 24000000, SND_SOC_CLOCK_IN);
index 3b0e2b1a32519bcc89f060456f931ca151bdb33f..3cd8057f0ed640d6d1e049098aeb571e354f77ae 100644 (file)
@@ -78,12 +78,12 @@ static int avs_rt298_codec_init(struct snd_soc_pcm_runtime *runtime)
        if (ret)
                return ret;
 
-       return snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, jack, NULL);
+       return snd_soc_component_set_jack(snd_soc_rtd_to_codec(runtime, 0)->component, jack, NULL);
 }
 
 static void avs_rt298_codec_exit(struct snd_soc_pcm_runtime *rtd)
 {
-       snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
+       snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
 }
 
 static int avs_rt298_be_fixup(struct snd_soc_pcm_runtime *runtime, struct snd_pcm_hw_params *params)
@@ -109,8 +109,8 @@ static int avs_rt298_be_fixup(struct snd_soc_pcm_runtime *runtime, struct snd_pc
 static int
 avs_rt298_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 *codec_dai = asoc_rtd_to_codec(rtd, 0);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
        unsigned int clk_freq;
        int ret;
 
index 770b36d05bf429ac795d92ee7cf3ee8c6476b015..2e84bd629766d5beee09366583db4b178e2e53f7 100644 (file)
@@ -79,14 +79,14 @@ static int avs_rt5663_codec_init(struct snd_soc_pcm_runtime *runtime)
        snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
        snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
 
-       snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, jack, NULL);
+       snd_soc_component_set_jack(snd_soc_rtd_to_codec(runtime, 0)->component, jack, NULL);
 
        return 0;
 }
 
 static void avs_rt5663_codec_exit(struct snd_soc_pcm_runtime *runtime)
 {
-       snd_soc_component_set_jack(asoc_rtd_to_codec(runtime, 0)->component, NULL, NULL);
+       snd_soc_component_set_jack(snd_soc_rtd_to_codec(runtime, 0)->component, NULL, NULL);
 }
 
 static int
@@ -113,8 +113,8 @@ avs_rt5663_be_fixup(struct snd_soc_pcm_runtime *runtime, struct snd_pcm_hw_param
 static int avs_rt5663_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 *codec_dai = asoc_rtd_to_codec(rtd, 0);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
        int ret;
 
        /* use ASRC for internal clocks, as PLL rate isn't multiple of BCLK */
index b93468ae097736790ea8d64f5534f527fbc050a6..f1c46c6abd9de4a0f7fac696dd544a86d39dd619 100644 (file)
@@ -92,7 +92,7 @@ static struct snd_soc_jack_pin card_jack_pins[] = {
 
 static int avs_rt5682_codec_init(struct snd_soc_pcm_runtime *runtime)
 {
-       struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component;
+       struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component;
        struct snd_soc_card *card = runtime->card;
        struct snd_soc_jack_pin *pins;
        struct snd_soc_jack *jack;
@@ -137,14 +137,14 @@ static int avs_rt5682_codec_init(struct snd_soc_pcm_runtime *runtime)
 
 static void avs_rt5682_codec_exit(struct snd_soc_pcm_runtime *rtd)
 {
-       snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
+       snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
 }
 
 static int
 avs_rt5682_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params)
 {
-       struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream);
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0);
+       struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0);
        int pll_source, freq_in, freq_out;
        int ret;
 
index 7324869d61327446d990b66fbc05e922e712fdf5..27eca051122d317ca46c67499f82c2a4349736f7 100644 (file)
@@ -50,12 +50,12 @@ static int avs_ssm4567_codec_init(struct snd_soc_pcm_runtime *runtime)
        int ret;
 
        /* Slot 1 for left */
-       ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_codec(runtime, 0), 0x01, 0x01, 2, 48);
+       ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_codec(runtime, 0), 0x01, 0x01, 2, 48);
        if (ret < 0)
                return ret;
 
        /* Slot 2 for right */
-       ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_codec(runtime, 1), 0x02, 0x02, 2, 48);
+       ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_codec(runtime, 1), 0x02, 0x02, 2, 48);
        if (ret < 0)
                return ret;
 
index 8565a530706d004159b002d46c1a2a13dd4154a2..3f1f98e1a31a9f7db4ece01e31802dd6105fc7ab 100644 (file)
@@ -58,7 +58,7 @@ avs_dai_find_path_template(struct snd_soc_dai *dai, bool is_fe, int direction)
 static int avs_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai, bool is_fe,
                           const struct snd_soc_dai_ops *ops)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct avs_dev *adev = to_avs_dev(dai->dev);
        struct avs_tplg_path_template *template;
        struct avs_dma_data *data;
@@ -127,7 +127,7 @@ static int avs_dai_be_hw_params(struct snd_pcm_substream *substream,
        struct snd_soc_pcm_runtime *fe, *be;
        struct snd_soc_dpcm *dpcm;
 
-       be = asoc_substream_to_rtd(substream);
+       be = snd_soc_substream_to_rtd(substream);
        for_each_dpcm_fe(be, substream->stream, dpcm) {
                fe = dpcm->fe;
                fe_hw_params = &fe->dpcm[substream->stream].hw_params;
@@ -167,7 +167,7 @@ static int avs_dai_nonhda_be_startup(struct snd_pcm_substream *substream, struct
 
 static void avs_dai_nonhda_be_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct avs_dev *adev = to_avs_dev(dai->dev);
        struct avs_dma_data *data;
 
@@ -216,7 +216,7 @@ static int avs_dai_nonhda_be_prepare(struct snd_pcm_substream *substream, struct
 static int avs_dai_nonhda_be_trigger(struct snd_pcm_substream *substream, int cmd,
                                     struct snd_soc_dai *dai)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct avs_dma_data *data;
        int ret = 0;
 
@@ -303,7 +303,7 @@ static int avs_dai_hda_be_hw_params(struct snd_pcm_substream *substream,
 static int avs_dai_hda_be_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
 {
        struct avs_dma_data *data;
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct hdac_ext_stream *link_stream;
        struct hdac_ext_link *link;
        struct hda_codec *codec;
@@ -320,7 +320,7 @@ static int avs_dai_hda_be_hw_free(struct snd_pcm_substream *substream, struct sn
        data->path = NULL;
 
        /* clear link <-> stream mapping */
-       codec = dev_to_hda_codec(asoc_rtd_to_codec(rtd, 0)->dev);
+       codec = dev_to_hda_codec(snd_soc_rtd_to_codec(rtd, 0)->dev);
        link = snd_hdac_ext_bus_get_hlink_by_addr(&codec->bus->core, codec->core.addr);
        if (!link)
                return -EINVAL;
@@ -333,7 +333,7 @@ static int avs_dai_hda_be_hw_free(struct snd_pcm_substream *substream, struct sn
 
 static int avs_dai_hda_be_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct snd_pcm_runtime *runtime = substream->runtime;
        struct hdac_ext_stream *link_stream = runtime->private_data;
        struct hdac_ext_link *link;
@@ -345,7 +345,7 @@ static int avs_dai_hda_be_prepare(struct snd_pcm_substream *substream, struct sn
        if (link_stream->link_prepared)
                return 0;
 
-       codec = dev_to_hda_codec(asoc_rtd_to_codec(rtd, 0)->dev);
+       codec = dev_to_hda_codec(snd_soc_rtd_to_codec(rtd, 0)->dev);
        bus = &codec->bus->core;
        format_val = snd_hdac_calc_stream_format(runtime->rate, runtime->channels, runtime->format,
                                                 runtime->sample_bits, 0);
@@ -372,7 +372,7 @@ static int avs_dai_hda_be_prepare(struct snd_pcm_substream *substream, struct sn
 static int avs_dai_hda_be_trigger(struct snd_pcm_substream *substream, int cmd,
                                  struct snd_soc_dai *dai)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct hdac_ext_stream *link_stream;
        struct avs_dma_data *data;
        int ret = 0;
@@ -500,7 +500,7 @@ err:
 
 static void avs_dai_fe_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct avs_dev *adev = to_avs_dev(dai->dev);
        struct avs_dma_data *data;
 
@@ -534,7 +534,7 @@ static int avs_dai_fe_hw_params(struct snd_pcm_substream *substream,
        hdac_stream(host_stream)->period_bytes = 0;
        hdac_stream(host_stream)->format_val = 0;
 
-       fe = asoc_substream_to_rtd(substream);
+       fe = snd_soc_substream_to_rtd(substream);
        for_each_dpcm_be(fe, substream->stream, dpcm) {
                be = dpcm->be;
                be_hw_params = &be->dpcm[substream->stream].hw_params;
@@ -639,7 +639,7 @@ static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_so
 
 static int avs_dai_fe_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct avs_dma_data *data;
        struct hdac_ext_stream *host_stream;
        struct hdac_bus *bus;
@@ -869,7 +869,7 @@ static int avs_dai_resume_hw_params(struct snd_soc_dai *dai, struct avs_dma_data
        int ret;
 
        substream = data->substream;
-       rtd = asoc_substream_to_rtd(substream);
+       rtd = snd_soc_substream_to_rtd(substream);
 
        ret = dai->driver->ops->hw_params(substream, &rtd->dpcm[substream->stream].hw_params, dai);
        if (ret)
@@ -964,7 +964,7 @@ static int avs_component_pm_op(struct snd_soc_component *component, bool be,
        for_each_component_dais(component, dai) {
                data = snd_soc_dai_dma_data_get_playback(dai);
                if (data) {
-                       rtd = asoc_substream_to_rtd(data->substream);
+                       rtd = snd_soc_substream_to_rtd(data->substream);
                        if (rtd->dai_link->no_pcm == be && !rtd->dai_link->ignore_suspend) {
                                ret = op(dai, data);
                                if (ret < 0) {
@@ -977,7 +977,7 @@ static int avs_component_pm_op(struct snd_soc_component *component, bool be,
 
                data = snd_soc_dai_dma_data_get_capture(dai);
                if (data) {
-                       rtd = asoc_substream_to_rtd(data->substream);
+                       rtd = snd_soc_substream_to_rtd(data->substream);
                        if (rtd->dai_link->no_pcm == be && !rtd->dai_link->ignore_suspend) {
                                ret = op(dai, data);
                                if (ret < 0) {
@@ -1081,7 +1081,7 @@ static const struct snd_pcm_hardware avs_pcm_hardware = {
 static int avs_component_open(struct snd_soc_component *component,
                              struct snd_pcm_substream *substream)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
 
        /* only FE DAI links are handled here */
        if (rtd->dai_link->no_pcm)
@@ -1099,12 +1099,12 @@ static unsigned int avs_hda_stream_dpib_read(struct hdac_ext_stream *stream)
 static snd_pcm_uframes_t
 avs_component_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct avs_dma_data *data;
        struct hdac_ext_stream *host_stream;
        unsigned int pos;
 
-       data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
+       data = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream);
        if (!data->host_stream)
                return 0;
 
@@ -1129,7 +1129,7 @@ static int avs_component_mmap(struct snd_soc_component *component,
 static int avs_component_construct(struct snd_soc_component *component,
                                   struct snd_soc_pcm_runtime *rtd)
 {
-       struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0);
+       struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0);
        struct snd_pcm *pcm = rtd->pcm;
 
        if (dai->driver->playback.channels_min)
@@ -1430,7 +1430,7 @@ static void avs_component_hda_remove(struct snd_soc_component *component)
 static int avs_component_hda_open(struct snd_soc_component *component,
                                  struct snd_pcm_substream *substream)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct hdac_ext_stream *link_stream;
        struct hda_codec *codec;
 
@@ -1464,7 +1464,7 @@ static int avs_component_hda_open(struct snd_soc_component *component,
                return snd_soc_set_runtime_hwparams(substream, &hwparams);
        }
 
-       codec = dev_to_hda_codec(asoc_rtd_to_codec(rtd, 0)->dev);
+       codec = dev_to_hda_codec(snd_soc_rtd_to_codec(rtd, 0)->dev);
        link_stream = snd_hdac_ext_stream_assign(&codec->bus->core, substream,
                                             HDAC_EXT_STREAM_TYPE_LINK);
        if (!link_stream)
@@ -1477,7 +1477,7 @@ static int avs_component_hda_open(struct snd_soc_component *component,
 static int avs_component_hda_close(struct snd_soc_component *component,
                                   struct snd_pcm_substream *substream)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct hdac_ext_stream *link_stream;
 
        /* only BE DAI links are handled here */