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

ASoC: fsl: 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/874jk0s24t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
14ec63f6 f8af41a3

+86 -86
+3 -3
sound/soc/fsl/eukrea-tlv320.c
··· 30 30 static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream, 31 31 struct snd_pcm_hw_params *params) 32 32 { 33 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 34 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 35 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 33 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 34 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 35 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 36 36 int ret; 37 37 38 38 ret = snd_soc_dai_set_sysclk(codec_dai, 0,
+14 -14
sound/soc/fsl/fsl-asoc-card.c
··· 94 94 95 95 struct fsl_asoc_card_priv { 96 96 struct snd_soc_dai_link dai_link[3]; 97 - struct asoc_simple_jack hp_jack; 98 - struct asoc_simple_jack mic_jack; 97 + struct simple_util_jack hp_jack; 98 + struct simple_util_jack mic_jack; 99 99 struct platform_device *pdev; 100 100 struct codec_priv codec_priv; 101 101 struct cpu_priv cpu_priv; ··· 167 167 static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream, 168 168 struct snd_pcm_hw_params *params) 169 169 { 170 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 170 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 171 171 struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); 172 172 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 173 173 struct codec_priv *codec_priv = &priv->codec_priv; ··· 184 184 return 0; 185 185 186 186 /* Specific configurations of DAIs starts from here */ 187 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), cpu_priv->sysclk_id[tx], 187 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), cpu_priv->sysclk_id[tx], 188 188 cpu_priv->sysclk_freq[tx], 189 189 cpu_priv->sysclk_dir[tx]); 190 190 if (ret && ret != -ENOTSUPP) { ··· 196 196 if (!cpu_priv->slot_num) 197 197 cpu_priv->slot_num = 2; 198 198 199 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 199 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 200 200 cpu_priv->slot_num, 201 201 cpu_priv->slot_width); 202 202 if (ret && ret != -ENOTSUPP) { ··· 212 212 else 213 213 pll_out = priv->sample_rate * 256; 214 214 215 - ret = snd_soc_dai_set_pll(asoc_rtd_to_codec(rtd, 0), 215 + ret = snd_soc_dai_set_pll(snd_soc_rtd_to_codec(rtd, 0), 216 216 codec_priv->pll_id, 217 217 codec_priv->mclk_id, 218 218 codec_priv->mclk_freq, pll_out); ··· 221 221 goto fail; 222 222 } 223 223 224 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), 224 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), 225 225 codec_priv->fll_id, 226 226 pll_out, SND_SOC_CLOCK_IN); 227 227 ··· 250 250 251 251 if (!priv->streams && codec_priv->pll_id && codec_priv->fll_id) { 252 252 /* Force freq to be free_freq to avoid error message in codec */ 253 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), 253 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), 254 254 codec_priv->mclk_id, 255 255 codec_priv->free_freq, 256 256 SND_SOC_CLOCK_IN); ··· 259 259 return ret; 260 260 } 261 261 262 - ret = snd_soc_dai_set_pll(asoc_rtd_to_codec(rtd, 0), 262 + ret = snd_soc_dai_set_pll(snd_soc_rtd_to_codec(rtd, 0), 263 263 codec_priv->pll_id, 0, 0, 0); 264 264 if (ret && ret != -ENOTSUPP) { 265 265 dev_err(dev, "failed to stop FLL: %d\n", ret); ··· 503 503 struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(card); 504 504 struct snd_soc_pcm_runtime *rtd = list_first_entry( 505 505 &card->rtd_list, struct snd_soc_pcm_runtime, list); 506 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 506 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 507 507 struct codec_priv *codec_priv = &priv->codec_priv; 508 508 struct device *dev = card->dev; 509 509 int ret; 510 510 511 511 if (fsl_asoc_card_is_ac97(priv)) { 512 512 #if IS_ENABLED(CONFIG_SND_AC97_CODEC) 513 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 513 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 514 514 struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); 515 515 516 516 /* ··· 883 883 884 884 /* 885 885 * Properties "hp-det-gpio" and "mic-det-gpio" are optional, and 886 - * asoc_simple_init_jack uses these properties for creating 886 + * simple_util_init_jack() uses these properties for creating 887 887 * Headphone Jack and Microphone Jack. 888 888 * 889 889 * The notifier is initialized in snd_soc_card_jack_new(), then 890 890 * snd_soc_jack_notifier_register can be called. 891 891 */ 892 892 if (of_property_read_bool(np, "hp-det-gpio")) { 893 - ret = asoc_simple_init_jack(&priv->card, &priv->hp_jack, 893 + ret = simple_util_init_jack(&priv->card, &priv->hp_jack, 894 894 1, NULL, "Headphone Jack"); 895 895 if (ret) 896 896 goto asrc_fail; ··· 899 899 } 900 900 901 901 if (of_property_read_bool(np, "mic-det-gpio")) { 902 - ret = asoc_simple_init_jack(&priv->card, &priv->mic_jack, 902 + ret = simple_util_init_jack(&priv->card, &priv->mic_jack, 903 903 0, NULL, "Mic Jack"); 904 904 if (ret) 905 905 goto asrc_fail;
+5 -5
sound/soc/fsl/fsl_asrc_dma.c
··· 130 130 { 131 131 enum dma_slave_buswidth buswidth = DMA_SLAVE_BUSWIDTH_2_BYTES; 132 132 enum sdma_peripheral_type be_peripheral_type = IMX_DMATYPE_SSI; 133 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 133 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 134 134 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 135 135 struct snd_dmaengine_dai_dma_data *dma_params_fe = NULL; 136 136 struct snd_dmaengine_dai_dma_data *dma_params_be = NULL; ··· 156 156 for_each_dpcm_be(rtd, stream, dpcm) { 157 157 struct snd_soc_pcm_runtime *be = dpcm->be; 158 158 struct snd_pcm_substream *substream_be; 159 - struct snd_soc_dai *dai = asoc_rtd_to_cpu(be, 0); 159 + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(be, 0); 160 160 161 161 if (dpcm->fe != rtd) 162 162 continue; ··· 173 173 } 174 174 175 175 /* Override dma_data of the Front-End and config its dmaengine */ 176 - dma_params_fe = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 176 + dma_params_fe = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 177 177 dma_params_fe->addr = asrc->paddr + asrc->get_fifo_addr(!dir, index); 178 178 dma_params_fe->maxburst = dma_params_be->maxburst; 179 179 ··· 330 330 struct snd_pcm_substream *substream) 331 331 { 332 332 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 333 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 333 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 334 334 struct snd_pcm_runtime *runtime = substream->runtime; 335 335 struct snd_dmaengine_dai_dma_data *dma_data; 336 336 struct device *dev = component->dev; ··· 375 375 goto dma_chan_err; 376 376 } 377 377 378 - dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); 378 + dma_data = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream); 379 379 380 380 /* Refine the snd_imx_hardware according to caps of DMA. */ 381 381 ret = snd_dmaengine_pcm_refine_runtime_hwparams(substream,
+1 -1
sound/soc/fsl/fsl_dma.c
··· 200 200 { 201 201 struct fsl_dma_private *dma_private = dev_id; 202 202 struct snd_pcm_substream *substream = dma_private->substream; 203 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 203 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 204 204 struct device *dev = rtd->dev; 205 205 struct ccsr_dma_channel __iomem *dma_channel = dma_private->dma_channel; 206 206 irqreturn_t ret = IRQ_NONE;
+10 -10
sound/soc/fsl/fsl_spdif.c
··· 502 502 static int spdif_set_sample_rate(struct snd_pcm_substream *substream, 503 503 int sample_rate) 504 504 { 505 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 506 - struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 505 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 506 + struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 507 507 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; 508 508 struct regmap *regmap = spdif_priv->regmap; 509 509 struct platform_device *pdev = spdif_priv->pdev; ··· 605 605 static int fsl_spdif_startup(struct snd_pcm_substream *substream, 606 606 struct snd_soc_dai *cpu_dai) 607 607 { 608 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 609 - struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 608 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 609 + struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 610 610 struct platform_device *pdev = spdif_priv->pdev; 611 611 struct regmap *regmap = spdif_priv->regmap; 612 612 u32 scr, mask; ··· 647 647 static void fsl_spdif_shutdown(struct snd_pcm_substream *substream, 648 648 struct snd_soc_dai *cpu_dai) 649 649 { 650 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 651 - struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 650 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 651 + struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 652 652 struct regmap *regmap = spdif_priv->regmap; 653 653 u32 scr, mask; 654 654 ··· 701 701 struct snd_pcm_hw_params *params, 702 702 struct snd_soc_dai *dai) 703 703 { 704 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 705 - struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 704 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 705 + struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 706 706 struct spdif_mixer_control *ctrl = &spdif_priv->fsl_spdif_control; 707 707 struct platform_device *pdev = spdif_priv->pdev; 708 708 u32 sample_rate = params_rate(params); ··· 736 736 static int fsl_spdif_trigger(struct snd_pcm_substream *substream, 737 737 int cmd, struct snd_soc_dai *dai) 738 738 { 739 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 740 - struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 739 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 740 + struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 741 741 struct regmap *regmap = spdif_priv->regmap; 742 742 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 743 743 u32 intr = SIE_INTR_FOR(tx);
+8 -8
sound/soc/fsl/fsl_ssi.c
··· 634 634 static int fsl_ssi_startup(struct snd_pcm_substream *substream, 635 635 struct snd_soc_dai *dai) 636 636 { 637 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 638 - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 637 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 638 + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 639 639 int ret; 640 640 641 641 ret = clk_prepare_enable(ssi->clk); ··· 658 658 static void fsl_ssi_shutdown(struct snd_pcm_substream *substream, 659 659 struct snd_soc_dai *dai) 660 660 { 661 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 662 - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 661 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 662 + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 663 663 664 664 clk_disable_unprepare(ssi->clk); 665 665 } ··· 890 890 static int fsl_ssi_hw_free(struct snd_pcm_substream *substream, 891 891 struct snd_soc_dai *dai) 892 892 { 893 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 894 - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 893 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 894 + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 895 895 896 896 if (fsl_ssi_is_i2s_clock_provider(ssi) && 897 897 ssi->baudclk_streams & BIT(substream->stream)) { ··· 1107 1107 static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd, 1108 1108 struct snd_soc_dai *dai) 1109 1109 { 1110 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1111 - struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 1110 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1111 + struct fsl_ssi *ssi = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 1112 1112 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 1113 1113 1114 1114 switch (cmd) {
+9 -9
sound/soc/fsl/imx-audmix.c
··· 43 43 44 44 static int imx_audmix_fe_startup(struct snd_pcm_substream *substream) 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 struct imx_audmix *priv = snd_soc_card_get_drvdata(rtd->card); 48 48 struct snd_pcm_runtime *runtime = substream->runtime; 49 49 struct device *dev = rtd->card->dev; ··· 72 72 static int imx_audmix_fe_hw_params(struct snd_pcm_substream *substream, 73 73 struct snd_pcm_hw_params *params) 74 74 { 75 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 75 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 76 76 struct device *dev = rtd->card->dev; 77 77 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 78 78 unsigned int fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF; ··· 84 84 dir = tx ? SND_SOC_CLOCK_OUT : SND_SOC_CLOCK_IN; 85 85 86 86 /* set DAI configuration */ 87 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), fmt); 87 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), fmt); 88 88 if (ret) { 89 89 dev_err(dev, "failed to set cpu dai fmt: %d\n", ret); 90 90 return ret; 91 91 } 92 92 93 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), FSL_SAI_CLK_MAST1, 0, dir); 93 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), FSL_SAI_CLK_MAST1, 0, dir); 94 94 if (ret) { 95 95 dev_err(dev, "failed to set cpu sysclk: %d\n", ret); 96 96 return ret; ··· 100 100 * Per datasheet, AUDMIX expects 8 slots and 32 bits 101 101 * for every slot in TDM mode. 102 102 */ 103 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), BIT(channels) - 1, 103 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), BIT(channels) - 1, 104 104 BIT(channels) - 1, 8, 32); 105 105 if (ret) 106 106 dev_err(dev, "failed to set cpu dai tdm slot: %d\n", ret); ··· 111 111 static int imx_audmix_be_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 device *dev = rtd->card->dev; 116 116 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 117 117 unsigned int fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF; ··· 124 124 fmt |= SND_SOC_DAIFMT_BC_FC; 125 125 126 126 /* set AUDMIX DAI configuration */ 127 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), fmt); 127 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), fmt); 128 128 if (ret) 129 129 dev_err(dev, "failed to set AUDMIX DAI fmt: %d\n", ret); 130 130 ··· 247 247 */ 248 248 priv->dai[i].cpus = 249 249 priv->dai[i].platforms = &dlc[0]; 250 - priv->dai[i].codecs = &asoc_dummy_dlc; 250 + priv->dai[i].codecs = &snd_soc_dummy_dlc; 251 251 252 252 priv->dai[i].num_cpus = 1; 253 253 priv->dai[i].num_codecs = 1; ··· 274 274 return -ENOMEM; 275 275 276 276 priv->dai[num_dai + i].cpus = &dlc[1]; 277 - priv->dai[num_dai + i].codecs = &asoc_dummy_dlc; 277 + priv->dai[num_dai + i].codecs = &snd_soc_dummy_dlc; 278 278 279 279 priv->dai[num_dai + i].num_cpus = 1; 280 280 priv->dai[num_dai + i].num_codecs = 1;
+3 -3
sound/soc/fsl/imx-card.c
··· 291 291 struct snd_pcm_hw_params *params) 292 292 { 293 293 struct snd_soc_pcm_runtime *rtd = substream->private_data; 294 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 294 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 295 295 struct snd_soc_card *card = rtd->card; 296 296 struct imx_card_data *data = snd_soc_card_get_drvdata(card); 297 297 struct dai_link_data *link_data = &data->link_data[rtd->num]; ··· 607 607 plat_data->type = CODEC_AK5552; 608 608 609 609 } else { 610 - link->codecs = &asoc_dummy_dlc; 610 + link->codecs = &snd_soc_dummy_dlc; 611 611 link->num_codecs = 1; 612 612 } 613 613 ··· 655 655 snd_soc_dai_link_set_capabilities(link); 656 656 657 657 /* Get dai fmt */ 658 - ret = asoc_simple_parse_daifmt(dev, np, codec, 658 + ret = simple_util_parse_daifmt(dev, np, codec, 659 659 NULL, &link->dai_fmt); 660 660 if (ret) 661 661 link->dai_fmt = SND_SOC_DAIFMT_NB_NF |
+2 -2
sound/soc/fsl/imx-hdmi.c
··· 35 35 struct snd_soc_pcm_runtime *rtd = substream->private_data; 36 36 struct imx_hdmi_data *data = snd_soc_card_get_drvdata(rtd->card); 37 37 bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 38 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 38 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 39 39 struct snd_soc_card *card = rtd->card; 40 40 struct device *dev = card->dev; 41 41 u32 slot_width = data->cpu_priv.slot_width; ··· 70 70 static int imx_hdmi_init(struct snd_soc_pcm_runtime *rtd) 71 71 { 72 72 struct snd_soc_card *card = rtd->card; 73 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 73 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 74 74 struct snd_soc_component *component = codec_dai->component; 75 75 struct imx_hdmi_data *data = snd_soc_card_get_drvdata(card); 76 76 int ret;
+7 -7
sound/soc/fsl/imx-pcm-rpmsg.c
··· 229 229 struct snd_pcm_substream *substream) 230 230 { 231 231 struct rpmsg_info *info = dev_get_drvdata(component->dev); 232 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 233 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 232 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 233 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 234 234 struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); 235 235 struct snd_pcm_hardware pcm_hardware; 236 236 struct rpmsg_msg *msg; ··· 284 284 static int imx_rpmsg_pcm_close(struct snd_soc_component *component, 285 285 struct snd_pcm_substream *substream) 286 286 { 287 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 287 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 288 288 struct rpmsg_info *info = dev_get_drvdata(component->dev); 289 289 struct rpmsg_msg *msg; 290 290 ··· 317 317 { 318 318 struct snd_pcm_runtime *runtime = substream->runtime; 319 319 struct snd_soc_pcm_runtime *rtd = substream->private_data; 320 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 320 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 321 321 struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); 322 322 323 323 /* ··· 462 462 { 463 463 struct snd_pcm_runtime *runtime = substream->runtime; 464 464 struct snd_soc_pcm_runtime *rtd = substream->private_data; 465 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 465 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 466 466 struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); 467 467 int ret = 0; 468 468 ··· 516 516 { 517 517 struct snd_pcm_runtime *runtime = substream->runtime; 518 518 struct snd_soc_pcm_runtime *rtd = substream->private_data; 519 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 519 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 520 520 struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); 521 521 struct rpmsg_info *info = dev_get_drvdata(component->dev); 522 522 snd_pcm_uframes_t period_size = runtime->period_size; ··· 595 595 { 596 596 struct snd_card *card = rtd->card->snd_card; 597 597 struct snd_pcm *pcm = rtd->pcm; 598 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 598 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 599 599 struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); 600 600 int ret; 601 601
+2 -2
sound/soc/fsl/imx-rpmsg.c
··· 34 34 struct imx_rpmsg *data = snd_soc_card_get_drvdata(card); 35 35 struct snd_soc_pcm_runtime *rtd = list_first_entry(&card->rtd_list, 36 36 struct snd_soc_pcm_runtime, list); 37 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 37 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 38 38 struct device *dev = card->dev; 39 39 int ret; 40 40 ··· 92 92 /* Optional codec node */ 93 93 ret = of_parse_phandle_with_fixed_args(np, "audio-codec", 0, 0, &args); 94 94 if (ret) { 95 - *data->dai.codecs = asoc_dummy_dlc; 95 + *data->dai.codecs = snd_soc_dummy_dlc; 96 96 } else { 97 97 struct clk *clk; 98 98
+1 -1
sound/soc/fsl/imx-sgtl5000.c
··· 30 30 struct device *dev = rtd->card->dev; 31 31 int ret; 32 32 33 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), SGTL5000_SYSCLK, 33 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), SGTL5000_SYSCLK, 34 34 data->clk_frequency, SND_SOC_CLOCK_IN); 35 35 if (ret) { 36 36 dev_err(dev, "could not set codec driver clock params\n");
+1 -1
sound/soc/fsl/imx-spdif.c
··· 38 38 */ 39 39 data->dai.cpus = 40 40 data->dai.platforms = comp; 41 - data->dai.codecs = &asoc_dummy_dlc; 41 + data->dai.codecs = &snd_soc_dummy_dlc; 42 42 43 43 data->dai.num_cpus = 1; 44 44 data->dai.num_codecs = 1;
+9 -9
sound/soc/fsl/mpc5200_dma.c
··· 107 107 static int psc_dma_trigger(struct snd_soc_component *component, 108 108 struct snd_pcm_substream *substream, int cmd) 109 109 { 110 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 111 - struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 110 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 111 + struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 112 112 struct snd_pcm_runtime *runtime = substream->runtime; 113 113 struct psc_dma_stream *s = to_psc_dma_stream(substream, psc_dma); 114 114 struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; ··· 209 209 struct snd_pcm_substream *substream) 210 210 { 211 211 struct snd_pcm_runtime *runtime = substream->runtime; 212 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 213 - struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 212 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 213 + struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 214 214 struct psc_dma_stream *s; 215 215 int rc; 216 216 ··· 237 237 static int psc_dma_close(struct snd_soc_component *component, 238 238 struct snd_pcm_substream *substream) 239 239 { 240 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 241 - struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 240 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 241 + struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 242 242 struct psc_dma_stream *s; 243 243 244 244 dev_dbg(psc_dma->dev, "psc_dma_close(substream=%p)\n", substream); ··· 263 263 psc_dma_pointer(struct snd_soc_component *component, 264 264 struct snd_pcm_substream *substream) 265 265 { 266 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 267 - struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 266 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 267 + struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 268 268 struct psc_dma_stream *s; 269 269 dma_addr_t count; 270 270 ··· 282 282 struct snd_soc_pcm_runtime *rtd) 283 283 { 284 284 struct snd_card *card = rtd->card->snd_card; 285 - struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); 285 + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0); 286 286 struct snd_pcm *pcm = rtd->pcm; 287 287 size_t size = psc_dma_hardware.buffer_bytes_max; 288 288 int rc;
+2 -2
sound/soc/fsl/mpc5200_psc_i2s.c
··· 38 38 struct snd_pcm_hw_params *params, 39 39 struct snd_soc_dai *dai) 40 40 { 41 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 42 - struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 41 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 42 + struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 43 43 u32 mode; 44 44 45 45 dev_dbg(psc_dma->dev, "%s(substream=%p) p_size=%i p_bytes=%i"
+3 -3
sound/soc/fsl/mpc8610_hpcd.c
··· 98 98 */ 99 99 static int mpc8610_hpcd_startup(struct snd_pcm_substream *substream) 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 mpc8610_hpcd_data *machine_data = 103 103 container_of(rtd->card, struct mpc8610_hpcd_data, card); 104 104 struct device *dev = rtd->card->dev; 105 105 int ret = 0; 106 106 107 107 /* Tell the codec driver what the serial protocol is. */ 108 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_codec(rtd, 0), machine_data->dai_format); 108 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_codec(rtd, 0), machine_data->dai_format); 109 109 if (ret < 0) { 110 110 dev_err(dev, "could not set codec driver audio format\n"); 111 111 return ret; ··· 115 115 * Tell the codec driver what the MCLK frequency is, and whether it's 116 116 * a slave or master. 117 117 */ 118 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), 0, 118 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), 0, 119 119 machine_data->clk_frequency, 120 120 machine_data->codec_clk_direction); 121 121 if (ret < 0) {
+3 -3
sound/soc/fsl/p1022_ds.c
··· 121 121 */ 122 122 static int p1022_ds_startup(struct snd_pcm_substream *substream) 123 123 { 124 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 124 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 125 125 struct machine_data *mdata = 126 126 container_of(rtd->card, struct machine_data, card); 127 127 struct device *dev = rtd->card->dev; 128 128 int ret = 0; 129 129 130 130 /* Tell the codec driver what the serial protocol is. */ 131 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_codec(rtd, 0), mdata->dai_format); 131 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_codec(rtd, 0), mdata->dai_format); 132 132 if (ret < 0) { 133 133 dev_err(dev, "could not set codec driver audio format\n"); 134 134 return ret; ··· 138 138 * Tell the codec driver what the MCLK frequency is, and whether it's 139 139 * a slave or master. 140 140 */ 141 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), 0, mdata->clk_frequency, 141 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), 0, mdata->clk_frequency, 142 142 mdata->codec_clk_direction); 143 143 if (ret < 0) { 144 144 dev_err(dev, "could not set codec driver clock params\n");
+3 -3
sound/soc/fsl/p1022_rdk.c
··· 127 127 */ 128 128 static int p1022_rdk_startup(struct snd_pcm_substream *substream) 129 129 { 130 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 130 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 131 131 struct machine_data *mdata = 132 132 container_of(rtd->card, struct machine_data, card); 133 133 struct device *dev = rtd->card->dev; 134 134 int ret = 0; 135 135 136 136 /* Tell the codec driver what the serial protocol is. */ 137 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_codec(rtd, 0), mdata->dai_format); 137 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_codec(rtd, 0), mdata->dai_format); 138 138 if (ret < 0) { 139 139 dev_err(dev, "could not set codec driver audio format (ret=%i)\n", 140 140 ret); 141 141 return ret; 142 142 } 143 143 144 - ret = snd_soc_dai_set_pll(asoc_rtd_to_codec(rtd, 0), 0, 0, mdata->clk_frequency, 144 + ret = snd_soc_dai_set_pll(snd_soc_rtd_to_codec(rtd, 0), 0, 0, mdata->clk_frequency, 145 145 mdata->clk_frequency); 146 146 if (ret < 0) { 147 147 dev_err(dev, "could not set codec PLL frequency (ret=%i)\n",