ASoC: mediatek: convert not to use asoc_xxx()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 26 Sep 2023 06:23:35 +0000 (06:23 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 26 Sep 2023 15:18:38 +0000 (17:18 +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/877codh2qg.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
24 files changed:
sound/soc/mediatek/common/mtk-afe-fe-dai.c
sound/soc/mediatek/common/mtk-afe-platform-driver.c
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
sound/soc/mediatek/mt2701/mt2701-cs42448.c
sound/soc/mediatek/mt2701/mt2701-wm8960.c
sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
sound/soc/mediatek/mt8173/mt8173-max98090.c
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c
sound/soc/mediatek/mt8173/mt8173-rt5650.c
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
sound/soc/mediatek/mt8186/mt8186-mt6366-common.c
sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c
sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
sound/soc/mediatek/mt8188/mt8188-mt6359.c
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
sound/soc/mediatek/mt8195/mt8195-mt6359.c

index 395be97f13ae08b27bffad219224c2ca4b57d0d4..3044d9ab3d4d95e53a414281a072b77c5d24acf3 100644 (file)
@@ -37,10 +37,10 @@ static int mtk_regmap_write(struct regmap *map, int reg, unsigned int val)
 int mtk_afe_fe_startup(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 mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
        struct snd_pcm_runtime *runtime = substream->runtime;
-       int memif_num = asoc_rtd_to_cpu(rtd, 0)->id;
+       int memif_num = snd_soc_rtd_to_cpu(rtd, 0)->id;
        struct mtk_base_afe_memif *memif = &afe->memif[memif_num];
        const struct snd_pcm_hardware *mtk_afe_hardware = afe->mtk_afe_hardware;
        int ret;
@@ -98,9 +98,9 @@ EXPORT_SYMBOL_GPL(mtk_afe_fe_startup);
 void mtk_afe_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 mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
-       struct mtk_base_afe_memif *memif = &afe->memif[asoc_rtd_to_cpu(rtd, 0)->id];
+       struct mtk_base_afe_memif *memif = &afe->memif[snd_soc_rtd_to_cpu(rtd, 0)->id];
        int irq_id;
 
        irq_id = memif->irq_usage;
@@ -120,9 +120,9 @@ int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream,
                         struct snd_pcm_hw_params *params,
                         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 mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        struct mtk_base_afe_memif *memif = &afe->memif[id];
        int ret;
        unsigned int channels = params_channels(params);
@@ -196,10 +196,10 @@ EXPORT_SYMBOL_GPL(mtk_afe_fe_hw_free);
 int mtk_afe_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 snd_pcm_runtime * const runtime = substream->runtime;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        struct mtk_base_afe_memif *memif = &afe->memif[id];
        struct mtk_base_afe_irq *irqs = &afe->irqs[memif->irq_usage];
        const struct mtk_base_irq_data *irq_data = irqs->irq_data;
@@ -263,9 +263,9 @@ EXPORT_SYMBOL_GPL(mtk_afe_fe_trigger);
 int mtk_afe_fe_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 mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        int pbuf_size;
 
        if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
@@ -523,7 +523,7 @@ EXPORT_SYMBOL_GPL(mtk_memif_set_rate);
 int mtk_memif_set_rate_substream(struct snd_pcm_substream *substream,
                                 int id, unsigned int rate)
 {
-       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_soc_component *component =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
index 01501d5747a7c0fb67b8d962ecb91aad6a591c06..32edcb6d5219877ca43f845ce3b40cc42c619872 100644 (file)
@@ -80,9 +80,9 @@ EXPORT_SYMBOL_GPL(mtk_afe_add_sub_dai_control);
 snd_pcm_uframes_t mtk_afe_pcm_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 mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
-       struct mtk_base_afe_memif *memif = &afe->memif[asoc_rtd_to_cpu(rtd, 0)->id];
+       struct mtk_base_afe_memif *memif = &afe->memif[snd_soc_rtd_to_cpu(rtd, 0)->id];
        const struct mtk_base_memif_data *memif_data = memif->data;
        struct regmap *regmap = afe->regmap;
        struct device *dev = afe->dev;
index c9d4420e9b4c18945b52fb9d539723c43ed0054f..86885117f7f75984088b8596262876f33051545e 100644 (file)
@@ -494,10 +494,10 @@ static int mt2701_dlm_fe_trigger(struct snd_pcm_substream *substream,
 static int mt2701_memif_fs(struct snd_pcm_substream *substream,
                           unsigned int rate)
 {
-       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+       struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        int fs;
 
-       if (asoc_rtd_to_cpu(rtd, 0)->id != MT2701_MEMIF_ULBT)
+       if (snd_soc_rtd_to_cpu(rtd, 0)->id != MT2701_MEMIF_ULBT)
                fs = mt2701_afe_i2s_fs(rate);
        else
                fs = (rate == 16000 ? 1 : 0);
index 08ef109744c7c04d307d70c3172f7b5d090b5e2e..fc80e2cfb5b9bc389c20a058cbb1c9fd6822435d 100644 (file)
@@ -127,9 +127,9 @@ static const struct snd_soc_ops mt2701_cs42448_48k_fe_ops = {
 static int mt2701_cs42448_be_ops_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_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 *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
        unsigned int mclk_rate;
        unsigned int rate = params_rate(params);
        unsigned int div_mclk_over_bck = rate > 192000 ? 2 : 4;
index a184032c15b6b75a41abeae9b7ac21560b4f139f..8a6643bfe830e36c3c86dd4cb38b9472b4ceee13 100644 (file)
@@ -24,9 +24,9 @@ static const struct snd_kcontrol_new mt2701_wm8960_controls[] = {
 static int mt2701_wm8960_be_ops_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_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 *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
+       struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
        unsigned int mclk_rate;
        unsigned int rate = params_rate(params);
        unsigned int div_mclk_over_bck = rate > 192000 ? 2 : 4;
index 43038444c43dce7264b2c269d60924ce8bc9f81f..da7267c684b1730e07de90bde04483d2ee829c5c 100644 (file)
@@ -139,18 +139,18 @@ static const struct snd_pcm_hardware mt6797_afe_hardware = {
 static int mt6797_memif_fs(struct snd_pcm_substream *substream,
                           unsigned int rate)
 {
-       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_soc_component *component =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
 
        return mt6797_rate_transform(afe->dev, rate, id);
 }
 
 static int mt6797_irq_fs(struct snd_pcm_substream *substream, unsigned int rate)
 {
-       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_soc_component *component =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
index 06269f7e37566b5e64ff6a7831566ae817861588..b6291b7c811e5c15efbac4059032fc6b9eee5d1a 100644 (file)
@@ -480,10 +480,10 @@ static int mt8173_afe_hdmi_trigger(struct snd_pcm_substream *substream, int cmd,
 static int mt8173_memif_fs(struct snd_pcm_substream *substream,
                           unsigned int rate)
 {
-       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_soc_component *component = snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
-       struct mtk_base_afe_memif *memif = &afe->memif[asoc_rtd_to_cpu(rtd, 0)->id];
+       struct mtk_base_afe_memif *memif = &afe->memif[snd_soc_rtd_to_cpu(rtd, 0)->id];
        int fs;
 
        if (memif->data->id == MT8173_AFE_MEMIF_DAI ||
index bfb2094758ff294cfd80d0b60f1dfa0d1424836a..3c5c22132c9271fb5b05c339cbde6242409361ff 100644 (file)
@@ -52,8 +52,8 @@ static const struct snd_kcontrol_new mt8173_max98090_controls[] = {
 static int mt8173_max98090_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);
 
        return snd_soc_dai_set_sysclk(codec_dai, 0, params_rate(params) * 256,
                                      SND_SOC_CLOCK_IN);
@@ -67,7 +67,7 @@ static int mt8173_max98090_init(struct snd_soc_pcm_runtime *runtime)
 {
        int ret;
        struct snd_soc_card *card = runtime->card;
-       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;
 
        /* enable jack detection */
        ret = snd_soc_card_jack_new_pins(card, "Headphone", SND_JACK_HEADSET,
index e502cd1670ba128b047f6b7303edd30880af2468..fe1235d3de6457e7e92502bf5793b52d9729af68 100644 (file)
@@ -54,7 +54,7 @@ static struct snd_soc_jack_pin mt8173_rt5650_rt5514_jack_pins[] = {
 static int mt8173_rt5650_rt5514_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct snd_soc_dai *codec_dai;
        int i, ret;
 
@@ -84,7 +84,7 @@ static struct snd_soc_jack mt8173_rt5650_rt5514_jack;
 static int mt8173_rt5650_rt5514_init(struct snd_soc_pcm_runtime *runtime)
 {
        struct snd_soc_card *card = runtime->card;
-       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;
        int ret;
 
        rt5645_sel_asrc_clk_src(component,
index ffb094284bfb1b372111c820661a180093fe0949..892387c4dd186317f2d122c8d313dbf7099a5ff2 100644 (file)
@@ -58,7 +58,7 @@ static struct snd_soc_jack_pin mt8173_rt5650_rt5676_jack_pins[] = {
 static int mt8173_rt5650_rt5676_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct snd_soc_dai *codec_dai;
        int i, ret;
 
@@ -88,8 +88,8 @@ static struct snd_soc_jack mt8173_rt5650_rt5676_jack;
 static int mt8173_rt5650_rt5676_init(struct snd_soc_pcm_runtime *runtime)
 {
        struct snd_soc_card *card = runtime->card;
-       struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component;
-       struct snd_soc_component *component_sub = asoc_rtd_to_codec(runtime, 1)->component;
+       struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component;
+       struct snd_soc_component *component_sub = snd_soc_rtd_to_codec(runtime, 1)->component;
        int ret;
 
        rt5645_sel_asrc_clk_src(component,
index 18cf84bb25c76d9a16bc363ba62072c357cd0c4d..0be737a11701c9279fe7212f861c48829acf35a7 100644 (file)
@@ -68,7 +68,7 @@ static struct snd_soc_jack_pin mt8173_rt5650_jack_pins[] = {
 static int mt8173_rt5650_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        unsigned int mclk_clock;
        struct snd_soc_dai *codec_dai;
        int i, ret;
@@ -114,8 +114,8 @@ static struct snd_soc_jack mt8173_rt5650_jack, mt8173_rt5650_hdmi_jack;
 static int mt8173_rt5650_init(struct snd_soc_pcm_runtime *runtime)
 {
        struct snd_soc_card *card = runtime->card;
-       struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component;
-       const char *codec_capture_dai = asoc_rtd_to_codec(runtime, 1)->name;
+       struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component;
+       const char *codec_capture_dai = snd_soc_rtd_to_codec(runtime, 1)->name;
        int ret;
 
        rt5645_sel_asrc_clk_src(component,
@@ -166,7 +166,7 @@ static int mt8173_rt5650_hdmi_init(struct snd_soc_pcm_runtime *rtd)
        if (ret)
                return ret;
 
-       return snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component,
+       return snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component,
                                          &mt8173_rt5650_hdmi_jack, NULL);
 }
 
index 90422ed2bbcc2709138058d4ca5908c7a0da6bed..9e432ed9124b94c33f0080bc41e5d6186ba3d41f 100644 (file)
@@ -142,18 +142,18 @@ static const struct snd_pcm_hardware mt8183_afe_hardware = {
 static int mt8183_memif_fs(struct snd_pcm_substream *substream,
                           unsigned int rate)
 {
-       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_soc_component *component =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
 
        return mt8183_rate_transform(afe->dev, rate, id);
 }
 
 static int mt8183_irq_fs(struct snd_pcm_substream *substream, unsigned int rate)
 {
-       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_soc_component *component =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
index 701fbcc0f2c9c3910ce2b30d147cd3e0d9c1e5df..a0b4eeece9b7300efdaf80c1835d2e620063f292 100644 (file)
@@ -47,12 +47,12 @@ static struct snd_soc_jack_pin mt8183_da7219_max98357_jack_pins[] = {
 static int mt8183_mt6358_i2s_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        unsigned int rate = params_rate(params);
        unsigned int mclk_fs_ratio = 128;
        unsigned int mclk_fs = rate * mclk_fs_ratio;
 
-       return snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0),
+       return snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0),
                                      0, mclk_fs, SND_SOC_CLOCK_OUT);
 }
 
@@ -63,7 +63,7 @@ static const struct snd_soc_ops mt8183_mt6358_i2s_ops = {
 static int mt8183_da7219_i2s_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct snd_soc_dai *codec_dai;
        unsigned int rate = params_rate(params);
        unsigned int mclk_fs_ratio = 256;
@@ -71,7 +71,7 @@ static int mt8183_da7219_i2s_hw_params(struct snd_pcm_substream *substream,
        unsigned int freq;
        int ret = 0, j;
 
-       ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), 0,
+       ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), 0,
                                     mclk_fs, SND_SOC_CLOCK_OUT);
        if (ret < 0)
                dev_err(rtd->dev, "failed to set cpu dai sysclk\n");
@@ -104,7 +104,7 @@ static int mt8183_da7219_i2s_hw_params(struct snd_pcm_substream *substream,
 
 static int mt8183_da7219_hw_free(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 snd_soc_dai *codec_dai;
        int ret = 0, j;
 
@@ -132,7 +132,7 @@ static int
 mt8183_da7219_rt1015_i2s_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        unsigned int rate = params_rate(params);
        struct snd_soc_dai *codec_dai;
        int ret = 0, i;
@@ -383,7 +383,7 @@ static int mt8183_da7219_max98357_hdmi_init(struct snd_soc_pcm_runtime *rtd)
        if (ret)
                return ret;
 
-       return snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component,
+       return snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component,
                                          &priv->hdmi_jack, NULL);
 }
 
index 850f4d949d9785455da663853daab7de0e2a8580..1771c26b04454ef3776fb950981817fd4b28f7b1 100644 (file)
@@ -43,12 +43,12 @@ struct mt8183_mt6358_ts3a227_max98357_priv {
 static int mt8183_mt6358_i2s_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        unsigned int rate = params_rate(params);
        unsigned int mclk_fs_ratio = 128;
        unsigned int mclk_fs = rate * mclk_fs_ratio;
 
-       return snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0),
+       return snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0),
                                      0, mclk_fs, SND_SOC_CLOCK_OUT);
 }
 
@@ -60,7 +60,7 @@ static int
 mt8183_mt6358_rt1015_i2s_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        unsigned int rate = params_rate(params);
        unsigned int mclk_fs_ratio = 128;
        unsigned int mclk_fs = rate * mclk_fs_ratio;
@@ -84,7 +84,7 @@ mt8183_mt6358_rt1015_i2s_hw_params(struct snd_pcm_substream *substream,
                }
        }
 
-       return snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0),
+       return snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0),
                                      0, mclk_fs, SND_SOC_CLOCK_OUT);
 }
 
@@ -302,7 +302,7 @@ SND_SOC_DAILINK_DEFS(tdm,
 
 static int mt8183_mt6358_tdm_startup(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 mt8183_mt6358_ts3a227_max98357_priv *priv =
                snd_soc_card_get_drvdata(rtd->card);
        int ret;
@@ -321,7 +321,7 @@ static int mt8183_mt6358_tdm_startup(struct snd_pcm_substream *substream)
 
 static void mt8183_mt6358_tdm_shutdown(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 mt8183_mt6358_ts3a227_max98357_priv *priv =
                snd_soc_card_get_drvdata(rtd->card);
        int ret;
@@ -345,7 +345,7 @@ static int
 mt8183_mt6358_ts3a227_max98357_wov_startup(
        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 snd_soc_card *card = rtd->card;
        struct mt8183_mt6358_ts3a227_max98357_priv *priv =
                        snd_soc_card_get_drvdata(card);
@@ -358,7 +358,7 @@ static void
 mt8183_mt6358_ts3a227_max98357_wov_shutdown(
        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 snd_soc_card *card = rtd->card;
        struct mt8183_mt6358_ts3a227_max98357_priv *priv =
                        snd_soc_card_get_drvdata(card);
@@ -388,7 +388,7 @@ mt8183_mt6358_ts3a227_max98357_hdmi_init(struct snd_soc_pcm_runtime *rtd)
        if (ret)
                return ret;
 
-       return snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component,
+       return snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component,
                                          &priv->hdmi_jack, NULL);
 }
 
index b86159f70a33a2b18b4c4867584c617d579d8963..bfcfc68ac64d9996c5bc6b9d102410ee7c1f2246 100644 (file)
@@ -43,7 +43,7 @@ static int mt8186_fe_startup(struct snd_pcm_substream *substream,
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
        struct snd_pcm_runtime *runtime = substream->runtime;
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        struct mtk_base_afe_memif *memif = &afe->memif[id];
        const struct snd_pcm_hardware *mtk_afe_hardware = afe->mtk_afe_hardware;
        int ret;
@@ -85,7 +85,7 @@ static void mt8186_fe_shutdown(struct snd_pcm_substream *substream,
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
        struct mt8186_afe_private *afe_priv = afe->platform_priv;
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        struct mtk_base_afe_memif *memif = &afe->memif[id];
        int irq_id = memif->irq_usage;
 
@@ -106,7 +106,7 @@ static int mt8186_fe_hw_params(struct snd_pcm_substream *substream,
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        unsigned int channels = params_channels(params);
        unsigned int rate = params_rate(params);
        int ret;
@@ -157,7 +157,7 @@ static int mt8186_fe_trigger(struct snd_pcm_substream *substream, int cmd,
        struct snd_pcm_runtime * const runtime = substream->runtime;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
        struct mt8186_afe_private *afe_priv = afe->platform_priv;
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        struct mtk_base_afe_memif *memif = &afe->memif[id];
        int irq_id = memif->irq_usage;
        struct mtk_base_afe_irq *irqs = &afe->irqs[irq_id];
@@ -256,7 +256,7 @@ static int mt8186_memif_fs(struct snd_pcm_substream *substream,
        struct snd_soc_component *component =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
 
        return mt8186_rate_transform(afe->dev, rate, id);
 }
@@ -293,7 +293,7 @@ static int mt8186_fe_prepare(struct snd_pcm_substream *substream,
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_pcm_runtime * const runtime = substream->runtime;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        struct mtk_base_afe_memif *memif = &afe->memif[id];
        int irq_id = memif->irq_usage;
        struct mtk_base_afe_irq *irqs = &afe->irqs[irq_id];
index 4e66603d4cdbdd327919b3dc3609489421ef49f1..fa08eb0654d88f2dbc3c08501a727fa70592ffa1 100644 (file)
@@ -18,7 +18,7 @@ int mt8186_mt6366_init(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_component *cmpnt_afe =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe);
        struct mt8186_afe_private *afe_priv = afe->platform_priv;
        struct snd_soc_dapm_context *dapm = &rtd->card->dapm;
index aa8e00bba19b27a4fb84afb4eeba695f431a42d7..f795190f92a28aa7c78781d94dde344674c06e79 100644 (file)
@@ -77,7 +77,7 @@ static int mt8186_da7219_init(struct snd_soc_pcm_runtime *rtd)
        struct mt8186_mt6366_da7219_max98357_priv *priv = soc_card_data->mach_priv;
        struct snd_soc_jack *jack = &priv->headset_jack;
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        int ret;
 
        ret = mt8186_dai_i2s_set_share(afe, "I2S1", "I2S0");
@@ -111,7 +111,7 @@ static int mt8186_da7219_init(struct snd_soc_pcm_runtime *rtd)
 static int mt8186_da7219_i2s_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct snd_soc_dai *codec_dai;
        unsigned int rate = params_rate(params);
        unsigned int mclk_fs_ratio = 256;
@@ -119,7 +119,7 @@ static int mt8186_da7219_i2s_hw_params(struct snd_pcm_substream *substream,
        unsigned int freq;
        int ret, j;
 
-       ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), 0,
+       ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), 0,
                                     mclk_fs, SND_SOC_CLOCK_OUT);
        if (ret < 0) {
                dev_err(rtd->dev, "failed to set cpu dai sysclk: %d\n", ret);
@@ -159,7 +159,7 @@ static int mt8186_da7219_i2s_hw_params(struct snd_pcm_substream *substream,
 
 static int mt8186_da7219_i2s_hw_free(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 snd_soc_dai *codec_dai;
        int ret = 0, j;
 
@@ -189,7 +189,7 @@ static int mt8186_mt6366_da7219_max98357_hdmi_init(struct snd_soc_pcm_runtime *r
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe);
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        struct mtk_soc_card_data *soc_card_data =
                snd_soc_card_get_drvdata(rtd->card);
        struct mt8186_mt6366_da7219_max98357_priv *priv = soc_card_data->mach_priv;
@@ -281,7 +281,7 @@ static int mt8186_mt6366_da7219_max98357_playback_startup(struct snd_pcm_substre
                .mask = 0,
        };
 
-       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;
        int ret;
 
@@ -327,7 +327,7 @@ static int mt8186_mt6366_da7219_max98357_capture_startup(struct snd_pcm_substrea
                .mask = 0,
        };
 
-       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;
        int ret;
 
index 9c11016f032c2aa2b9c6ff541de0ab910723c661..6be33892be0a7699dce800ad77d333454baf8951 100644 (file)
@@ -169,7 +169,7 @@ static int mt8186_rt5682s_init(struct snd_soc_pcm_runtime *rtd)
        struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv;
        struct snd_soc_jack *jack = &priv->headset_jack;
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        int ret;
 
        ret = mt8186_dai_i2s_set_share(afe, "I2S1", "I2S0");
@@ -202,8 +202,8 @@ static int mt8186_rt5682s_i2s_hw_params(struct snd_pcm_substream *substream,
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_card *card = rtd->card;
-       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
+       struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
        unsigned int rate = params_rate(params);
        unsigned int mclk_fs_ratio = 128;
        unsigned int mclk_fs = rate * mclk_fs_ratio;
@@ -253,7 +253,7 @@ static int mt8186_mt6366_rt1019_rt5682s_hdmi_init(struct snd_soc_pcm_runtime *rt
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe);
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        struct mtk_soc_card_data *soc_card_data =
                snd_soc_card_get_drvdata(rtd->card);
        struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv;
@@ -345,7 +345,7 @@ static int mt8186_mt6366_rt1019_rt5682s_playback_startup(struct snd_pcm_substrea
                .mask = 0,
        };
 
-       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;
        int ret;
 
@@ -391,7 +391,7 @@ static int mt8186_mt6366_rt1019_rt5682s_capture_startup(struct snd_pcm_substream
                .mask = 0,
        };
 
-       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;
        int ret;
 
index 5e14655c5617ed066f0c92d13592e9e15dabfa50..46d6a55404037b28c26d2d704fe9286defc43fd3 100644 (file)
@@ -98,7 +98,7 @@ static int mt8188_memif_fs(struct snd_pcm_substream *substream,
        struct mtk_base_afe_memif *memif = NULL;
        struct mtk_dai_memif_priv *memif_priv = NULL;
        int fs = mt8188_afe_fs_timing(rate);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
 
        if (id < 0)
                return -EINVAL;
@@ -303,7 +303,7 @@ static int mt8188_afe_fe_startup(struct snd_pcm_substream *substream,
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_pcm_runtime *runtime = substream->runtime;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        int ret;
 
        ret = mtk_afe_fe_startup(substream, dai);
@@ -336,7 +336,7 @@ static int mt8188_afe_fe_hw_params(struct snd_pcm_substream *substream,
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        struct mtk_base_afe_memif *memif = &afe->memif[id];
        const struct mtk_base_memif_data *data = memif->data;
        const struct mt8188_afe_channel_merge *cm = mt8188_afe_found_cm(dai);
@@ -360,7 +360,7 @@ static int mt8188_afe_fe_trigger(struct snd_pcm_substream *substream, int cmd,
        const struct mt8188_afe_channel_merge *cm = mt8188_afe_found_cm(dai);
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_pcm_runtime * const runtime = substream->runtime;
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        struct mtk_base_afe_memif *memif = &afe->memif[id];
        struct mtk_base_afe_irq *irqs = &afe->irqs[memif->irq_usage];
        const struct mtk_base_irq_data *irq_data = irqs->irq_data;
index e2416b981e1fe91996701fd5d7a1464fdb678535..1564eaa1b290e9ea5e6aecce6663b570e1367d56 100644 (file)
@@ -338,7 +338,7 @@ static int mt8188_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_component *cmpnt_afe =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        struct snd_soc_dapm_widget *pin_w = NULL, *w;
        struct mtk_base_afe *afe;
        struct mt8188_afe_private *afe_priv;
@@ -500,7 +500,7 @@ static int mt8188_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd)
 static int mt8188_mt6359_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
 
        /* set mtkaif protocol */
        mt6359_set_mtkaif_protocol(cmpnt_codec,
@@ -556,7 +556,7 @@ static int mt8188_dptx_hw_params(struct snd_pcm_substream *substream,
        unsigned int rate = params_rate(params);
        unsigned int mclk_fs_ratio = 256;
        unsigned int mclk_fs = rate * mclk_fs_ratio;
-       struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0);
+       struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0);
 
        return snd_soc_dai_set_sysclk(dai, 0, mclk_fs, SND_SOC_CLOCK_OUT);
 }
@@ -581,7 +581,7 @@ static int mt8188_hdmi_codec_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card);
        struct mt8188_mt6359_priv *priv = soc_card_data->mach_priv;
-       struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
+       struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component;
        int ret = 0;
 
        ret = snd_soc_card_jack_new_pins(rtd->card, "HDMI Jack",
@@ -607,7 +607,7 @@ static int mt8188_dptx_codec_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card);
        struct mt8188_mt6359_priv *priv = soc_card_data->mach_priv;
-       struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
+       struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component;
        int ret = 0;
 
        ret = snd_soc_card_jack_new_pins(rtd->card, "DP Jack", SND_JACK_LINEOUT,
@@ -655,7 +655,7 @@ static int mt8188_max98390_hw_params(struct snd_pcm_substream *substream,
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        unsigned int bit_width = params_width(params);
-       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);
        struct snd_soc_dai *codec_dai;
        int i;
 
@@ -728,7 +728,7 @@ static int mt8188_nau8825_codec_init(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_card *card = rtd->card;
        struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(card);
        struct mt8188_mt6359_priv *priv = soc_card_data->mach_priv;
-       struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
+       struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component;
        struct snd_soc_jack *jack = &priv->headset_jack;
        int ret;
 
@@ -774,7 +774,7 @@ static int mt8188_nau8825_codec_init(struct snd_soc_pcm_runtime *rtd)
 
 static void mt8188_nau8825_codec_exit(struct snd_soc_pcm_runtime *rtd)
 {
-       struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
+       struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component;
 
        snd_soc_component_set_jack(component, NULL, NULL);
 }
@@ -782,8 +782,8 @@ static void mt8188_nau8825_codec_exit(struct snd_soc_pcm_runtime *rtd)
 static int mt8188_nau8825_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 rate = params_rate(params);
        unsigned int bit_width = params_width(params);
        int clk_freq, ret;
@@ -816,7 +816,7 @@ static const struct snd_soc_ops mt8188_nau8825_ops = {
 static int mt8188_sof_be_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct snd_soc_component *cmpnt_afe = NULL;
        struct snd_soc_pcm_runtime *runtime;
 
index d0520e7e1d79aed065fcd592c20481be6a8db747..bdd1e91824d9cf39f7284cc26f35674b9b29cdfa 100644 (file)
@@ -42,11 +42,11 @@ static const struct snd_pcm_hardware mt8192_afe_hardware = {
 static int mt8192_memif_fs(struct snd_pcm_substream *substream,
                           unsigned int rate)
 {
-       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_soc_component *component =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
 
        return mt8192_rate_transform(afe->dev, rate, id);
 }
@@ -59,7 +59,7 @@ static int mt8192_get_dai_fs(struct mtk_base_afe *afe,
 
 static int mt8192_irq_fs(struct snd_pcm_substream *substream, unsigned int rate)
 {
-       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_soc_component *component =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
index 5e163e23a2076c519cbd74bbd7758c60ce8d7b98..fe3562ea83ce9260dd6778d2f8bfc28387b0753b 100644 (file)
@@ -58,9 +58,9 @@ static struct snd_soc_jack_pin mt8192_jack_pins[] = {
 static int mt8192_rt1015_i2s_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct snd_soc_card *card = rtd->card;
-       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);
        struct snd_soc_dai *codec_dai;
        unsigned int rate = params_rate(params);
        unsigned int mclk_fs_ratio = 128;
@@ -93,10 +93,10 @@ static int mt8192_rt1015_i2s_hw_params(struct snd_pcm_substream *substream,
 static int mt8192_rt5682x_i2s_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct snd_soc_card *card = rtd->card;
-       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
+       struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
        unsigned int rate = params_rate(params);
        unsigned int mclk_fs_ratio = 128;
        unsigned int mclk_fs = rate * mclk_fs_ratio;
@@ -149,7 +149,7 @@ static int mt8192_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_component *cmpnt_afe =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe);
        struct mt8192_afe_private *afe_priv = afe->platform_priv;
        int phase;
@@ -306,7 +306,7 @@ static int mt8192_mt6359_init(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_component *cmpnt_afe =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe);
        struct mt8192_afe_private *afe_priv = afe->platform_priv;
 
@@ -327,7 +327,7 @@ static int mt8192_rt5682_init(struct snd_soc_pcm_runtime *rtd)
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe);
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        struct mt8192_mt6359_priv *priv = snd_soc_card_get_drvdata(rtd->card);
        struct snd_soc_jack *jack = &priv->headset_jack;
        int ret;
@@ -360,7 +360,7 @@ static int mt8192_rt5682_init(struct snd_soc_pcm_runtime *rtd)
 static int mt8192_mt6359_hdmi_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        struct mt8192_mt6359_priv *priv = snd_soc_card_get_drvdata(rtd->card);
        int ret;
 
@@ -406,7 +406,7 @@ mt8192_mt6359_cap1_startup(struct snd_pcm_substream *substream)
                .mask = 0,
        };
 
-       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;
        int ret;
 
@@ -453,7 +453,7 @@ mt8192_mt6359_rt5682_startup(struct snd_pcm_substream *substream)
                .mask = 0,
        };
 
-       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;
        int ret;
 
index a0f2012211fb30bfa997d9e0a592f6db706e4252..1e33863c85ca060a961ba33e100cfb0bcd0f8103 100644 (file)
@@ -88,7 +88,7 @@ static int mt8195_memif_fs(struct snd_pcm_substream *substream,
        struct snd_soc_component *component =
                        snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        struct mtk_base_afe_memif *memif = &afe->memif[id];
        int fs = mt8195_afe_fs_timing(rate);
 
@@ -284,7 +284,7 @@ mt8195_afe_paired_memif_clk_prepare(struct snd_pcm_substream *substream,
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
        struct mt8195_afe_private *afe_priv = afe->platform_priv;
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        int clk_id;
 
        if (id != MT8195_AFE_MEMIF_DL8 && id != MT8195_AFE_MEMIF_DL10)
@@ -313,7 +313,7 @@ mt8195_afe_paired_memif_clk_enable(struct snd_pcm_substream *substream,
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
        struct mt8195_afe_private *afe_priv = afe->platform_priv;
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        int clk_id;
 
        if (id != MT8195_AFE_MEMIF_DL8 && id != MT8195_AFE_MEMIF_DL10)
@@ -345,7 +345,7 @@ static int mt8195_afe_fe_startup(struct snd_pcm_substream *substream,
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_pcm_runtime *runtime = substream->runtime;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        int ret = 0;
 
        mt8195_afe_paired_memif_clk_prepare(substream, dai, 1);
@@ -382,7 +382,7 @@ static int mt8195_afe_fe_hw_params(struct snd_pcm_substream *substream,
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
-       int id = asoc_rtd_to_cpu(rtd, 0)->id;
+       int id = snd_soc_rtd_to_cpu(rtd, 0)->id;
        struct mtk_base_afe_memif *memif = &afe->memif[id];
        const struct mtk_base_memif_data *data = memif->data;
        const struct mt8195_afe_channel_merge *cm = mt8195_afe_found_cm(dai);
index ceca882ecff7b20a2d9cafb41d28c4ba3f58e647..9138f38861ffde454afc4b0a397150a1dc904605 100644 (file)
@@ -146,7 +146,7 @@ static int mt8195_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_component *cmpnt_afe =
                snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe);
        struct mt8195_afe_private *afe_priv = afe->platform_priv;
        struct mtkaif_param *param = &afe_priv->mtkaif_params;
@@ -307,7 +307,7 @@ static int mt8195_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd)
 static int mt8195_mt6359_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
 
        /* set mtkaif protocol */
        mt6359_set_mtkaif_protocol(cmpnt_codec,
@@ -338,7 +338,7 @@ static int mt8195_hdmitx_dptx_startup(struct snd_pcm_substream *substream)
                .mask = 0,
        };
 
-       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;
        int ret;
 
@@ -369,7 +369,7 @@ static int mt8195_dptx_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 *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
+       struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
 
        return snd_soc_dai_set_sysclk(cpu_dai, 0, params_rate(params) * 256,
                                      SND_SOC_CLOCK_OUT);
@@ -384,7 +384,7 @@ static int mt8195_dptx_codec_init(struct snd_soc_pcm_runtime *rtd)
        struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card);
        struct mt8195_mt6359_priv *priv = soc_card_data->mach_priv;
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        int ret;
 
        ret = snd_soc_card_jack_new(rtd->card, "DP Jack", SND_JACK_LINEOUT,
@@ -400,7 +400,7 @@ static int mt8195_hdmi_codec_init(struct snd_soc_pcm_runtime *rtd)
        struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card);
        struct mt8195_mt6359_priv *priv = soc_card_data->mach_priv;
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        int ret;
 
        ret = snd_soc_card_jack_new(rtd->card, "HDMI Jack", SND_JACK_LINEOUT,
@@ -442,7 +442,7 @@ static int mt8195_playback_startup(struct snd_pcm_substream *substream)
                .mask = 0,
        };
 
-       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;
        int ret;
 
@@ -488,7 +488,7 @@ static int mt8195_capture_startup(struct snd_pcm_substream *substream)
                .mask = 0,
        };
 
-       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;
        int ret;
 
@@ -520,8 +520,8 @@ static int mt8195_rt5682_etdm_hw_params(struct snd_pcm_substream *substream,
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_card *card = rtd->card;
-       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
-       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
+       struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
+       struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
        unsigned int rate = params_rate(params);
        int bitwidth;
        int ret;
@@ -563,7 +563,7 @@ static const struct snd_soc_ops mt8195_rt5682_etdm_ops = {
 static int mt8195_rt5682_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_component *cmpnt_codec =
-               asoc_rtd_to_codec(rtd, 0)->component;
+               snd_soc_rtd_to_codec(rtd, 0)->component;
        struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card);
        struct mt8195_mt6359_priv *priv = soc_card_data->mach_priv;
        struct snd_soc_jack *jack = &priv->headset_jack;
@@ -603,7 +603,7 @@ static int mt8195_rt5682_init(struct snd_soc_pcm_runtime *rtd)
 static int mt8195_rt1011_etdm_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct snd_soc_dai *codec_dai;
        struct snd_soc_card *card = rtd->card;
        int srate, i, ret;
@@ -636,7 +636,7 @@ static const struct snd_soc_ops mt8195_rt1011_etdm_ops = {
 static int mt8195_sof_be_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_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
        struct snd_soc_component *cmpnt_afe = NULL;
        struct snd_soc_pcm_runtime *runtime;