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

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

authored by

Kuninori Morimoto and committed by
Mark Brown
a2c1125e 1a543d2a

+234 -234
+6 -6
sound/soc/intel/atom/sst-mfld-platform-pcm.c
··· 273 273 { 274 274 struct sst_runtime_stream *stream = 275 275 substream->runtime->private_data; 276 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 276 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 277 277 int ret_val; 278 278 279 279 dev_dbg(rtd->dev, "setting buffer ptr param\n"); ··· 593 593 int ret_val = 0, str_id; 594 594 struct sst_runtime_stream *stream; 595 595 int status; 596 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 596 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 597 597 598 598 dev_dbg(rtd->dev, "%s called\n", __func__); 599 599 if (substream->pcm->internal) ··· 641 641 struct sst_runtime_stream *stream; 642 642 int ret_val, status; 643 643 struct pcm_stream_info *str_info; 644 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 644 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 645 645 646 646 stream = substream->runtime->private_data; 647 647 status = sst_get_stream_status(stream); ··· 671 671 static int sst_soc_pcm_new(struct snd_soc_component *component, 672 672 struct snd_soc_pcm_runtime *rtd) 673 673 { 674 - struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); 674 + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0); 675 675 struct snd_pcm *pcm = rtd->pcm; 676 676 677 677 if (dai->driver->playback.channels_min || ··· 762 762 763 763 /* set the SSPs to idle */ 764 764 for_each_card_rtds(drv->soc_card, rtd) { 765 - struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); 765 + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0); 766 766 767 767 if (snd_soc_dai_active(dai)) { 768 768 send_ssp_cmd(dai, dai->name, 0); ··· 783 783 784 784 /* restart SSPs */ 785 785 for_each_card_rtds(drv->soc_card, rtd) { 786 - struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); 786 + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0); 787 787 788 788 if (snd_soc_dai_active(dai)) { 789 789 sst_handle_vb_timer(dai, true);
+3 -3
sound/soc/intel/boards/bdw-rt5650.c
··· 103 103 static int bdw_rt5650_hw_params(struct snd_pcm_substream *substream, 104 104 struct snd_pcm_hw_params *params) 105 105 { 106 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 107 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 106 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 107 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 108 108 int ret; 109 109 110 110 /* Workaround: set codec PLL to 19.2MHz that PLL source is ··· 167 167 { 168 168 struct bdw_rt5650_priv *bdw_rt5650 = 169 169 snd_soc_card_get_drvdata(rtd->card); 170 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 170 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 171 171 struct snd_soc_component *component = codec_dai->component; 172 172 int ret; 173 173
+5 -5
sound/soc/intel/boards/bdw-rt5677.c
··· 153 153 static int bdw_rt5677_hw_params(struct snd_pcm_substream *substream, 154 154 struct snd_pcm_hw_params *params) 155 155 { 156 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 157 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 156 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 157 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 158 158 int ret; 159 159 160 160 ret = snd_soc_dai_set_sysclk(codec_dai, RT5677_SCLK_S_MCLK, 24576000, ··· 170 170 static int bdw_rt5677_dsp_hw_params(struct snd_pcm_substream *substream, 171 171 struct snd_pcm_hw_params *params) 172 172 { 173 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 174 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 173 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 174 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 175 175 int ret; 176 176 177 177 ret = snd_soc_dai_set_sysclk(codec_dai, RT5677_SCLK_S_PLL1, 24576000, ··· 227 227 { 228 228 struct bdw_rt5677_priv *bdw_rt5677 = 229 229 snd_soc_card_get_drvdata(rtd->card); 230 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 230 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 231 231 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 232 232 int ret; 233 233
+4 -4
sound/soc/intel/boards/bdw_rt286.c
··· 61 61 62 62 static int codec_link_init(struct snd_soc_pcm_runtime *rtd) 63 63 { 64 - struct snd_soc_component *codec = asoc_rtd_to_codec(rtd, 0)->component; 64 + struct snd_soc_component *codec = snd_soc_rtd_to_codec(rtd, 0)->component; 65 65 int ret; 66 66 67 67 ret = snd_soc_card_jack_new_pins(rtd->card, "Headset", SND_JACK_HEADSET | SND_JACK_BTN_0, ··· 75 75 76 76 static void codec_link_exit(struct snd_soc_pcm_runtime *rtd) 77 77 { 78 - struct snd_soc_component *codec = asoc_rtd_to_codec(rtd, 0)->component; 78 + struct snd_soc_component *codec = snd_soc_rtd_to_codec(rtd, 0)->component; 79 79 80 80 snd_soc_component_set_jack(codec, NULL, NULL); 81 81 } ··· 98 98 static int codec_link_hw_params(struct snd_pcm_substream *substream, 99 99 struct snd_pcm_hw_params *params) 100 100 { 101 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 102 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 101 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 102 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 103 103 int ret; 104 104 105 105 ret = snd_soc_dai_set_sysclk(codec_dai, RT286_SCLK_S_PLL, 24000000, SND_SOC_CLOCK_IN);
+4 -4
sound/soc/intel/boards/bxt_da7219_max98357a.c
··· 226 226 static int broxton_da7219_codec_init(struct snd_soc_pcm_runtime *rtd) 227 227 { 228 228 int ret; 229 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 230 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 229 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 230 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 231 231 int clk_freq; 232 232 233 233 /* Configure sysclk for codec */ ··· 275 275 static int broxton_hdmi_init(struct snd_soc_pcm_runtime *rtd) 276 276 { 277 277 struct bxt_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 278 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 278 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 279 279 struct bxt_hdmi_pcm *pcm; 280 280 281 281 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 293 293 static int broxton_da7219_fe_init(struct snd_soc_pcm_runtime *rtd) 294 294 { 295 295 struct snd_soc_dapm_context *dapm; 296 - struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; 296 + struct snd_soc_component *component = snd_soc_rtd_to_cpu(rtd, 0)->component; 297 297 298 298 dapm = snd_soc_component_get_dapm(component); 299 299 snd_soc_dapm_ignore_suspend(dapm, "Reference Capture");
+5 -5
sound/soc/intel/boards/bxt_rt298.c
··· 155 155 static int broxton_rt298_fe_init(struct snd_soc_pcm_runtime *rtd) 156 156 { 157 157 struct snd_soc_dapm_context *dapm; 158 - struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; 158 + struct snd_soc_component *component = snd_soc_rtd_to_cpu(rtd, 0)->component; 159 159 160 160 dapm = snd_soc_component_get_dapm(component); 161 161 snd_soc_dapm_ignore_suspend(dapm, "Reference Capture"); ··· 165 165 166 166 static int broxton_rt298_codec_init(struct snd_soc_pcm_runtime *rtd) 167 167 { 168 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 168 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 169 169 int ret = 0; 170 170 171 171 ret = snd_soc_card_jack_new_pins(rtd->card, "Headset", ··· 186 186 static int broxton_hdmi_init(struct snd_soc_pcm_runtime *rtd) 187 187 { 188 188 struct bxt_rt286_private *ctx = snd_soc_card_get_drvdata(rtd->card); 189 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 189 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 190 190 struct bxt_hdmi_pcm *pcm; 191 191 192 192 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 224 224 static int broxton_rt298_hw_params(struct snd_pcm_substream *substream, 225 225 struct snd_pcm_hw_params *params) 226 226 { 227 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 228 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 227 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 228 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 229 229 int ret; 230 230 231 231 ret = snd_soc_dai_set_sysclk(codec_dai, RT298_SCLK_S_PLL,
+5 -5
sound/soc/intel/boards/bytcht_cx2072x.c
··· 70 70 static int byt_cht_cx2072x_init(struct snd_soc_pcm_runtime *rtd) 71 71 { 72 72 struct snd_soc_card *card = rtd->card; 73 - struct snd_soc_component *codec = asoc_rtd_to_codec(rtd, 0)->component; 73 + struct snd_soc_component *codec = snd_soc_rtd_to_codec(rtd, 0)->component; 74 74 int ret; 75 75 76 76 if (devm_acpi_dev_add_driver_gpios(codec->dev, ··· 80 80 card->dapm.idle_bias_off = true; 81 81 82 82 /* set the default PLL rate, the clock is handled by the codec driver */ 83 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), CX2072X_MCLK_EXTERNAL_PLL, 83 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), CX2072X_MCLK_EXTERNAL_PLL, 84 84 19200000, SND_SOC_CLOCK_IN); 85 85 if (ret) { 86 86 dev_err(rtd->dev, "Could not set sysclk\n"); ··· 97 97 98 98 snd_soc_component_set_jack(codec, &byt_cht_cx2072x_headset, NULL); 99 99 100 - snd_soc_dai_set_bclk_ratio(asoc_rtd_to_codec(rtd, 0), 50); 100 + snd_soc_dai_set_bclk_ratio(snd_soc_rtd_to_codec(rtd, 0), 50); 101 101 102 102 return 0; 103 103 } ··· 123 123 * with explicit setting to I2S 2ch 24-bit. The word length is set with 124 124 * dai_set_tdm_slot() since there is no other API exposed 125 125 */ 126 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), 126 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), 127 127 SND_SOC_DAIFMT_I2S | 128 128 SND_SOC_DAIFMT_NB_NF | 129 129 SND_SOC_DAIFMT_BP_FP); ··· 132 132 return ret; 133 133 } 134 134 135 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 24); 135 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 24); 136 136 if (ret < 0) { 137 137 dev_err(rtd->dev, "can't set I2S config, err %d\n", ret); 138 138 return ret;
+6 -6
sound/soc/intel/boards/bytcht_da7213.c
··· 78 78 * with explicit setting to I2S 2ch 24-bit. The word length is set with 79 79 * dai_set_tdm_slot() since there is no other API exposed 80 80 */ 81 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), 81 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), 82 82 SND_SOC_DAIFMT_I2S | 83 83 SND_SOC_DAIFMT_NB_NF | 84 84 SND_SOC_DAIFMT_BP_FP); ··· 87 87 return ret; 88 88 } 89 89 90 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 24); 90 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 24); 91 91 if (ret < 0) { 92 92 dev_err(rtd->dev, "can't set I2S config, err %d\n", ret); 93 93 return ret; ··· 105 105 static int aif1_hw_params(struct snd_pcm_substream *substream, 106 106 struct snd_pcm_hw_params *params) 107 107 { 108 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 109 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 108 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 109 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 110 110 int ret; 111 111 112 112 ret = snd_soc_dai_set_sysclk(codec_dai, DA7213_CLKSRC_MCLK, ··· 126 126 127 127 static int aif1_hw_free(struct snd_pcm_substream *substream) 128 128 { 129 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 130 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 129 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 130 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 131 131 int ret; 132 132 133 133 ret = snd_soc_dai_set_pll(codec_dai, 0,
+4 -4
sound/soc/intel/boards/bytcht_es8316.c
··· 157 157 158 158 static int byt_cht_es8316_init(struct snd_soc_pcm_runtime *runtime) 159 159 { 160 - struct snd_soc_component *codec = asoc_rtd_to_codec(runtime, 0)->component; 160 + struct snd_soc_component *codec = snd_soc_rtd_to_codec(runtime, 0)->component; 161 161 struct snd_soc_card *card = runtime->card; 162 162 struct byt_cht_es8316_private *priv = snd_soc_card_get_drvdata(card); 163 163 const struct snd_soc_dapm_route *custom_map; ··· 212 212 if (ret) 213 213 dev_err(card->dev, "unable to enable MCLK\n"); 214 214 215 - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(runtime, 0), 0, 19200000, 215 + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(runtime, 0), 0, 19200000, 216 216 SND_SOC_CLOCK_IN); 217 217 if (ret < 0) { 218 218 dev_err(card->dev, "can't set codec clock %d\n", ret); ··· 262 262 * with explicit setting to I2S 2ch 24-bit. The word length is set with 263 263 * dai_set_tdm_slot() since there is no other API exposed 264 264 */ 265 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), 265 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), 266 266 SND_SOC_DAIFMT_I2S | 267 267 SND_SOC_DAIFMT_NB_NF | 268 268 SND_SOC_DAIFMT_BP_FP ··· 272 272 return ret; 273 273 } 274 274 275 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, bits); 275 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, bits); 276 276 if (ret < 0) { 277 277 dev_err(rtd->dev, "can't set I2S config, err %d\n", ret); 278 278 return ret;
+2 -2
sound/soc/intel/boards/bytcht_nocodec.c
··· 58 58 * with explicit setting to I2S 2ch 24-bit. The word length is set with 59 59 * dai_set_tdm_slot() since there is no other API exposed 60 60 */ 61 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), 61 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), 62 62 SND_SOC_DAIFMT_I2S | 63 63 SND_SOC_DAIFMT_NB_NF | 64 64 SND_SOC_DAIFMT_BP_FP); ··· 68 68 return ret; 69 69 } 70 70 71 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 24); 71 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 24); 72 72 if (ret < 0) { 73 73 dev_err(rtd->dev, "can't set I2S config, err %d\n", ret); 74 74 return ret;
+5 -5
sound/soc/intel/boards/bytcr_rt5640.c
··· 525 525 static int byt_rt5640_aif1_hw_params(struct snd_pcm_substream *substream, 526 526 struct snd_pcm_hw_params *params) 527 527 { 528 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 529 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 528 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 529 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 530 530 531 531 return byt_rt5640_prepare_and_enable_pll1(dai, params_rate(params)); 532 532 } ··· 1229 1229 struct snd_soc_card *card = runtime->card; 1230 1230 struct byt_rt5640_private *priv = snd_soc_card_get_drvdata(card); 1231 1231 struct rt5640_set_jack_data *jack_data = &priv->jack_data; 1232 - struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; 1232 + struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component; 1233 1233 const struct snd_soc_dapm_route *custom_map = NULL; 1234 1234 int num_routes = 0; 1235 1235 int ret; ··· 1447 1447 * with explicit setting to I2S 2ch. The word length is set with 1448 1448 * dai_set_tdm_slot() since there is no other API exposed 1449 1449 */ 1450 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), 1450 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), 1451 1451 SND_SOC_DAIFMT_I2S | 1452 1452 SND_SOC_DAIFMT_NB_NF | 1453 1453 SND_SOC_DAIFMT_BP_FP); ··· 1456 1456 return ret; 1457 1457 } 1458 1458 1459 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, bits); 1459 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, bits); 1460 1460 if (ret < 0) { 1461 1461 dev_err(rtd->dev, "can't set I2S config, err %d\n", ret); 1462 1462 return ret;
+5 -5
sound/soc/intel/boards/bytcr_rt5651.c
··· 344 344 static int byt_rt5651_aif1_hw_params(struct snd_pcm_substream *substream, 345 345 struct snd_pcm_hw_params *params) 346 346 { 347 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 348 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 347 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 348 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 349 349 snd_pcm_format_t format = params_format(params); 350 350 int rate = params_rate(params); 351 351 int bclk_ratio; ··· 563 563 static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime) 564 564 { 565 565 struct snd_soc_card *card = runtime->card; 566 - struct snd_soc_component *codec = asoc_rtd_to_codec(runtime, 0)->component; 566 + struct snd_soc_component *codec = snd_soc_rtd_to_codec(runtime, 0)->component; 567 567 struct byt_rt5651_private *priv = snd_soc_card_get_drvdata(card); 568 568 const struct snd_soc_dapm_route *custom_map; 569 569 int num_routes; ··· 703 703 * with explicit setting to I2S 2ch. The word length is set with 704 704 * dai_set_tdm_slot() since there is no other API exposed 705 705 */ 706 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), 706 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), 707 707 SND_SOC_DAIFMT_I2S | 708 708 SND_SOC_DAIFMT_NB_NF | 709 709 SND_SOC_DAIFMT_BP_FP ··· 714 714 return ret; 715 715 } 716 716 717 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, bits); 717 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, bits); 718 718 if (ret < 0) { 719 719 dev_err(rtd->dev, "can't set I2S config, err %d\n", ret); 720 720 return ret;
+3 -3
sound/soc/intel/boards/bytcr_wm5102.c
··· 201 201 { 202 202 struct snd_soc_card *card = runtime->card; 203 203 struct byt_wm5102_private *priv = snd_soc_card_get_drvdata(card); 204 - struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; 204 + struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component; 205 205 int ret, jack_type; 206 206 207 207 card->dapm.idle_bias_off = true; ··· 269 269 * with explicit setting to I2S 2ch 16-bit. The word length is set with 270 270 * dai_set_tdm_slot() since there is no other API exposed 271 271 */ 272 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), 272 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), 273 273 SND_SOC_DAIFMT_I2S | 274 274 SND_SOC_DAIFMT_NB_NF | 275 275 SND_SOC_DAIFMT_BP_FP); ··· 278 278 return ret; 279 279 } 280 280 281 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 16); 281 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 16); 282 282 if (ret) { 283 283 dev_err(rtd->dev, "Error setting I2S config: %d\n", ret); 284 284 return ret;
+4 -4
sound/soc/intel/boards/cht_bsw_max98090_ti.c
··· 112 112 static int cht_aif1_hw_params(struct snd_pcm_substream *substream, 113 113 struct snd_pcm_hw_params *params) 114 114 { 115 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 116 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 115 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 116 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 117 117 int ret; 118 118 119 119 ret = snd_soc_dai_set_sysclk(codec_dai, M98090_REG_SYSTEM_CLOCK, ··· 258 258 int ret = 0; 259 259 unsigned int fmt = 0; 260 260 261 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 16); 261 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 16); 262 262 if (ret < 0) { 263 263 dev_err(rtd->dev, "can't set cpu_dai slot fmt: %d\n", ret); 264 264 return ret; ··· 266 266 267 267 fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_BP_FP; 268 268 269 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), fmt); 269 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), fmt); 270 270 if (ret < 0) { 271 271 dev_err(rtd->dev, "can't set cpu_dai set fmt: %d\n", ret); 272 272 return ret;
+4 -4
sound/soc/intel/boards/cht_bsw_nau8824.c
··· 72 72 static int cht_aif1_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); 76 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 75 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 76 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 77 77 int ret; 78 78 79 79 ret = snd_soc_dai_set_sysclk(codec_dai, NAU8824_CLK_FLL_FS, 0, ··· 96 96 { 97 97 struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card); 98 98 struct snd_soc_jack *jack = &ctx->jack; 99 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0); 99 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0); 100 100 struct snd_soc_component *component = codec_dai->component; 101 101 int ret, jack_type; 102 102 ··· 145 145 params_set_format(params, SNDRV_PCM_FORMAT_S24_LE); 146 146 147 147 /* TDM 4 slots 24 bit, set Rx & Tx bitmask to 4 active slots */ 148 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_codec(rtd, 0), 0xf, 0x1, 4, 24); 148 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_codec(rtd, 0), 0xf, 0x1, 4, 24); 149 149 if (ret < 0) { 150 150 dev_err(rtd->dev, "can't set codec TDM slot %d\n", ret); 151 151 return ret;
+8 -8
sound/soc/intel/boards/cht_bsw_rt5645.c
··· 207 207 static int cht_aif1_hw_params(struct snd_pcm_substream *substream, 208 208 struct snd_pcm_hw_params *params) 209 209 { 210 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 211 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 210 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 211 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 212 212 int ret; 213 213 214 214 /* set codec PLL source to the 19.2MHz platform clock (MCLK) */ ··· 252 252 { 253 253 struct snd_soc_card *card = runtime->card; 254 254 struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card); 255 - struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component; 255 + struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component; 256 256 int jack_type; 257 257 int ret; 258 258 ··· 359 359 * with explicit setting to I2S 2ch 16-bit. The word length is set with 360 360 * dai_set_tdm_slot() since there is no other API exposed 361 361 */ 362 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), 362 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), 363 363 SND_SOC_DAIFMT_I2S | 364 364 SND_SOC_DAIFMT_NB_NF | 365 365 SND_SOC_DAIFMT_BP_FP ··· 369 369 return ret; 370 370 } 371 371 372 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_codec(rtd, 0), 372 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_codec(rtd, 0), 373 373 SND_SOC_DAIFMT_I2S | 374 374 SND_SOC_DAIFMT_NB_NF | 375 375 SND_SOC_DAIFMT_BC_FC ··· 379 379 return ret; 380 380 } 381 381 382 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 16); 382 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 16); 383 383 if (ret < 0) { 384 384 dev_err(rtd->dev, "can't set I2S config, err %d\n", ret); 385 385 return ret; ··· 393 393 /* 394 394 * Default mode for SSP configuration is TDM 4 slot 395 395 */ 396 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_codec(rtd, 0), 396 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_codec(rtd, 0), 397 397 SND_SOC_DAIFMT_DSP_B | 398 398 SND_SOC_DAIFMT_IB_NF | 399 399 SND_SOC_DAIFMT_BC_FC); ··· 403 403 } 404 404 405 405 /* TDM 4 slots 24 bit, set Rx & Tx bitmask to 4 active slots */ 406 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_codec(rtd, 0), 0xF, 0xF, 4, 24); 406 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_codec(rtd, 0), 0xF, 0xF, 4, 24); 407 407 if (ret < 0) { 408 408 dev_err(rtd->dev, "can't set codec TDM slot %d\n", ret); 409 409 return ret;
+5 -5
sound/soc/intel/boards/cht_bsw_rt5672.c
··· 155 155 static int cht_aif1_hw_params(struct snd_pcm_substream *substream, 156 156 struct snd_pcm_hw_params *params) 157 157 { 158 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 159 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 158 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 159 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 160 160 int ret; 161 161 162 162 /* set codec PLL source to the 19.2MHz platform clock (MCLK) */ ··· 188 188 static int cht_codec_init(struct snd_soc_pcm_runtime *runtime) 189 189 { 190 190 int ret; 191 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0); 191 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0); 192 192 struct snd_soc_component *component = codec_dai->component; 193 193 struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card); 194 194 ··· 297 297 * board. Since we only support 2 channels anyways, there is no need 298 298 * for TDM on any cht-bsw-rt5672 designs. So we use I2S 2ch everywhere. 299 299 */ 300 - ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0), 300 + ret = snd_soc_dai_set_fmt(snd_soc_rtd_to_cpu(rtd, 0), 301 301 SND_SOC_DAIFMT_I2S | 302 302 SND_SOC_DAIFMT_NB_NF | 303 303 SND_SOC_DAIFMT_BP_FP); ··· 306 306 return ret; 307 307 } 308 308 309 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, bits); 309 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, bits); 310 310 if (ret < 0) { 311 311 dev_err(rtd->dev, "can't set I2S config, err %d\n", ret); 312 312 return ret;
+6 -6
sound/soc/intel/boards/cml_rt1011_rt5682.c
··· 135 135 static int cml_rt5682_codec_init(struct snd_soc_pcm_runtime *rtd) 136 136 { 137 137 struct card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 138 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 138 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 139 139 struct snd_soc_jack *jack; 140 140 int ret; 141 141 ··· 175 175 176 176 static void cml_rt5682_codec_exit(struct snd_soc_pcm_runtime *rtd) 177 177 { 178 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 178 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 179 179 180 180 snd_soc_component_set_jack(component, NULL, NULL); 181 181 } ··· 212 212 static int cml_rt5682_hw_params(struct snd_pcm_substream *substream, 213 213 struct snd_pcm_hw_params *params) 214 214 { 215 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 216 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 215 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 216 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 217 217 int clk_id, clk_freq, pll_out, ret; 218 218 219 219 clk_id = RT5682_PLL1_S_MCLK; ··· 245 245 static int cml_rt1011_hw_params(struct snd_pcm_substream *substream, 246 246 struct snd_pcm_hw_params *params) 247 247 { 248 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 248 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 249 249 struct snd_soc_dai *codec_dai; 250 250 struct snd_soc_card *card = rtd->card; 251 251 int srate, i, ret = 0; ··· 369 369 static int hdmi_init(struct snd_soc_pcm_runtime *rtd) 370 370 { 371 371 struct card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 372 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 372 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 373 373 struct hdmi_pcm *pcm; 374 374 375 375 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
+4 -4
sound/soc/intel/boards/ehl_rt5660.c
··· 74 74 static int hdmi_init(struct snd_soc_pcm_runtime *rtd) 75 75 { 76 76 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 77 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 77 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 78 78 struct sof_hdmi_pcm *pcm; 79 79 80 80 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 109 109 static int rt5660_hw_params(struct snd_pcm_substream *substream, 110 110 struct snd_pcm_hw_params *params) 111 111 { 112 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 113 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 112 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 113 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 114 114 int ret; 115 115 116 116 ret = snd_soc_dai_set_sysclk(codec_dai, ··· 267 267 * hdmi codec is not supported 268 268 */ 269 269 for (i = HDMI_LINK_START; i <= HDMI_LINE_END; i++) 270 - card->dai_link[i].codecs[0] = asoc_dummy_dlc; 270 + card->dai_link[i].codecs[0] = snd_soc_dummy_dlc; 271 271 } 272 272 273 273 static int snd_ehl_rt5660_probe(struct platform_device *pdev)
+6 -6
sound/soc/intel/boards/glk_rt5682_max98357a.c
··· 152 152 static int geminilake_rt5682_codec_init(struct snd_soc_pcm_runtime *rtd) 153 153 { 154 154 struct glk_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 155 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 156 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 155 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 156 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 157 157 struct snd_soc_jack *jack; 158 158 int pll_id, pll_source, clk_id, ret; 159 159 ··· 215 215 static int geminilake_rt5682_hw_params(struct snd_pcm_substream *substream, 216 216 struct snd_pcm_hw_params *params) 217 217 { 218 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 219 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 218 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 219 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 220 220 int ret; 221 221 222 222 /* Set valid bitmask & configuration for I2S in 24 bit */ ··· 236 236 static int geminilake_hdmi_init(struct snd_soc_pcm_runtime *rtd) 237 237 { 238 238 struct glk_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 239 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 239 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 240 240 struct glk_hdmi_pcm *pcm; 241 241 242 242 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 253 253 254 254 static int geminilake_rt5682_fe_init(struct snd_soc_pcm_runtime *rtd) 255 255 { 256 - struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; 256 + struct snd_soc_component *component = snd_soc_rtd_to_cpu(rtd, 0)->component; 257 257 struct snd_soc_dapm_context *dapm; 258 258 int ret; 259 259
+2 -2
sound/soc/intel/boards/hsw_rt5640.c
··· 47 47 static int codec_link_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); 51 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 50 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 51 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 52 52 int ret; 53 53 54 54 ret = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_MCLK, 12288000, SND_SOC_CLOCK_IN);
+4 -4
sound/soc/intel/boards/kbl_da7219_max98357a.c
··· 179 179 static int kabylake_da7219_codec_init(struct snd_soc_pcm_runtime *rtd) 180 180 { 181 181 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); 182 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 183 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 182 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 183 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 184 184 struct snd_soc_jack *jack; 185 185 int ret; 186 186 ··· 225 225 static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device) 226 226 { 227 227 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); 228 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 228 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 229 229 struct kbl_hdmi_pcm *pcm; 230 230 231 231 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 258 258 static int kabylake_da7219_fe_init(struct snd_soc_pcm_runtime *rtd) 259 259 { 260 260 struct snd_soc_dapm_context *dapm; 261 - struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; 261 + struct snd_soc_component *component = snd_soc_rtd_to_cpu(rtd, 0)->component; 262 262 263 263 dapm = snd_soc_component_get_dapm(component); 264 264 snd_soc_dapm_ignore_suspend(dapm, "Reference Capture");
+5 -5
sound/soc/intel/boards/kbl_da7219_max98927.c
··· 194 194 static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream, 195 195 struct snd_pcm_hw_params *params) 196 196 { 197 - struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream); 197 + struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream); 198 198 struct snd_soc_dai *codec_dai; 199 199 int ret, j; 200 200 ··· 239 239 240 240 static int kabylake_ssp0_trigger(struct snd_pcm_substream *substream, int cmd) 241 241 { 242 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 242 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 243 243 struct snd_soc_dai *codec_dai; 244 244 int j, ret; 245 245 ··· 354 354 static int kabylake_da7219_codec_init(struct snd_soc_pcm_runtime *rtd) 355 355 { 356 356 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); 357 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 357 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 358 358 struct snd_soc_jack *jack; 359 359 struct snd_soc_card *card = rtd->card; 360 360 int ret; ··· 406 406 static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device) 407 407 { 408 408 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); 409 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 409 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 410 410 struct kbl_hdmi_pcm *pcm; 411 411 412 412 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 439 439 static int kabylake_da7219_fe_init(struct snd_soc_pcm_runtime *rtd) 440 440 { 441 441 struct snd_soc_dapm_context *dapm; 442 - struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; 442 + struct snd_soc_component *component = snd_soc_rtd_to_cpu(rtd, 0)->component; 443 443 444 444 dapm = snd_soc_component_get_dapm(component); 445 445 snd_soc_dapm_ignore_suspend(dapm, "Reference Capture");
+4 -4
sound/soc/intel/boards/kbl_rt5660.c
··· 157 157 { 158 158 int ret; 159 159 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); 160 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 160 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 161 161 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 162 162 163 163 ret = devm_acpi_dev_add_driver_gpios(component->dev, acpi_rt5660_gpios); ··· 222 222 static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device) 223 223 { 224 224 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); 225 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 225 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 226 226 struct kbl_hdmi_pcm *pcm; 227 227 228 228 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 255 255 static int kabylake_rt5660_hw_params(struct snd_pcm_substream *substream, 256 256 struct snd_pcm_hw_params *params) 257 257 { 258 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 259 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 258 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 259 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 260 260 int ret; 261 261 262 262 ret = snd_soc_dai_set_sysclk(codec_dai,
+6 -6
sound/soc/intel/boards/kbl_rt5663_max98927.c
··· 259 259 { 260 260 int ret; 261 261 struct snd_soc_dapm_context *dapm; 262 - struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; 262 + struct snd_soc_component *component = snd_soc_rtd_to_cpu(rtd, 0)->component; 263 263 264 264 dapm = snd_soc_component_get_dapm(component); 265 265 ret = snd_soc_dapm_ignore_suspend(dapm, "Reference Capture"); ··· 275 275 { 276 276 int ret; 277 277 struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(rtd->card); 278 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 278 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 279 279 struct snd_soc_jack *jack; 280 280 281 281 /* ··· 324 324 static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device) 325 325 { 326 326 struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(rtd->card); 327 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 327 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 328 328 struct kbl_hdmi_pcm *pcm; 329 329 330 330 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 472 472 static int kabylake_rt5663_hw_params(struct snd_pcm_substream *substream, 473 473 struct snd_pcm_hw_params *params) 474 474 { 475 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 476 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 475 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 476 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 477 477 int ret; 478 478 479 479 /* use ASRC for internal clocks, as PLL rate isn't multiple of BCLK */ ··· 510 510 static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream, 511 511 struct snd_pcm_hw_params *params) 512 512 { 513 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 513 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 514 514 struct snd_soc_dai *codec_dai; 515 515 int ret = 0, j; 516 516
+6 -6
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
··· 217 217 static int kabylake_rt5663_fe_init(struct snd_soc_pcm_runtime *rtd) 218 218 { 219 219 struct snd_soc_dapm_context *dapm; 220 - struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; 220 + struct snd_soc_component *component = snd_soc_rtd_to_cpu(rtd, 0)->component; 221 221 int ret; 222 222 223 223 dapm = snd_soc_component_get_dapm(component); ··· 232 232 { 233 233 int ret; 234 234 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); 235 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 235 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 236 236 struct snd_soc_jack *jack; 237 237 238 238 /* ··· 268 268 static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device) 269 269 { 270 270 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); 271 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 271 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 272 272 struct kbl_hdmi_pcm *pcm; 273 273 274 274 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 407 407 static int kabylake_rt5663_hw_params(struct snd_pcm_substream *substream, 408 408 struct snd_pcm_hw_params *params) 409 409 { 410 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 411 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 410 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 411 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 412 412 int ret; 413 413 414 414 /* use ASRC for internal clocks, as PLL rate isn't multiple of BCLK */ ··· 431 431 static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream, 432 432 struct snd_pcm_hw_params *params) 433 433 { 434 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 434 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 435 435 struct snd_soc_dai *codec_dai; 436 436 int ret = 0, j; 437 437
+2 -2
sound/soc/intel/boards/skl_hda_dsp_generic.c
··· 155 155 card->num_dapm_widgets = ARRAY_SIZE(skl_hda_widgets); 156 156 if (!ctx->idisp_codec) { 157 157 for (i = 0; i < IDISP_DAI_COUNT; i++) { 158 - skl_hda_be_dai_links[i].codecs = &asoc_dummy_dlc; 158 + skl_hda_be_dai_links[i].codecs = &snd_soc_dummy_dlc; 159 159 skl_hda_be_dai_links[i].num_codecs = 1; 160 160 } 161 161 } ··· 179 179 for_each_card_rtds(card, rtd) { 180 180 if (!strstr(rtd->dai_link->codecs->name, "ehdaudio0D0")) 181 181 continue; 182 - dai = asoc_rtd_to_codec(rtd, 0); 182 + dai = snd_soc_rtd_to_codec(rtd, 0); 183 183 hda_pvt = snd_soc_component_get_drvdata(dai->component); 184 184 if (hda_pvt) { 185 185 /*
+7 -7
sound/soc/intel/boards/skl_nau88l25_max98357a.c
··· 168 168 static int skylake_nau8825_codec_init(struct snd_soc_pcm_runtime *rtd) 169 169 { 170 170 int ret; 171 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 171 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 172 172 173 173 /* 174 174 * Headset buttons map to the google Reference headset. ··· 194 194 static int skylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) 195 195 { 196 196 struct skl_nau8825_private *ctx = snd_soc_card_get_drvdata(rtd->card); 197 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 197 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 198 198 struct skl_hdmi_pcm *pcm; 199 199 200 200 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 212 212 static int skylake_hdmi2_init(struct snd_soc_pcm_runtime *rtd) 213 213 { 214 214 struct skl_nau8825_private *ctx = snd_soc_card_get_drvdata(rtd->card); 215 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 215 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 216 216 struct skl_hdmi_pcm *pcm; 217 217 218 218 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 230 230 static int skylake_hdmi3_init(struct snd_soc_pcm_runtime *rtd) 231 231 { 232 232 struct skl_nau8825_private *ctx = snd_soc_card_get_drvdata(rtd->card); 233 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 233 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 234 234 struct skl_hdmi_pcm *pcm; 235 235 236 236 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 248 248 static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime *rtd) 249 249 { 250 250 struct snd_soc_dapm_context *dapm; 251 - struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; 251 + struct snd_soc_component *component = snd_soc_rtd_to_cpu(rtd, 0)->component; 252 252 253 253 dapm = snd_soc_component_get_dapm(component); 254 254 snd_soc_dapm_ignore_suspend(dapm, "Reference Capture"); ··· 307 307 static int skylake_nau8825_hw_params(struct snd_pcm_substream *substream, 308 308 struct snd_pcm_hw_params *params) 309 309 { 310 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 311 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 310 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 311 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 312 312 int ret; 313 313 314 314 ret = snd_soc_dai_set_sysclk(codec_dai,
+9 -9
sound/soc/intel/boards/skl_nau88l25_ssm4567.c
··· 172 172 int ret; 173 173 174 174 /* Slot 1 for left */ 175 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_codec(rtd, 0), 0x01, 0x01, 2, 48); 175 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_codec(rtd, 0), 0x01, 0x01, 2, 48); 176 176 if (ret < 0) 177 177 return ret; 178 178 179 179 /* Slot 2 for right */ 180 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_codec(rtd, 1), 0x02, 0x02, 2, 48); 180 + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_codec(rtd, 1), 0x02, 0x02, 2, 48); 181 181 if (ret < 0) 182 182 return ret; 183 183 ··· 187 187 static int skylake_nau8825_codec_init(struct snd_soc_pcm_runtime *rtd) 188 188 { 189 189 int ret; 190 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 190 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 191 191 192 192 /* 193 193 * 4 buttons here map to the google Reference headset ··· 213 213 static int skylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) 214 214 { 215 215 struct skl_nau88125_private *ctx = snd_soc_card_get_drvdata(rtd->card); 216 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 216 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 217 217 struct skl_hdmi_pcm *pcm; 218 218 219 219 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 231 231 static int skylake_hdmi2_init(struct snd_soc_pcm_runtime *rtd) 232 232 { 233 233 struct skl_nau88125_private *ctx = snd_soc_card_get_drvdata(rtd->card); 234 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 234 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 235 235 struct skl_hdmi_pcm *pcm; 236 236 237 237 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 250 250 static int skylake_hdmi3_init(struct snd_soc_pcm_runtime *rtd) 251 251 { 252 252 struct skl_nau88125_private *ctx = snd_soc_card_get_drvdata(rtd->card); 253 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 253 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 254 254 struct skl_hdmi_pcm *pcm; 255 255 256 256 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 268 268 static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime *rtd) 269 269 { 270 270 struct snd_soc_dapm_context *dapm; 271 - struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; 271 + struct snd_soc_component *component = snd_soc_rtd_to_cpu(rtd, 0)->component; 272 272 273 273 dapm = snd_soc_component_get_dapm(component); 274 274 snd_soc_dapm_ignore_suspend(dapm, "Reference Capture"); ··· 359 359 static int skylake_nau8825_hw_params(struct snd_pcm_substream *substream, 360 360 struct snd_pcm_hw_params *params) 361 361 { 362 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 363 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 362 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 363 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 364 364 int ret; 365 365 366 366 ret = snd_soc_dai_set_sysclk(codec_dai,
+5 -5
sound/soc/intel/boards/skl_rt286.c
··· 112 112 static int skylake_rt286_fe_init(struct snd_soc_pcm_runtime *rtd) 113 113 { 114 114 struct snd_soc_dapm_context *dapm; 115 - struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; 115 + struct snd_soc_component *component = snd_soc_rtd_to_cpu(rtd, 0)->component; 116 116 117 117 dapm = snd_soc_component_get_dapm(component); 118 118 snd_soc_dapm_ignore_suspend(dapm, "Reference Capture"); ··· 122 122 123 123 static int skylake_rt286_codec_init(struct snd_soc_pcm_runtime *rtd) 124 124 { 125 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 125 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 126 126 int ret; 127 127 128 128 ret = snd_soc_card_jack_new_pins(rtd->card, "Headset", ··· 143 143 static int skylake_hdmi_init(struct snd_soc_pcm_runtime *rtd) 144 144 { 145 145 struct skl_rt286_private *ctx = snd_soc_card_get_drvdata(rtd->card); 146 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 146 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 147 147 struct skl_hdmi_pcm *pcm; 148 148 149 149 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 228 228 static int skylake_rt286_hw_params(struct snd_pcm_substream *substream, 229 229 struct snd_pcm_hw_params *params) 230 230 { 231 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 232 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 231 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 232 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 233 233 int ret; 234 234 235 235 ret = snd_soc_dai_set_sysclk(codec_dai, RT286_SCLK_S_PLL, 24000000,
+1 -1
sound/soc/intel/boards/sof_cirrus_common.c
··· 91 91 static int cs35l41_hw_params(struct snd_pcm_substream *substream, 92 92 struct snd_pcm_hw_params *params) 93 93 { 94 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 94 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 95 95 struct snd_soc_dai *codec_dai; 96 96 int clk_freq, i, ret; 97 97
+6 -6
sound/soc/intel/boards/sof_cs42l42.c
··· 88 88 static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd) 89 89 { 90 90 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 91 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 91 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 92 92 struct sof_hdmi_pcm *pcm; 93 93 94 94 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 107 107 static int sof_cs42l42_init(struct snd_soc_pcm_runtime *rtd) 108 108 { 109 109 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 110 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 110 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 111 111 struct snd_soc_jack *jack = &ctx->headset_jack; 112 112 int ret; 113 113 ··· 143 143 144 144 static void sof_cs42l42_exit(struct snd_soc_pcm_runtime *rtd) 145 145 { 146 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 146 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 147 147 148 148 snd_soc_component_set_jack(component, NULL, NULL); 149 149 } ··· 151 151 static int sof_cs42l42_hw_params(struct snd_pcm_substream *substream, 152 152 struct snd_pcm_hw_params *params) 153 153 { 154 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 155 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 154 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 155 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 156 156 int clk_freq, ret; 157 157 158 158 clk_freq = sof_dai_get_bclk(rtd); /* BCLK freq */ ··· 506 506 goto devm_err; 507 507 508 508 links[*id].id = *id; 509 - links[*id].codecs = &asoc_dummy_dlc; 509 + links[*id].codecs = &snd_soc_dummy_dlc; 510 510 links[*id].num_codecs = 1; 511 511 links[*id].platforms = platform_component; 512 512 links[*id].num_platforms = ARRAY_SIZE(platform_component);
+4 -4
sound/soc/intel/boards/sof_da7219.c
··· 131 131 static int da7219_codec_init(struct snd_soc_pcm_runtime *rtd) 132 132 { 133 133 struct card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 134 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 134 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 135 135 struct snd_soc_component *component = codec_dai->component; 136 136 struct snd_soc_jack *jack = &ctx->headset_jack; 137 137 int mclk_rate, ret; ··· 197 197 static int max98373_hw_params(struct snd_pcm_substream *substream, 198 198 struct snd_pcm_hw_params *params) 199 199 { 200 - struct snd_soc_pcm_runtime *runtime = asoc_substream_to_rtd(substream); 200 + struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream); 201 201 int ret, j; 202 202 203 203 for (j = 0; j < runtime->dai_link->num_codecs; j++) { 204 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, j); 204 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, j); 205 205 206 206 if (!strcmp(codec_dai->component->name, MAX_98373_DEV0_NAME)) { 207 207 /* vmon_slot_no = 0 imon_slot_no = 1 for TX slots */ ··· 231 231 static int hdmi_init(struct snd_soc_pcm_runtime *rtd) 232 232 { 233 233 struct card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 234 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 234 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 235 235 struct hdmi_pcm *pcm; 236 236 237 237 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
+7 -7
sound/soc/intel/boards/sof_es8336.c
··· 126 126 127 127 static int sof_8336_trigger(struct snd_pcm_substream *substream, int cmd) 128 128 { 129 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 129 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 130 130 struct snd_soc_card *card = rtd->card; 131 131 struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card); 132 132 ··· 251 251 static int sof_hdmi_init(struct snd_soc_pcm_runtime *runtime) 252 252 { 253 253 struct sof_es8336_private *priv = snd_soc_card_get_drvdata(runtime->card); 254 - struct snd_soc_dai *dai = asoc_rtd_to_codec(runtime, 0); 254 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(runtime, 0); 255 255 struct sof_hdmi_pcm *pcm; 256 256 257 257 pcm = devm_kzalloc(runtime->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 269 269 270 270 static int sof_es8316_init(struct snd_soc_pcm_runtime *runtime) 271 271 { 272 - struct snd_soc_component *codec = asoc_rtd_to_codec(runtime, 0)->component; 272 + struct snd_soc_component *codec = snd_soc_rtd_to_codec(runtime, 0)->component; 273 273 struct snd_soc_card *card = runtime->card; 274 274 struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card); 275 275 const struct snd_soc_dapm_route *custom_map; ··· 308 308 309 309 static void sof_es8316_exit(struct snd_soc_pcm_runtime *rtd) 310 310 { 311 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 311 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 312 312 313 313 snd_soc_component_set_jack(component, NULL, NULL); 314 314 } ··· 355 355 static int sof_es8336_hw_params(struct snd_pcm_substream *substream, 356 356 struct snd_pcm_hw_params *params) 357 357 { 358 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 359 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 358 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 359 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 360 360 const int sysclk = 19200000; 361 361 int ret; 362 362 ··· 565 565 if (!links[id].name) 566 566 return NULL; 567 567 links[id].id = id + hdmi_id_offset; 568 - links[id].codecs = &asoc_dummy_dlc; 568 + links[id].codecs = &snd_soc_dummy_dlc; 569 569 links[id].num_codecs = 1; 570 570 links[id].platforms = platform_component; 571 571 links[id].num_platforms = ARRAY_SIZE(platform_component);
+4 -4
sound/soc/intel/boards/sof_maxim_common.c
··· 59 59 static int max_98373_hw_params(struct snd_pcm_substream *substream, 60 60 struct snd_pcm_hw_params *params) 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_dai *codec_dai; 64 64 int j; 65 65 ··· 78 78 79 79 int max_98373_trigger(struct snd_pcm_substream *substream, int cmd) 80 80 { 81 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 81 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 82 82 struct snd_soc_dai *codec_dai; 83 83 struct snd_soc_dai *cpu_dai; 84 84 int j; ··· 88 88 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) 89 89 return 0; 90 90 91 - cpu_dai = asoc_rtd_to_cpu(rtd, 0); 91 + cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 92 92 for_each_rtd_codec_dais(rtd, j, codec_dai) { 93 93 struct snd_soc_dapm_context *dapm = 94 94 snd_soc_component_get_dapm(cpu_dai->component); ··· 223 223 static int max_98390_hw_params(struct snd_pcm_substream *substream, 224 224 struct snd_pcm_hw_params *params) 225 225 { 226 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 226 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 227 227 struct snd_soc_dai *codec_dai; 228 228 int i, ret; 229 229
+6 -6
sound/soc/intel/boards/sof_nau8825.c
··· 65 65 static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd) 66 66 { 67 67 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 68 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 68 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 69 69 struct sof_hdmi_pcm *pcm; 70 70 71 71 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 95 95 static int sof_nau8825_codec_init(struct snd_soc_pcm_runtime *rtd) 96 96 { 97 97 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 98 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 98 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 99 99 100 100 struct snd_soc_jack *jack; 101 101 int ret; ··· 134 134 135 135 static void sof_nau8825_codec_exit(struct snd_soc_pcm_runtime *rtd) 136 136 { 137 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 137 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 138 138 139 139 snd_soc_component_set_jack(component, NULL, NULL); 140 140 } ··· 142 142 static int sof_nau8825_hw_params(struct snd_pcm_substream *substream, 143 143 struct snd_pcm_hw_params *params) 144 144 { 145 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 146 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 145 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 146 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 147 147 int clk_freq, ret; 148 148 149 149 clk_freq = sof_dai_get_bclk(rtd); /* BCLK freq */ ··· 468 468 links[id].name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-BT", port); 469 469 if (!links[id].name) 470 470 goto devm_err; 471 - links[id].codecs = &asoc_dummy_dlc; 471 + links[id].codecs = &snd_soc_dummy_dlc; 472 472 links[id].num_codecs = 1; 473 473 links[id].platforms = platform_component; 474 474 links[id].num_platforms = ARRAY_SIZE(platform_component);
+7 -7
sound/soc/intel/boards/sof_pcm512x.c
··· 71 71 static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd) 72 72 { 73 73 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 74 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 74 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 75 75 struct sof_hdmi_pcm *pcm; 76 76 77 77 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 89 89 90 90 static int sof_pcm512x_codec_init(struct snd_soc_pcm_runtime *rtd) 91 91 { 92 - struct snd_soc_component *codec = asoc_rtd_to_codec(rtd, 0)->component; 92 + struct snd_soc_component *codec = snd_soc_rtd_to_codec(rtd, 0)->component; 93 93 94 94 snd_soc_component_update_bits(codec, PCM512x_GPIO_EN, 0x08, 0x08); 95 95 snd_soc_component_update_bits(codec, PCM512x_GPIO_OUTPUT_4, 0x0f, 0x02); ··· 101 101 102 102 static int aif1_startup(struct snd_pcm_substream *substream) 103 103 { 104 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 105 - struct snd_soc_component *codec = asoc_rtd_to_codec(rtd, 0)->component; 104 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 105 + struct snd_soc_component *codec = snd_soc_rtd_to_codec(rtd, 0)->component; 106 106 107 107 snd_soc_component_update_bits(codec, PCM512x_GPIO_CONTROL_1, 108 108 0x08, 0x08); ··· 112 112 113 113 static void aif1_shutdown(struct snd_pcm_substream *substream) 114 114 { 115 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 116 - struct snd_soc_component *codec = asoc_rtd_to_codec(rtd, 0)->component; 115 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 116 + struct snd_soc_component *codec = snd_soc_rtd_to_codec(rtd, 0)->component; 117 117 118 118 snd_soc_component_update_bits(codec, PCM512x_GPIO_CONTROL_1, 119 119 0x08, 0x00); ··· 331 331 devm_kasprintf(dev, GFP_KERNEL, 332 332 "intel-hdmi-hifi%d", i); 333 333 } else { 334 - idisp_components[i - 1] = asoc_dummy_dlc; 334 + idisp_components[i - 1] = snd_soc_dummy_dlc; 335 335 } 336 336 if (!idisp_components[i - 1].dai_name) 337 337 goto devm_err;
+4 -4
sound/soc/intel/boards/sof_realtek_common.c
··· 68 68 static int rt1011_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 struct snd_soc_dai *codec_dai; 73 73 int srate, i, ret = 0; 74 74 ··· 264 264 static int rt1015_hw_params(struct snd_pcm_substream *substream, 265 265 struct snd_pcm_hw_params *params) 266 266 { 267 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 267 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 268 268 struct snd_soc_dai_link *dai_link = rtd->dai_link; 269 269 struct snd_soc_dai *codec_dai; 270 270 int i, clk_freq; ··· 423 423 static int rt1308_hw_params(struct snd_pcm_substream *substream, 424 424 struct snd_pcm_hw_params *params) 425 425 { 426 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 426 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 427 427 struct snd_soc_card *card = rtd->card; 428 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 428 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 429 429 int clk_id, clk_freq, pll_out; 430 430 int ret; 431 431
+8 -8
sound/soc/intel/boards/sof_rt5682.c
··· 235 235 static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd) 236 236 { 237 237 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 238 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 238 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 239 239 struct sof_hdmi_pcm *pcm; 240 240 241 241 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 265 265 static int sof_rt5682_codec_init(struct snd_soc_pcm_runtime *rtd) 266 266 { 267 267 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 268 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 268 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 269 269 struct snd_soc_jack *jack; 270 270 int extra_jack_data; 271 271 int ret, mclk_freq; ··· 372 372 373 373 static void sof_rt5682_codec_exit(struct snd_soc_pcm_runtime *rtd) 374 374 { 375 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 375 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 376 376 377 377 snd_soc_component_set_jack(component, NULL, NULL); 378 378 } ··· 380 380 static int sof_rt5682_hw_params(struct snd_pcm_substream *substream, 381 381 struct snd_pcm_hw_params *params) 382 382 { 383 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 383 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 384 384 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 385 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 385 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 386 386 int pll_id, pll_source, pll_in, pll_out, clk_id, ret; 387 387 388 388 if (sof_rt5682_quirk & SOF_RT5682_MCLK_EN) { ··· 827 827 if (!idisp_components[i - 1].dai_name) 828 828 goto devm_err; 829 829 } else { 830 - idisp_components[i - 1] = asoc_dummy_dlc; 830 + idisp_components[i - 1] = snd_soc_dummy_dlc; 831 831 } 832 832 833 833 links[id].codecs = &idisp_components[i - 1]; ··· 929 929 links[id].name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-BT", port); 930 930 if (!links[id].name) 931 931 goto devm_err; 932 - links[id].codecs = &asoc_dummy_dlc; 932 + links[id].codecs = &snd_soc_dummy_dlc; 933 933 links[id].num_codecs = 1; 934 934 links[id].platforms = platform_component; 935 935 links[id].num_platforms = ARRAY_SIZE(platform_component); ··· 956 956 if (!links[id].name) 957 957 return NULL; 958 958 links[id].id = id + hdmi_id_offset; 959 - links[id].codecs = &asoc_dummy_dlc; 959 + links[id].codecs = &snd_soc_dummy_dlc; 960 960 links[id].num_codecs = 1; 961 961 links[id].platforms = platform_component; 962 962 links[id].num_platforms = ARRAY_SIZE(platform_component);
+9 -9
sound/soc/intel/boards/sof_sdw.c
··· 511 511 512 512 int sdw_prepare(struct snd_pcm_substream *substream) 513 513 { 514 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 514 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 515 515 struct sdw_stream_runtime *sdw_stream; 516 516 struct snd_soc_dai *dai; 517 517 518 518 /* Find stream from first CPU DAI */ 519 - dai = asoc_rtd_to_cpu(rtd, 0); 519 + dai = snd_soc_rtd_to_cpu(rtd, 0); 520 520 521 521 sdw_stream = snd_soc_dai_get_stream(dai, substream->stream); 522 522 if (IS_ERR(sdw_stream)) { ··· 529 529 530 530 int sdw_trigger(struct snd_pcm_substream *substream, int cmd) 531 531 { 532 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 532 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 533 533 struct sdw_stream_runtime *sdw_stream; 534 534 struct snd_soc_dai *dai; 535 535 int ret; 536 536 537 537 /* Find stream from first CPU DAI */ 538 - dai = asoc_rtd_to_cpu(rtd, 0); 538 + dai = snd_soc_rtd_to_cpu(rtd, 0); 539 539 540 540 sdw_stream = snd_soc_dai_get_stream(dai, substream->stream); 541 541 if (IS_ERR(sdw_stream)) { ··· 569 569 int sdw_hw_params(struct snd_pcm_substream *substream, 570 570 struct snd_pcm_hw_params *params) 571 571 { 572 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 572 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 573 573 int ch = params_channels(params); 574 574 struct snd_soc_dai *codec_dai; 575 575 struct snd_soc_dai *cpu_dai; ··· 617 617 618 618 int sdw_hw_free(struct snd_pcm_substream *substream) 619 619 { 620 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 620 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 621 621 struct sdw_stream_runtime *sdw_stream; 622 622 struct snd_soc_dai *dai; 623 623 624 624 /* Find stream from first CPU DAI */ 625 - dai = asoc_rtd_to_cpu(rtd, 0); 625 + dai = snd_soc_rtd_to_cpu(rtd, 0); 626 626 627 627 sdw_stream = snd_soc_dai_get_stream(dai, substream->stream); 628 628 if (IS_ERR(sdw_stream)) { ··· 1784 1784 cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d Pin", port); 1785 1785 1786 1786 ret = init_simple_dai_link(dev, dai_links + link_index, &be_id, name, 1787 - 1, 1, cpu_dai_name, asoc_dummy_dlc.name, 1788 - asoc_dummy_dlc.dai_name, NULL, NULL); 1787 + 1, 1, cpu_dai_name, snd_soc_dummy_dlc.name, 1788 + snd_soc_dummy_dlc.dai_name, NULL, NULL); 1789 1789 if (ret) 1790 1790 return ret; 1791 1791 }
+1 -1
sound/soc/intel/boards/sof_sdw_cs42l42.c
··· 50 50 { 51 51 struct snd_soc_card *card = rtd->card; 52 52 struct mc_private *ctx = snd_soc_card_get_drvdata(card); 53 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 53 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 54 54 struct snd_soc_component *component = codec_dai->component; 55 55 struct snd_soc_jack *jack; 56 56 int ret;
+1 -1
sound/soc/intel/boards/sof_sdw_cs42l43.c
··· 41 41 42 42 static int cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd) 43 43 { 44 - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; 44 + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; 45 45 struct mc_private *ctx = snd_soc_card_get_drvdata(rtd->card); 46 46 struct snd_soc_jack *jack = &ctx->sdw_headset; 47 47 struct snd_soc_card *card = rtd->card;
+1 -1
sound/soc/intel/boards/sof_sdw_hdmi.c
··· 24 24 int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd) 25 25 { 26 26 struct mc_private *ctx = snd_soc_card_get_drvdata(rtd->card); 27 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 27 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 28 28 struct hdmi_pcm *pcm; 29 29 30 30 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
+2 -2
sound/soc/intel/boards/sof_sdw_maxim.c
··· 64 64 65 65 static int mx8373_enable_spk_pin(struct snd_pcm_substream *substream, bool enable) 66 66 { 67 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 67 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 68 68 struct snd_soc_dai *codec_dai; 69 69 struct snd_soc_dai *cpu_dai; 70 70 int ret; ··· 74 74 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) 75 75 return 0; 76 76 77 - cpu_dai = asoc_rtd_to_cpu(rtd, 0); 77 + cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 78 78 for_each_rtd_codec_dais(rtd, j, codec_dai) { 79 79 struct snd_soc_dapm_context *dapm = 80 80 snd_soc_component_get_dapm(cpu_dai->component);
+1 -1
sound/soc/intel/boards/sof_sdw_rt5682.c
··· 49 49 { 50 50 struct snd_soc_card *card = rtd->card; 51 51 struct mc_private *ctx = snd_soc_card_get_drvdata(card); 52 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 52 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 53 53 struct snd_soc_component *component = codec_dai->component; 54 54 struct snd_soc_jack *jack; 55 55 int ret;
+1 -1
sound/soc/intel/boards/sof_sdw_rt700.c
··· 49 49 { 50 50 struct snd_soc_card *card = rtd->card; 51 51 struct mc_private *ctx = snd_soc_card_get_drvdata(card); 52 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 52 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 53 53 struct snd_soc_component *component = codec_dai->component; 54 54 struct snd_soc_jack *jack; 55 55 int ret;
+1 -1
sound/soc/intel/boards/sof_sdw_rt711.c
··· 73 73 { 74 74 struct snd_soc_card *card = rtd->card; 75 75 struct mc_private *ctx = snd_soc_card_get_drvdata(card); 76 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 76 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 77 77 struct snd_soc_component *component = codec_dai->component; 78 78 struct snd_soc_jack *jack; 79 79 int ret;
+2 -2
sound/soc/intel/boards/sof_sdw_rt_amp.c
··· 251 251 static int rt1308_i2s_hw_params(struct snd_pcm_substream *substream, 252 252 struct snd_pcm_hw_params *params) 253 253 { 254 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 254 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 255 255 struct snd_soc_card *card = rtd->card; 256 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 256 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 257 257 int clk_id, clk_freq, pll_out; 258 258 int err; 259 259
+1 -1
sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c
··· 78 78 { 79 79 struct snd_soc_card *card = rtd->card; 80 80 struct mc_private *ctx = snd_soc_card_get_drvdata(card); 81 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 81 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 82 82 struct snd_soc_component *component = codec_dai->component; 83 83 struct snd_soc_jack *jack; 84 84 int ret;
+4 -4
sound/soc/intel/boards/sof_ssp_amp.c
··· 168 168 static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd) 169 169 { 170 170 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 171 - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); 171 + struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); 172 172 struct sof_hdmi_pcm *pcm; 173 173 174 174 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); ··· 233 233 if (!links[id].name) 234 234 return NULL; 235 235 links[id].id = fixed_be ? (HDMI_IN_BE_ID + i - 1) : id; 236 - links[id].codecs = &asoc_dummy_dlc; 236 + links[id].codecs = &snd_soc_dummy_dlc; 237 237 links[id].num_codecs = 1; 238 238 links[id].platforms = platform_component; 239 239 links[id].num_platforms = ARRAY_SIZE(platform_component); ··· 341 341 if (!idisp_components[i - 1].dai_name) 342 342 goto devm_err; 343 343 } else { 344 - idisp_components[i - 1] = asoc_dummy_dlc; 344 + idisp_components[i - 1] = snd_soc_dummy_dlc; 345 345 } 346 346 347 347 links[id].codecs = &idisp_components[i - 1]; ··· 369 369 links[id].name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-BT", port); 370 370 if (!links[id].name) 371 371 goto devm_err; 372 - links[id].codecs = &asoc_dummy_dlc; 372 + links[id].codecs = &snd_soc_dummy_dlc; 373 373 links[id].num_codecs = 1; 374 374 links[id].platforms = platform_component; 375 375 links[id].num_platforms = ARRAY_SIZE(platform_component);
+2 -2
sound/soc/intel/boards/sof_wm8804.c
··· 49 49 static int sof_wm8804_hw_params(struct snd_pcm_substream *substream, 50 50 struct snd_pcm_hw_params *params) 51 51 { 52 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 52 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 53 53 struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); 54 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 54 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 55 55 struct snd_soc_component *codec = codec_dai->component; 56 56 const int sysclk = 27000000; /* This is fixed on this board */ 57 57 int samplerate;
+6 -6
sound/soc/intel/catpt/pcm.c
··· 74 74 static struct catpt_stream_template * 75 75 catpt_get_stream_template(struct snd_pcm_substream *substream) 76 76 { 77 - struct snd_soc_pcm_runtime *rtm = asoc_substream_to_rtd(substream); 78 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtm, 0); 77 + struct snd_soc_pcm_runtime *rtm = snd_soc_substream_to_rtd(substream); 78 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtm, 0); 79 79 enum catpt_stream_type type; 80 80 81 81 type = cpu_dai->driver->id; ··· 593 593 static int catpt_component_open(struct snd_soc_component *component, 594 594 struct snd_pcm_substream *substream) 595 595 { 596 - struct snd_soc_pcm_runtime *rtm = asoc_substream_to_rtd(substream); 596 + struct snd_soc_pcm_runtime *rtm = snd_soc_substream_to_rtd(substream); 597 597 598 598 if (!rtm->dai_link->no_pcm) 599 599 snd_soc_set_runtime_hwparams(substream, &catpt_pcm_hardware); ··· 604 604 catpt_component_pointer(struct snd_soc_component *component, 605 605 struct snd_pcm_substream *substream) 606 606 { 607 - struct snd_soc_pcm_runtime *rtm = asoc_substream_to_rtd(substream); 608 - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtm, 0); 607 + struct snd_soc_pcm_runtime *rtm = snd_soc_substream_to_rtd(substream); 608 + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtm, 0); 609 609 struct catpt_stream_runtime *stream; 610 610 struct catpt_dev *cdev = dev_get_drvdata(component->dev); 611 611 u32 pos; ··· 631 631 static int catpt_dai_pcm_new(struct snd_soc_pcm_runtime *rtm, 632 632 struct snd_soc_dai *dai) 633 633 { 634 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtm, 0); 634 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtm, 0); 635 635 struct catpt_ssp_device_format devfmt; 636 636 struct catpt_dev *cdev = dev_get_drvdata(dai->dev); 637 637 int ret;
+2 -2
sound/soc/intel/keembay/kmb_platform.c
··· 252 252 struct snd_pcm_substream *substream) 253 253 { 254 254 struct snd_pcm_runtime *runtime = substream->runtime; 255 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 255 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 256 256 struct kmb_i2s_info *kmb_i2s; 257 257 258 - kmb_i2s = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0)); 258 + kmb_i2s = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); 259 259 snd_soc_set_runtime_hwparams(substream, &kmb_pcm_hardware); 260 260 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); 261 261 runtime->private_data = kmb_i2s;
+9 -9
sound/soc/intel/skylake/skl-pcm.c
··· 545 545 { 546 546 struct hdac_bus *bus = dev_get_drvdata(dai->dev); 547 547 struct hdac_ext_stream *link_dev; 548 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 549 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 548 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 549 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 550 550 struct skl_pipe_params p_params = {0}; 551 551 struct hdac_ext_link *link; 552 552 int stream_tag; ··· 633 633 struct snd_soc_dai *dai) 634 634 { 635 635 struct hdac_bus *bus = dev_get_drvdata(dai->dev); 636 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 636 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 637 637 struct hdac_ext_stream *link_dev = 638 638 snd_soc_dai_get_dma_data(dai, substream); 639 639 struct hdac_ext_link *link; ··· 643 643 644 644 link_dev->link_prepared = 0; 645 645 646 - link = snd_hdac_ext_bus_get_hlink_by_name(bus, asoc_rtd_to_codec(rtd, 0)->component->name); 646 + link = snd_hdac_ext_bus_get_hlink_by_name(bus, snd_soc_rtd_to_codec(rtd, 0)->component->name); 647 647 if (!link) 648 648 return -EINVAL; 649 649 ··· 1070 1070 static int skl_platform_soc_open(struct snd_soc_component *component, 1071 1071 struct snd_pcm_substream *substream) 1072 1072 { 1073 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1073 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1074 1074 struct snd_soc_dai_link *dai_link = rtd->dai_link; 1075 1075 1076 - dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "In %s:%s\n", __func__, 1076 + dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "In %s:%s\n", __func__, 1077 1077 dai_link->cpus->dai_name); 1078 1078 1079 1079 snd_soc_set_runtime_hwparams(substream, &azx_pcm_hw); ··· 1217 1217 static u64 skl_adjust_codec_delay(struct snd_pcm_substream *substream, 1218 1218 u64 nsec) 1219 1219 { 1220 - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1221 - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 1220 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 1221 + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 1222 1222 u64 codec_frames, codec_nsecs; 1223 1223 1224 1224 if (!codec_dai->driver->ops->delay) ··· 1272 1272 static int skl_platform_soc_new(struct snd_soc_component *component, 1273 1273 struct snd_soc_pcm_runtime *rtd) 1274 1274 { 1275 - struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); 1275 + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0); 1276 1276 struct hdac_bus *bus = dev_get_drvdata(dai->dev); 1277 1277 struct snd_pcm *pcm = rtd->pcm; 1278 1278 unsigned int size;