Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: mediatek: convert not to use asoc_xxx()

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>

authored by

Kuninori Morimoto and committed by
Mark Brown
de9e7013 4c1a0946

+124 -124
+11 -11
sound/soc/mediatek/common/mtk-afe-fe-dai.c
··· 37 37 int mtk_afe_fe_startup(struct snd_pcm_substream *substream, 38 38 struct snd_soc_dai *dai) 39 39 { 40 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 40 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 41 41 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 42 42 struct snd_pcm_runtime *runtime = substream->runtime; 43 - int memif_num = asoc_rtd_to_cpu(rtd, 0)->id; 43 + int memif_num = snd_soc_rtd_to_cpu(rtd, 0)->id; 44 44 struct mtk_base_afe_memif *memif = &afe->memif[memif_num]; 45 45 const struct snd_pcm_hardware *mtk_afe_hardware = afe->mtk_afe_hardware; 46 46 int ret; ··· 98 98 void mtk_afe_fe_shutdown(struct snd_pcm_substream *substream, 99 99 struct snd_soc_dai *dai) 100 100 { 101 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 101 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 102 102 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 103 - struct mtk_base_afe_memif *memif = &afe->memif[asoc_rtd_to_cpu(rtd, 0)->id]; 103 + struct mtk_base_afe_memif *memif = &afe->memif[snd_soc_rtd_to_cpu(rtd, 0)->id]; 104 104 int irq_id; 105 105 106 106 irq_id = memif->irq_usage; ··· 120 120 struct snd_pcm_hw_params *params, 121 121 struct snd_soc_dai *dai) 122 122 { 123 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 123 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 124 124 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 125 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 125 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 126 126 struct mtk_base_afe_memif *memif = &afe->memif[id]; 127 127 int ret; 128 128 unsigned int channels = params_channels(params); ··· 196 196 int mtk_afe_fe_trigger(struct snd_pcm_substream *substream, int cmd, 197 197 struct snd_soc_dai *dai) 198 198 { 199 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 199 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 200 200 struct snd_pcm_runtime * const runtime = substream->runtime; 201 201 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 202 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 202 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 203 203 struct mtk_base_afe_memif *memif = &afe->memif[id]; 204 204 struct mtk_base_afe_irq *irqs = &afe->irqs[memif->irq_usage]; 205 205 const struct mtk_base_irq_data *irq_data = irqs->irq_data; ··· 263 263 int mtk_afe_fe_prepare(struct snd_pcm_substream *substream, 264 264 struct snd_soc_dai *dai) 265 265 { 266 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 266 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 267 267 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 268 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 268 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 269 269 int pbuf_size; 270 270 271 271 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ··· 523 523 int mtk_memif_set_rate_substream(struct snd_pcm_substream *substream, 524 524 int id, unsigned int rate) 525 525 { 526 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 526 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 527 527 struct snd_soc_component *component = 528 528 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 529 529 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
+2 -2
sound/soc/mediatek/common/mtk-afe-platform-driver.c
··· 80 80 snd_pcm_uframes_t mtk_afe_pcm_pointer(struct snd_soc_component *component, 81 81 struct snd_pcm_substream *substream) 82 82 { 83 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 83 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 84 84 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 85 - struct mtk_base_afe_memif *memif = &afe->memif[asoc_rtd_to_cpu(rtd, 0)->id]; 85 + struct mtk_base_afe_memif *memif = &afe->memif[snd_soc_rtd_to_cpu(rtd, 0)->id]; 86 86 const struct mtk_base_memif_data *memif_data = memif->data; 87 87 struct regmap *regmap = afe->regmap; 88 88 struct device *dev = afe->dev;
+2 -2
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
··· 494 494 static int mt2701_memif_fs(struct snd_pcm_substream *substream, 495 495 unsigned int rate) 496 496 { 497 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 497 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 498 498 int fs; 499 499 500 - if (asoc_rtd_to_cpu(rtd, 0)->id != MT2701_MEMIF_ULBT) 500 + if (snd_soc_rtd_to_cpu(rtd, 0)->id != MT2701_MEMIF_ULBT) 501 501 fs = mt2701_afe_i2s_fs(rate); 502 502 else 503 503 fs = (rate == 16000 ? 1 : 0);
+3 -3
sound/soc/mediatek/mt2701/mt2701-cs42448.c
··· 127 127 static int mt2701_cs42448_be_ops_hw_params(struct snd_pcm_substream *substream, 128 128 struct snd_pcm_hw_params *params) 129 129 { 130 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 131 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 132 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 130 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 131 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 132 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 133 133 unsigned int mclk_rate; 134 134 unsigned int rate = params_rate(params); 135 135 unsigned int div_mclk_over_bck = rate > 192000 ? 2 : 4;
+3 -3
sound/soc/mediatek/mt2701/mt2701-wm8960.c
··· 24 24 static int mt2701_wm8960_be_ops_hw_params(struct snd_pcm_substream *substream, 25 25 struct snd_pcm_hw_params *params) 26 26 { 27 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 28 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 29 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 27 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 28 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 29 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 30 30 unsigned int mclk_rate; 31 31 unsigned int rate = params_rate(params); 32 32 unsigned int div_mclk_over_bck = rate > 192000 ? 2 : 4;
+3 -3
sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
··· 139 139 static int mt6797_memif_fs(struct snd_pcm_substream *substream, 140 140 unsigned int rate) 141 141 { 142 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 142 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 143 143 struct snd_soc_component *component = 144 144 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 145 145 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 146 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 146 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 147 147 148 148 return mt6797_rate_transform(afe->dev, rate, id); 149 149 } 150 150 151 151 static int mt6797_irq_fs(struct snd_pcm_substream *substream, unsigned int rate) 152 152 { 153 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 153 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 154 154 struct snd_soc_component *component = 155 155 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 156 156 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
+2 -2
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
··· 480 480 static int mt8173_memif_fs(struct snd_pcm_substream *substream, 481 481 unsigned int rate) 482 482 { 483 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 483 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 484 484 struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 485 485 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 486 - struct mtk_base_afe_memif *memif = &afe->memif[asoc_rtd_to_cpu(rtd, 0)->id]; 486 + struct mtk_base_afe_memif *memif = &afe->memif[snd_soc_rtd_to_cpu(rtd, 0)->id]; 487 487 int fs; 488 488 489 489 if (memif->data->id == MT8173_AFE_MEMIF_DAI ||
+3 -3
sound/soc/mediatek/mt8173/mt8173-max98090.c
··· 52 52 static int mt8173_max98090_hw_params(struct snd_pcm_substream *substream, 53 53 struct snd_pcm_hw_params *params) 54 54 { 55 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 56 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 55 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 56 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 57 57 58 58 return snd_soc_dai_set_sysclk(codec_dai, 0, params_rate(params) * 256, 59 59 SND_SOC_CLOCK_IN); ··· 67 67 { 68 68 int ret; 69 69 struct snd_soc_card *card = runtime->card; 70 - struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; 70 + struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component; 71 71 72 72 /* enable jack detection */ 73 73 ret = snd_soc_card_jack_new_pins(card, "Headphone", SND_JACK_HEADSET,
+2 -2
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c
··· 54 54 static int mt8173_rt5650_rt5514_hw_params(struct snd_pcm_substream *substream, 55 55 struct snd_pcm_hw_params *params) 56 56 { 57 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 57 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 58 58 struct snd_soc_dai *codec_dai; 59 59 int i, ret; 60 60 ··· 84 84 static int mt8173_rt5650_rt5514_init(struct snd_soc_pcm_runtime *runtime) 85 85 { 86 86 struct snd_soc_card *card = runtime->card; 87 - struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; 87 + struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component; 88 88 int ret; 89 89 90 90 rt5645_sel_asrc_clk_src(component,
+3 -3
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c
··· 58 58 static int mt8173_rt5650_rt5676_hw_params(struct snd_pcm_substream *substream, 59 59 struct snd_pcm_hw_params *params) 60 60 { 61 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 61 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 62 62 struct snd_soc_dai *codec_dai; 63 63 int i, ret; 64 64 ··· 88 88 static int mt8173_rt5650_rt5676_init(struct snd_soc_pcm_runtime *runtime) 89 89 { 90 90 struct snd_soc_card *card = runtime->card; 91 - struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; 92 - struct snd_soc_component *component_sub = asoc_rtd_to_codec(runtime, 1)->component; 91 + struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component; 92 + struct snd_soc_component *component_sub = snd_soc_rtd_to_codec(runtime, 1)->component; 93 93 int ret; 94 94 95 95 rt5645_sel_asrc_clk_src(component,
+4 -4
sound/soc/mediatek/mt8173/mt8173-rt5650.c
··· 68 68 static int mt8173_rt5650_hw_params(struct snd_pcm_substream *substream, 69 69 struct snd_pcm_hw_params *params) 70 70 { 71 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 71 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 72 72 unsigned int mclk_clock; 73 73 struct snd_soc_dai *codec_dai; 74 74 int i, ret; ··· 114 114 static int mt8173_rt5650_init(struct snd_soc_pcm_runtime *runtime) 115 115 { 116 116 struct snd_soc_card *card = runtime->card; 117 - struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; 118 - const char *codec_capture_dai = asoc_rtd_to_codec(runtime, 1)->name; 117 + struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component; 118 + const char *codec_capture_dai = snd_soc_rtd_to_codec(runtime, 1)->name; 119 119 int ret; 120 120 121 121 rt5645_sel_asrc_clk_src(component, ··· 166 166 if (ret) 167 167 return ret; 168 168 169 - return snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, 169 + return snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, 170 170 &mt8173_rt5650_hdmi_jack, NULL); 171 171 } 172 172
+3 -3
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
··· 142 142 static int mt8183_memif_fs(struct snd_pcm_substream *substream, 143 143 unsigned int rate) 144 144 { 145 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 145 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 146 146 struct snd_soc_component *component = 147 147 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 148 148 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 149 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 149 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 150 150 151 151 return mt8183_rate_transform(afe->dev, rate, id); 152 152 } 153 153 154 154 static int mt8183_irq_fs(struct snd_pcm_substream *substream, unsigned int rate) 155 155 { 156 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 156 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 157 157 struct snd_soc_component *component = 158 158 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 159 159 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
+7 -7
sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
··· 47 47 static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream, 48 48 struct snd_pcm_hw_params *params) 49 49 { 50 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 50 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 51 51 unsigned int rate = params_rate(params); 52 52 unsigned int mclk_fs_ratio = 128; 53 53 unsigned int mclk_fs = rate * mclk_fs_ratio; 54 54 55 - return snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), 55 + return snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), 56 56 0, mclk_fs, SND_SOC_CLOCK_OUT); 57 57 } 58 58 ··· 63 63 static int mt8183_da7219_i2s_hw_params(struct snd_pcm_substream *substream, 64 64 struct snd_pcm_hw_params *params) 65 65 { 66 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 66 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 67 67 struct snd_soc_dai *codec_dai; 68 68 unsigned int rate = params_rate(params); 69 69 unsigned int mclk_fs_ratio = 256; ··· 71 71 unsigned int freq; 72 72 int ret = 0, j; 73 73 74 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), 0, 74 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), 0, 75 75 mclk_fs, SND_SOC_CLOCK_OUT); 76 76 if (ret < 0) 77 77 dev_err(rtd->dev, "failed to set cpu dai sysclk\n"); ··· 104 104 105 105 static int mt8183_da7219_hw_free(struct snd_pcm_substream *substream) 106 106 { 107 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 107 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 108 108 struct snd_soc_dai *codec_dai; 109 109 int ret = 0, j; 110 110 ··· 132 132 mt8183_da7219_rt1015_i2s_hw_params(struct snd_pcm_substream *substream, 133 133 struct snd_pcm_hw_params *params) 134 134 { 135 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 135 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 136 136 unsigned int rate = params_rate(params); 137 137 struct snd_soc_dai *codec_dai; 138 138 int ret = 0, i; ··· 383 383 if (ret) 384 384 return ret; 385 385 386 - return snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, 386 + return snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, 387 387 &priv->hdmi_jack, NULL); 388 388 } 389 389
+9 -9
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
··· 43 43 static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream, 44 44 struct snd_pcm_hw_params *params) 45 45 { 46 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 46 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 47 47 unsigned int rate = params_rate(params); 48 48 unsigned int mclk_fs_ratio = 128; 49 49 unsigned int mclk_fs = rate * mclk_fs_ratio; 50 50 51 - return snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), 51 + return snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), 52 52 0, mclk_fs, SND_SOC_CLOCK_OUT); 53 53 } 54 54 ··· 60 60 mt8183_mt6358_rt1015_i2s_hw_params(struct snd_pcm_substream *substream, 61 61 struct snd_pcm_hw_params *params) 62 62 { 63 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 63 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 64 64 unsigned int rate = params_rate(params); 65 65 unsigned int mclk_fs_ratio = 128; 66 66 unsigned int mclk_fs = rate * mclk_fs_ratio; ··· 84 84 } 85 85 } 86 86 87 - return snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), 87 + return snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), 88 88 0, mclk_fs, SND_SOC_CLOCK_OUT); 89 89 } 90 90 ··· 302 302 303 303 static int mt8183_mt6358_tdm_startup(struct snd_pcm_substream *substream) 304 304 { 305 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 305 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 306 306 struct mt8183_mt6358_ts3a227_max98357_priv *priv = 307 307 snd_soc_card_get_drvdata(rtd->card); 308 308 int ret; ··· 321 321 322 322 static void mt8183_mt6358_tdm_shutdown(struct snd_pcm_substream *substream) 323 323 { 324 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 324 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 325 325 struct mt8183_mt6358_ts3a227_max98357_priv *priv = 326 326 snd_soc_card_get_drvdata(rtd->card); 327 327 int ret; ··· 345 345 mt8183_mt6358_ts3a227_max98357_wov_startup( 346 346 struct snd_pcm_substream *substream) 347 347 { 348 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 348 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 349 349 struct snd_soc_card *card = rtd->card; 350 350 struct mt8183_mt6358_ts3a227_max98357_priv *priv = 351 351 snd_soc_card_get_drvdata(card); ··· 358 358 mt8183_mt6358_ts3a227_max98357_wov_shutdown( 359 359 struct snd_pcm_substream *substream) 360 360 { 361 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 361 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 362 362 struct snd_soc_card *card = rtd->card; 363 363 struct mt8183_mt6358_ts3a227_max98357_priv *priv = 364 364 snd_soc_card_get_drvdata(card); ··· 388 388 if (ret) 389 389 return ret; 390 390 391 - return snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, 391 + return snd_soc_component_set_jack(snd_soc_rtd_to_codec(rtd, 0)->component, 392 392 &priv->hdmi_jack, NULL); 393 393 } 394 394
+6 -6
sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
··· 43 43 struct snd_soc_pcm_runtime *rtd = substream->private_data; 44 44 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 45 45 struct snd_pcm_runtime *runtime = substream->runtime; 46 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 46 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 47 47 struct mtk_base_afe_memif *memif = &afe->memif[id]; 48 48 const struct snd_pcm_hardware *mtk_afe_hardware = afe->mtk_afe_hardware; 49 49 int ret; ··· 85 85 struct snd_soc_pcm_runtime *rtd = substream->private_data; 86 86 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 87 87 struct mt8186_afe_private *afe_priv = afe->platform_priv; 88 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 88 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 89 89 struct mtk_base_afe_memif *memif = &afe->memif[id]; 90 90 int irq_id = memif->irq_usage; 91 91 ··· 106 106 { 107 107 struct snd_soc_pcm_runtime *rtd = substream->private_data; 108 108 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 109 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 109 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 110 110 unsigned int channels = params_channels(params); 111 111 unsigned int rate = params_rate(params); 112 112 int ret; ··· 157 157 struct snd_pcm_runtime * const runtime = substream->runtime; 158 158 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 159 159 struct mt8186_afe_private *afe_priv = afe->platform_priv; 160 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 160 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 161 161 struct mtk_base_afe_memif *memif = &afe->memif[id]; 162 162 int irq_id = memif->irq_usage; 163 163 struct mtk_base_afe_irq *irqs = &afe->irqs[irq_id]; ··· 256 256 struct snd_soc_component *component = 257 257 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 258 258 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 259 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 259 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 260 260 261 261 return mt8186_rate_transform(afe->dev, rate, id); 262 262 } ··· 293 293 struct snd_soc_pcm_runtime *rtd = substream->private_data; 294 294 struct snd_pcm_runtime * const runtime = substream->runtime; 295 295 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 296 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 296 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 297 297 struct mtk_base_afe_memif *memif = &afe->memif[id]; 298 298 int irq_id = memif->irq_usage; 299 299 struct mtk_base_afe_irq *irqs = &afe->irqs[irq_id];
+1 -1
sound/soc/mediatek/mt8186/mt8186-mt6366-common.c
··· 18 18 struct snd_soc_component *cmpnt_afe = 19 19 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 20 20 struct snd_soc_component *cmpnt_codec = 21 - asoc_rtd_to_codec(rtd, 0)->component; 21 + snd_soc_rtd_to_codec(rtd, 0)->component; 22 22 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe); 23 23 struct mt8186_afe_private *afe_priv = afe->platform_priv; 24 24 struct snd_soc_dapm_context *dapm = &rtd->card->dapm;
+7 -7
sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c
··· 77 77 struct mt8186_mt6366_da7219_max98357_priv *priv = soc_card_data->mach_priv; 78 78 struct snd_soc_jack *jack = &priv->headset_jack; 79 79 struct snd_soc_component *cmpnt_codec = 80 - asoc_rtd_to_codec(rtd, 0)->component; 80 + snd_soc_rtd_to_codec(rtd, 0)->component; 81 81 int ret; 82 82 83 83 ret = mt8186_dai_i2s_set_share(afe, "I2S1", "I2S0"); ··· 111 111 static int mt8186_da7219_i2s_hw_params(struct snd_pcm_substream *substream, 112 112 struct snd_pcm_hw_params *params) 113 113 { 114 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 114 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 115 115 struct snd_soc_dai *codec_dai; 116 116 unsigned int rate = params_rate(params); 117 117 unsigned int mclk_fs_ratio = 256; ··· 119 119 unsigned int freq; 120 120 int ret, j; 121 121 122 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), 0, 122 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), 0, 123 123 mclk_fs, SND_SOC_CLOCK_OUT); 124 124 if (ret < 0) { 125 125 dev_err(rtd->dev, "failed to set cpu dai sysclk: %d\n", ret); ··· 159 159 160 160 static int mt8186_da7219_i2s_hw_free(struct snd_pcm_substream *substream) 161 161 { 162 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 162 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 163 163 struct snd_soc_dai *codec_dai; 164 164 int ret = 0, j; 165 165 ··· 189 189 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 190 190 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe); 191 191 struct snd_soc_component *cmpnt_codec = 192 - asoc_rtd_to_codec(rtd, 0)->component; 192 + snd_soc_rtd_to_codec(rtd, 0)->component; 193 193 struct mtk_soc_card_data *soc_card_data = 194 194 snd_soc_card_get_drvdata(rtd->card); 195 195 struct mt8186_mt6366_da7219_max98357_priv *priv = soc_card_data->mach_priv; ··· 281 281 .mask = 0, 282 282 }; 283 283 284 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 284 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 285 285 struct snd_pcm_runtime *runtime = substream->runtime; 286 286 int ret; 287 287 ··· 327 327 .mask = 0, 328 328 }; 329 329 330 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 330 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 331 331 struct snd_pcm_runtime *runtime = substream->runtime; 332 332 int ret; 333 333
+6 -6
sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
··· 169 169 struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv; 170 170 struct snd_soc_jack *jack = &priv->headset_jack; 171 171 struct snd_soc_component *cmpnt_codec = 172 - asoc_rtd_to_codec(rtd, 0)->component; 172 + snd_soc_rtd_to_codec(rtd, 0)->component; 173 173 int ret; 174 174 175 175 ret = mt8186_dai_i2s_set_share(afe, "I2S1", "I2S0"); ··· 202 202 { 203 203 struct snd_soc_pcm_runtime *rtd = substream->private_data; 204 204 struct snd_soc_card *card = rtd->card; 205 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 206 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 205 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 206 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 207 207 unsigned int rate = params_rate(params); 208 208 unsigned int mclk_fs_ratio = 128; 209 209 unsigned int mclk_fs = rate * mclk_fs_ratio; ··· 253 253 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 254 254 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe); 255 255 struct snd_soc_component *cmpnt_codec = 256 - asoc_rtd_to_codec(rtd, 0)->component; 256 + snd_soc_rtd_to_codec(rtd, 0)->component; 257 257 struct mtk_soc_card_data *soc_card_data = 258 258 snd_soc_card_get_drvdata(rtd->card); 259 259 struct mt8186_mt6366_rt1019_rt5682s_priv *priv = soc_card_data->mach_priv; ··· 345 345 .mask = 0, 346 346 }; 347 347 348 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 348 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 349 349 struct snd_pcm_runtime *runtime = substream->runtime; 350 350 int ret; 351 351 ··· 391 391 .mask = 0, 392 392 }; 393 393 394 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 394 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 395 395 struct snd_pcm_runtime *runtime = substream->runtime; 396 396 int ret; 397 397
+4 -4
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
··· 98 98 struct mtk_base_afe_memif *memif = NULL; 99 99 struct mtk_dai_memif_priv *memif_priv = NULL; 100 100 int fs = mt8188_afe_fs_timing(rate); 101 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 101 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 102 102 103 103 if (id < 0) 104 104 return -EINVAL; ··· 303 303 struct snd_soc_pcm_runtime *rtd = substream->private_data; 304 304 struct snd_pcm_runtime *runtime = substream->runtime; 305 305 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 306 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 306 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 307 307 int ret; 308 308 309 309 ret = mtk_afe_fe_startup(substream, dai); ··· 336 336 { 337 337 struct snd_soc_pcm_runtime *rtd = substream->private_data; 338 338 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 339 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 339 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 340 340 struct mtk_base_afe_memif *memif = &afe->memif[id]; 341 341 const struct mtk_base_memif_data *data = memif->data; 342 342 const struct mt8188_afe_channel_merge *cm = mt8188_afe_found_cm(dai); ··· 360 360 const struct mt8188_afe_channel_merge *cm = mt8188_afe_found_cm(dai); 361 361 struct snd_soc_pcm_runtime *rtd = substream->private_data; 362 362 struct snd_pcm_runtime * const runtime = substream->runtime; 363 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 363 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 364 364 struct mtk_base_afe_memif *memif = &afe->memif[id]; 365 365 struct mtk_base_afe_irq *irqs = &afe->irqs[memif->irq_usage]; 366 366 const struct mtk_base_irq_data *irq_data = irqs->irq_data;
+11 -11
sound/soc/mediatek/mt8188/mt8188-mt6359.c
··· 338 338 struct snd_soc_component *cmpnt_afe = 339 339 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 340 340 struct snd_soc_component *cmpnt_codec = 341 - asoc_rtd_to_codec(rtd, 0)->component; 341 + snd_soc_rtd_to_codec(rtd, 0)->component; 342 342 struct snd_soc_dapm_widget *pin_w = NULL, *w; 343 343 struct mtk_base_afe *afe; 344 344 struct mt8188_afe_private *afe_priv; ··· 500 500 static int mt8188_mt6359_init(struct snd_soc_pcm_runtime *rtd) 501 501 { 502 502 struct snd_soc_component *cmpnt_codec = 503 - asoc_rtd_to_codec(rtd, 0)->component; 503 + snd_soc_rtd_to_codec(rtd, 0)->component; 504 504 505 505 /* set mtkaif protocol */ 506 506 mt6359_set_mtkaif_protocol(cmpnt_codec, ··· 556 556 unsigned int rate = params_rate(params); 557 557 unsigned int mclk_fs_ratio = 256; 558 558 unsigned int mclk_fs = rate * mclk_fs_ratio; 559 - struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); 559 + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0); 560 560 561 561 return snd_soc_dai_set_sysclk(dai, 0, mclk_fs, SND_SOC_CLOCK_OUT); 562 562 } ··· 581 581 { 582 582 struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card); 583 583 struct mt8188_mt6359_priv *priv = soc_card_data->mach_priv; 584 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 584 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 585 585 int ret = 0; 586 586 587 587 ret = snd_soc_card_jack_new_pins(rtd->card, "HDMI Jack", ··· 607 607 { 608 608 struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card); 609 609 struct mt8188_mt6359_priv *priv = soc_card_data->mach_priv; 610 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 610 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 611 611 int ret = 0; 612 612 613 613 ret = snd_soc_card_jack_new_pins(rtd->card, "DP Jack", SND_JACK_LINEOUT, ··· 655 655 { 656 656 struct snd_soc_pcm_runtime *rtd = substream->private_data; 657 657 unsigned int bit_width = params_width(params); 658 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 658 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 659 659 struct snd_soc_dai *codec_dai; 660 660 int i; 661 661 ··· 728 728 struct snd_soc_card *card = rtd->card; 729 729 struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(card); 730 730 struct mt8188_mt6359_priv *priv = soc_card_data->mach_priv; 731 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 731 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 732 732 struct snd_soc_jack *jack = &priv->headset_jack; 733 733 int ret; 734 734 ··· 774 774 775 775 static void mt8188_nau8825_codec_exit(struct snd_soc_pcm_runtime *rtd) 776 776 { 777 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 777 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 778 778 779 779 snd_soc_component_set_jack(component, NULL, NULL); 780 780 } ··· 782 782 static int mt8188_nau8825_hw_params(struct snd_pcm_substream *substream, 783 783 struct snd_pcm_hw_params *params) 784 784 { 785 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 786 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 785 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 786 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 787 787 unsigned int rate = params_rate(params); 788 788 unsigned int bit_width = params_width(params); 789 789 int clk_freq, ret; ··· 816 816 static int mt8188_sof_be_hw_params(struct snd_pcm_substream *substream, 817 817 struct snd_pcm_hw_params *params) 818 818 { 819 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 819 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 820 820 struct snd_soc_component *cmpnt_afe = NULL; 821 821 struct snd_soc_pcm_runtime *runtime; 822 822
+3 -3
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
··· 42 42 static int mt8192_memif_fs(struct snd_pcm_substream *substream, 43 43 unsigned int rate) 44 44 { 45 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 45 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 46 46 struct snd_soc_component *component = 47 47 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 48 48 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 49 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 49 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 50 50 51 51 return mt8192_rate_transform(afe->dev, rate, id); 52 52 } ··· 59 59 60 60 static int mt8192_irq_fs(struct snd_pcm_substream *substream, unsigned int rate) 61 61 { 62 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 62 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 63 63 struct snd_soc_component *component = 64 64 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 65 65 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
+11 -11
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
··· 58 58 static int mt8192_rt1015_i2s_hw_params(struct snd_pcm_substream *substream, 59 59 struct snd_pcm_hw_params *params) 60 60 { 61 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 61 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 62 62 struct snd_soc_card *card = rtd->card; 63 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 63 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 64 64 struct snd_soc_dai *codec_dai; 65 65 unsigned int rate = params_rate(params); 66 66 unsigned int mclk_fs_ratio = 128; ··· 93 93 static int mt8192_rt5682x_i2s_hw_params(struct snd_pcm_substream *substream, 94 94 struct snd_pcm_hw_params *params) 95 95 { 96 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 96 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 97 97 struct snd_soc_card *card = rtd->card; 98 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 99 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 98 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 99 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 100 100 unsigned int rate = params_rate(params); 101 101 unsigned int mclk_fs_ratio = 128; 102 102 unsigned int mclk_fs = rate * mclk_fs_ratio; ··· 149 149 struct snd_soc_component *cmpnt_afe = 150 150 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 151 151 struct snd_soc_component *cmpnt_codec = 152 - asoc_rtd_to_codec(rtd, 0)->component; 152 + snd_soc_rtd_to_codec(rtd, 0)->component; 153 153 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe); 154 154 struct mt8192_afe_private *afe_priv = afe->platform_priv; 155 155 int phase; ··· 306 306 struct snd_soc_component *cmpnt_afe = 307 307 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 308 308 struct snd_soc_component *cmpnt_codec = 309 - asoc_rtd_to_codec(rtd, 0)->component; 309 + snd_soc_rtd_to_codec(rtd, 0)->component; 310 310 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe); 311 311 struct mt8192_afe_private *afe_priv = afe->platform_priv; 312 312 ··· 327 327 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 328 328 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe); 329 329 struct snd_soc_component *cmpnt_codec = 330 - asoc_rtd_to_codec(rtd, 0)->component; 330 + snd_soc_rtd_to_codec(rtd, 0)->component; 331 331 struct mt8192_mt6359_priv *priv = snd_soc_card_get_drvdata(rtd->card); 332 332 struct snd_soc_jack *jack = &priv->headset_jack; 333 333 int ret; ··· 360 360 static int mt8192_mt6359_hdmi_init(struct snd_soc_pcm_runtime *rtd) 361 361 { 362 362 struct snd_soc_component *cmpnt_codec = 363 - asoc_rtd_to_codec(rtd, 0)->component; 363 + snd_soc_rtd_to_codec(rtd, 0)->component; 364 364 struct mt8192_mt6359_priv *priv = snd_soc_card_get_drvdata(rtd->card); 365 365 int ret; 366 366 ··· 406 406 .mask = 0, 407 407 }; 408 408 409 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 409 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 410 410 struct snd_pcm_runtime *runtime = substream->runtime; 411 411 int ret; 412 412 ··· 453 453 .mask = 0, 454 454 }; 455 455 456 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 456 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 457 457 struct snd_pcm_runtime *runtime = substream->runtime; 458 458 int ret; 459 459
+5 -5
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
··· 88 88 struct snd_soc_component *component = 89 89 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 90 90 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 91 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 91 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 92 92 struct mtk_base_afe_memif *memif = &afe->memif[id]; 93 93 int fs = mt8195_afe_fs_timing(rate); 94 94 ··· 284 284 struct snd_soc_pcm_runtime *rtd = substream->private_data; 285 285 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 286 286 struct mt8195_afe_private *afe_priv = afe->platform_priv; 287 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 287 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 288 288 int clk_id; 289 289 290 290 if (id != MT8195_AFE_MEMIF_DL8 && id != MT8195_AFE_MEMIF_DL10) ··· 313 313 struct snd_soc_pcm_runtime *rtd = substream->private_data; 314 314 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 315 315 struct mt8195_afe_private *afe_priv = afe->platform_priv; 316 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 316 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 317 317 int clk_id; 318 318 319 319 if (id != MT8195_AFE_MEMIF_DL8 && id != MT8195_AFE_MEMIF_DL10) ··· 345 345 struct snd_soc_pcm_runtime *rtd = substream->private_data; 346 346 struct snd_pcm_runtime *runtime = substream->runtime; 347 347 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 348 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 348 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 349 349 int ret = 0; 350 350 351 351 mt8195_afe_paired_memif_clk_prepare(substream, dai, 1); ··· 382 382 { 383 383 struct snd_soc_pcm_runtime *rtd = substream->private_data; 384 384 struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); 385 - int id = asoc_rtd_to_cpu(rtd, 0)->id; 385 + int id = snd_soc_rtd_to_cpu(rtd, 0)->id; 386 386 struct mtk_base_afe_memif *memif = &afe->memif[id]; 387 387 const struct mtk_base_memif_data *data = memif->data; 388 388 const struct mt8195_afe_channel_merge *cm = mt8195_afe_found_cm(dai);
+13 -13
sound/soc/mediatek/mt8195/mt8195-mt6359.c
··· 146 146 struct snd_soc_component *cmpnt_afe = 147 147 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); 148 148 struct snd_soc_component *cmpnt_codec = 149 - asoc_rtd_to_codec(rtd, 0)->component; 149 + snd_soc_rtd_to_codec(rtd, 0)->component; 150 150 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe); 151 151 struct mt8195_afe_private *afe_priv = afe->platform_priv; 152 152 struct mtkaif_param *param = &afe_priv->mtkaif_params; ··· 307 307 static int mt8195_mt6359_init(struct snd_soc_pcm_runtime *rtd) 308 308 { 309 309 struct snd_soc_component *cmpnt_codec = 310 - asoc_rtd_to_codec(rtd, 0)->component; 310 + snd_soc_rtd_to_codec(rtd, 0)->component; 311 311 312 312 /* set mtkaif protocol */ 313 313 mt6359_set_mtkaif_protocol(cmpnt_codec, ··· 338 338 .mask = 0, 339 339 }; 340 340 341 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 341 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 342 342 struct snd_pcm_runtime *runtime = substream->runtime; 343 343 int ret; 344 344 ··· 369 369 struct snd_pcm_hw_params *params) 370 370 { 371 371 struct snd_soc_pcm_runtime *rtd = substream->private_data; 372 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 372 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 373 373 374 374 return snd_soc_dai_set_sysclk(cpu_dai, 0, params_rate(params) * 256, 375 375 SND_SOC_CLOCK_OUT); ··· 384 384 struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card); 385 385 struct mt8195_mt6359_priv *priv = soc_card_data->mach_priv; 386 386 struct snd_soc_component *cmpnt_codec = 387 - asoc_rtd_to_codec(rtd, 0)->component; 387 + snd_soc_rtd_to_codec(rtd, 0)->component; 388 388 int ret; 389 389 390 390 ret = snd_soc_card_jack_new(rtd->card, "DP Jack", SND_JACK_LINEOUT, ··· 400 400 struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card); 401 401 struct mt8195_mt6359_priv *priv = soc_card_data->mach_priv; 402 402 struct snd_soc_component *cmpnt_codec = 403 - asoc_rtd_to_codec(rtd, 0)->component; 403 + snd_soc_rtd_to_codec(rtd, 0)->component; 404 404 int ret; 405 405 406 406 ret = snd_soc_card_jack_new(rtd->card, "HDMI Jack", SND_JACK_LINEOUT, ··· 442 442 .mask = 0, 443 443 }; 444 444 445 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 445 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 446 446 struct snd_pcm_runtime *runtime = substream->runtime; 447 447 int ret; 448 448 ··· 488 488 .mask = 0, 489 489 }; 490 490 491 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 491 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 492 492 struct snd_pcm_runtime *runtime = substream->runtime; 493 493 int ret; 494 494 ··· 520 520 { 521 521 struct snd_soc_pcm_runtime *rtd = substream->private_data; 522 522 struct snd_soc_card *card = rtd->card; 523 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 524 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 523 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 524 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 525 525 unsigned int rate = params_rate(params); 526 526 int bitwidth; 527 527 int ret; ··· 563 563 static int mt8195_rt5682_init(struct snd_soc_pcm_runtime *rtd) 564 564 { 565 565 struct snd_soc_component *cmpnt_codec = 566 - asoc_rtd_to_codec(rtd, 0)->component; 566 + snd_soc_rtd_to_codec(rtd, 0)->component; 567 567 struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card); 568 568 struct mt8195_mt6359_priv *priv = soc_card_data->mach_priv; 569 569 struct snd_soc_jack *jack = &priv->headset_jack; ··· 603 603 static int mt8195_rt1011_etdm_hw_params(struct snd_pcm_substream *substream, 604 604 struct snd_pcm_hw_params *params) 605 605 { 606 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 606 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 607 607 struct snd_soc_dai *codec_dai; 608 608 struct snd_soc_card *card = rtd->card; 609 609 int srate, i, ret; ··· 636 636 static int mt8195_sof_be_hw_params(struct snd_pcm_substream *substream, 637 637 struct snd_pcm_hw_params *params) 638 638 { 639 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 639 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 640 640 struct snd_soc_component *cmpnt_afe = NULL; 641 641 struct snd_soc_pcm_runtime *runtime; 642 642