/linux/sound/soc/ |
H A D | soc-link.c | 11 #define soc_link_ret(rtd, ret) _soc_link_ret(rtd, __func__, ret) argument 25 dev_err(rtd->dev, in _soc_link_ret() 37 #define soc_link_mark_push(rtd, substream, tgt) ((rtd)->mark_##tgt = substream) argument 38 #define soc_link_mark_pop(rtd, substream, tgt) ((rtd)->mark_##tgt = NULL) argument 39 #define soc_link_mark_match(rtd, substream, tgt) ((rtd)->mark_##tgt == substream) argument 45 if (rtd->dai_link->init) in snd_soc_link_init() 46 ret = rtd->dai_link->init(rtd); in snd_soc_link_init() 53 if (rtd->dai_link->exit) in snd_soc_link_exit() 54 rtd->dai_link->exit(rtd); in snd_soc_link_exit() 63 ret = rtd->dai_link->be_hw_params_fixup(rtd, params); in snd_soc_link_be_hw_params_fixup() [all …]
|
H A D | soc-compress.c | 64 snd_soc_dpcm_mutex_lock(rtd); in soc_compr_clean() 86 snd_soc_dpcm_mutex_unlock(rtd); in soc_compr_clean() 109 snd_soc_dpcm_mutex_lock(rtd); in soc_compr_open() 354 rtd->pop_wait = 0; in soc_compr_set_params() 565 dev_err(rtd->card->dev, in snd_soc_new_compress() 588 dev_err(rtd->card->dev, in snd_soc_new_compress() 616 dev_err(rtd->card->dev, in snd_soc_new_compress() 625 rtd->pcm = be_pcm; in snd_soc_new_compress() 626 rtd->fe_compr = 1; in snd_soc_new_compress() 661 rtd->compr = compr; in snd_soc_new_compress() [all …]
|
H A D | soc-pcm.c | 29 #define soc_pcm_ret(rtd, ret) _soc_pcm_ret(rtd, __func__, ret) argument 44 dev_err(rtd->dev, in _soc_pcm_ret() 294 rtd->debugfs_dpcm_root = debugfs_create_dir(rtd->dai_link->name, in soc_dpcm_debugfs_add() 408 if (!rtd->pmdown_time || rtd->dai_link->ignore_pmdown_time) in snd_soc_runtime_ignore_pmdown_time() 921 if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) in __soc_pcm_open() 990 rtd->pop_wait) { in __soc_pcm_prepare() 991 rtd->pop_wait = 0; in __soc_pcm_prepare() 1500 if (rtd) in dpcm_end_walk_at_be() 3007 rtd->pcm = pcm; in soc_new_pcm() 3012 if (rtd->dai_link->no_pcm || rtd->dai_link->c2c_params) { in soc_new_pcm() [all …]
|
H A D | soc-component.c | 590 snd_soc_dpcm_mutex_lock(rtd); in snd_soc_component_compr_get_caps() 601 snd_soc_dpcm_mutex_unlock(rtd); in snd_soc_component_compr_get_caps() 614 snd_soc_dpcm_mutex_lock(rtd); in snd_soc_component_compr_get_codec_caps() 625 snd_soc_dpcm_mutex_unlock(rtd); in snd_soc_component_compr_get_codec_caps() 678 snd_soc_dpcm_mutex_lock(rtd); in snd_soc_component_compr_copy() 689 snd_soc_dpcm_mutex_unlock(rtd); in snd_soc_component_compr_copy() 985 for_each_rtd_components(rtd, i, component) in snd_soc_pcm_component_pointer() 998 for_each_rtd_codec_dais(rtd, i, dai) { in snd_soc_component_is_codec_on_rtd() 1042 for_each_rtd_components(rtd, i, component) in snd_soc_pcm_component_ioctl() 1079 for_each_rtd_components(rtd, i, component) in snd_soc_pcm_component_copy() [all …]
|
/linux/drivers/rtc/ |
H A D | rtc-test.c | 45 timeout -= rtd->offset; in test_rtc_set_alarm() 47 del_timer(&rtd->alarm); in test_rtc_set_alarm() 56 add_timer(&rtd->alarm); in test_rtc_set_alarm() 85 rtd->alarm_en = enable; in test_rtc_alarm_irq_enable() 87 add_timer(&rtd->alarm); in test_rtc_alarm_irq_enable() 89 del_timer(&rtd->alarm); in test_rtc_alarm_irq_enable() 110 struct rtc_test_data *rtd = from_timer(rtd, t, alarm); in test_rtc_alarm_handler() local 119 rtd = devm_kzalloc(&plat_dev->dev, sizeof(*rtd), GFP_KERNEL); in test_probe() 120 if (!rtd) in test_probe() 126 if (IS_ERR(rtd->rtc)) in test_probe() [all …]
|
/linux/sound/soc/amd/ |
H A D | acp-pcm-dma.c | 348 rtd->direction, rtd->pte_offset, in config_acp_dma() 353 rtd->direction, rtd->sram_bank, in config_acp_dma() 1043 if (!rtd) in acp_dma_pointer() 1092 if (!rtd) in acp_dma_prepare() 1121 if (!rtd) in acp_dma_trigger() 1127 rtd->bytescount = acp_get_byte_count(rtd); in acp_dma_trigger() 1141 acp_dma_start(rtd->acp_mmio, rtd->ch1, true); in acp_dma_trigger() 1143 acp_dma_start(rtd->acp_mmio, rtd->ch1, true); in acp_dma_trigger() 1144 acp_dma_start(rtd->acp_mmio, rtd->ch2, true); in acp_dma_trigger() 1151 acp_dma_stop(rtd->acp_mmio, rtd->ch2); in acp_dma_trigger() [all …]
|
/linux/sound/soc/amd/raven/ |
H A D | acp3x-i2s.c | 75 struct i2s_stream_instance *rtd; in acp3x_i2s_hwparams() local 99 rtd->xfer_resolution = 0x0; in acp3x_i2s_hwparams() 102 rtd->xfer_resolution = 0x02; in acp3x_i2s_hwparams() 105 rtd->xfer_resolution = 0x04; in acp3x_i2s_hwparams() 108 rtd->xfer_resolution = 0x05; in acp3x_i2s_hwparams() 114 switch (rtd->i2s_instance) { in acp3x_i2s_hwparams() 125 switch (rtd->i2s_instance) { in acp3x_i2s_hwparams() 164 rtd->bytescount = acp_get_byte_count(rtd, in acp3x_i2s_trigger() 167 switch (rtd->i2s_instance) { in acp3x_i2s_trigger() 184 switch (rtd->i2s_instance) { in acp3x_i2s_trigger() [all …]
|
H A D | acp3x-pcm-dma.c | 114 addr = rtd->dma_addr; in config_acp3x_dma() 117 switch (rtd->i2s_instance) { in config_acp3x_dma() 126 switch (rtd->i2s_instance) { in config_acp3x_dma() 156 switch (rtd->i2s_instance) { in config_acp3x_dma() 178 switch (rtd->i2s_instance) { in config_acp3x_dma() 260 if (!rtd) in acp3x_dma_hw_params() 266 switch (rtd->i2s_instance) { in acp3x_dma_hw_params() 276 switch (rtd->i2s_instance) { in acp3x_dma_hw_params() 309 bytescount -= rtd->bytescount; in acp3x_dma_pointer() 443 switch (rtd->i2s_instance) { in acp3x_resume() [all …]
|
/linux/sound/soc/amd/vangogh/ |
H A D | acp5x-i2s.c | 86 struct i2s_stream_instance *rtd; in acp5x_i2s_hwparams() local 114 rtd->xfer_resolution = 0x0; in acp5x_i2s_hwparams() 117 rtd->xfer_resolution = 0x02; in acp5x_i2s_hwparams() 120 rtd->xfer_resolution = 0x04; in acp5x_i2s_hwparams() 123 rtd->xfer_resolution = 0x05; in acp5x_i2s_hwparams() 129 switch (rtd->i2s_instance) { in acp5x_i2s_hwparams() 140 switch (rtd->i2s_instance) { in acp5x_i2s_hwparams() 227 rtd->bclk_div = bclk_div_val; in acp5x_i2s_hwparams() 250 rtd->bytescount = acp_get_byte_count(rtd, in acp5x_i2s_trigger() 253 switch (rtd->i2s_instance) { in acp5x_i2s_trigger() [all …]
|
H A D | acp5x-pcm-dma.c | 110 addr = rtd->dma_addr; in config_acp5x_dma() 112 switch (rtd->i2s_instance) { in config_acp5x_dma() 121 switch (rtd->i2s_instance) { in config_acp5x_dma() 150 switch (rtd->i2s_instance) { in config_acp5x_dma() 172 switch (rtd->i2s_instance) { in config_acp5x_dma() 254 if (!rtd) in acp5x_dma_hw_params() 260 switch (rtd->i2s_instance) { in acp5x_dma_hw_params() 434 acp_writel((rtd->xfer_resolution << 3), rtd->acp5x_base + ACP_HSTDM_ITER); in acp5x_pcm_resume() 444 acp_writel((rtd->xfer_resolution << 3), rtd->acp5x_base + ACP_I2STDM_ITER); in acp5x_pcm_resume() 455 acp_writel((rtd->xfer_resolution << 3), rtd->acp5x_base + ACP_HSTDM_IRER); in acp5x_pcm_resume() [all …]
|
H A D | acp5x.h | 158 switch (rtd->i2s_instance) { in acp_get_byte_count() 161 acp_readl(rtd->acp5x_base + in acp_get_byte_count() 164 acp_readl(rtd->acp5x_base + in acp_get_byte_count() 170 acp_readl(rtd->acp5x_base + in acp_get_byte_count() 173 acp_readl(rtd->acp5x_base + in acp_get_byte_count() 177 switch (rtd->i2s_instance) { in acp_get_byte_count() 180 acp_readl(rtd->acp5x_base + in acp_get_byte_count() 183 acp_readl(rtd->acp5x_base + in acp_get_byte_count() 189 acp_readl(rtd->acp5x_base + in acp_get_byte_count() 192 acp_readl(rtd->acp5x_base + in acp_get_byte_count() [all …]
|
/linux/sound/soc/qcom/ |
H A D | sc7180.c | 59 struct snd_soc_card *card = rtd->card; in sc7180_headset_init() 95 struct snd_soc_card *card = rtd->card; in sc7180_hdmi_init() 125 return sc7180_headset_init(rtd); in sc7180_init() 129 return sc7180_hdmi_init(rtd); in sc7180_init() 144 return sc7180_headset_init(rtd); in sc7180_qdsp_init() 149 return sc7180_hdmi_init(rtd); in sc7180_qdsp_init() 204 struct snd_soc_card *card = rtd->card; in sc7180_snd_startup() 238 struct snd_soc_card *card = rtd->card; in sc7180_qdsp_snd_startup() 311 struct snd_soc_card *card = rtd->card; in sc7180_snd_shutdown() 338 struct snd_soc_card *card = rtd->card; in sc7180_qdsp_snd_shutdown() [all …]
|
H A D | sc7280.c | 62 struct snd_soc_card *card = rtd->card; in sc7280_headset_init() 102 for_each_rtd_codec_dais(rtd, i, codec_dai) { in sc7280_headset_init() 119 struct snd_soc_card *card = rtd->card; in sc7280_hdmi_init() 145 struct snd_soc_card *card = rtd->card; in sc7280_rt5682_init() 163 dev_err(rtd->dev, "can't set codec pll: %d\n", ret); in sc7280_rt5682_init() 188 return sc7280_headset_init(rtd); in sc7280_init() 197 return sc7280_hdmi_init(rtd); in sc7280_init() 216 if (!rtd->dai_link->no_pcm) { in sc7280_snd_hw_params() 228 for_each_rtd_codec_dais(rtd, i, codec_dai) { in sc7280_snd_hw_params() 317 struct snd_soc_card *card = rtd->card; in sc7280_snd_shutdown() [all …]
|
H A D | sdm845.c | 71 for_each_rtd_codec_dais(rtd, i, codec_dai) { in sdm845_slim_snd_hw_params() 153 for_each_rtd_codec_dais(rtd, j, codec_dai) { in sdm845_tdm_snd_hw_params() 161 dev_err(rtd->dev, in sdm845_tdm_snd_hw_params() 173 dev_err(rtd->dev, in sdm845_tdm_snd_hw_params() 207 dev_err(rtd->dev, in sdm845_snd_hw_params() 236 struct snd_soc_card *card = rtd->card; in sdm845_dai_init() 299 for_each_rtd_codec_dais(rtd, i, codec_dai) { in sdm845_dai_init() 336 struct snd_soc_card *card = rtd->card; in sdm845_snd_startup() 395 dev_err(rtd->dev, in sdm845_snd_startup() 406 dev_err(rtd->dev, in sdm845_snd_startup() [all …]
|
H A D | sc8280xp.c | 26 static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd) in sc8280xp_snd_init() argument 28 struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(rtd->card); in sc8280xp_snd_init() 29 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in sc8280xp_snd_init() 30 struct snd_soc_card *card = rtd->card; in sc8280xp_snd_init() 61 return qcom_snd_dp_jack_setup(rtd, dp_jack, dp_pcm_id); in sc8280xp_snd_init() 63 return qcom_snd_wcd_jack_setup(rtd, &data->jack, &data->jack_setup); in sc8280xp_snd_init() 69 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in sc8280xp_snd_shutdown() 80 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in sc8280xp_be_hw_params_fixup() 108 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in sc8280xp_snd_hw_params() 117 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in sc8280xp_snd_prepare() [all …]
|
H A D | x1e80100.c | 27 static int x1e80100_snd_init(struct snd_soc_pcm_runtime *rtd) in x1e80100_snd_init() argument 29 struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); in x1e80100_snd_init() 30 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in x1e80100_snd_init() 48 return qcom_snd_dp_jack_setup(rtd, dp_jack, dp_pcm_id); in x1e80100_snd_init() 50 return qcom_snd_wcd_jack_setup(rtd, &data->jack, &data->jack_setup); in x1e80100_snd_init() 56 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in x1e80100_snd_shutdown() 57 struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); in x1e80100_snd_shutdown() 67 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in x1e80100_be_hw_params_fixup() 92 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in x1e80100_snd_hw_params() 101 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in x1e80100_snd_prepare() [all …]
|
H A D | sm8250.c | 28 static int sm8250_snd_init(struct snd_soc_pcm_runtime *rtd) in sm8250_snd_init() argument 30 struct sm8250_snd_data *data = snd_soc_card_get_drvdata(rtd->card); in sm8250_snd_init() 32 return qcom_snd_wcd_jack_setup(rtd, &data->jack, &data->jack_setup); in sm8250_snd_init() 35 static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, in sm8250_be_hw_params_fixup() argument 54 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in sm8250_snd_startup() 55 struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); in sm8250_snd_startup() 84 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in sm2450_snd_shutdown() 85 struct sm8250_snd_data *data = snd_soc_card_get_drvdata(rtd->card); in sm2450_snd_shutdown() 96 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in sm8250_snd_hw_params() 105 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in sm8250_snd_prepare() [all …]
|
/linux/sound/soc/intel/boards/ |
H A D | sof_realtek_common.c | 145 for_each_rtd_codec_dais(rtd, i, codec_dai) { in rt1011_hw_params() 188 struct snd_soc_card *card = rtd->card; in rt1011_init() 346 struct snd_soc_card *card = rtd->card; in rt1015p_init() 400 struct snd_soc_dai_link *dai_link = rtd->dai_link; in rt1015_hw_params() 405 clk_freq = sof_dai_get_bclk(rtd); in rt1015_hw_params() 412 for_each_rtd_codec_dais(rtd, i, codec_dai) { in rt1015_hw_params() 483 struct snd_soc_card *card = rtd->card; in speaker_codec_init_lr() 563 struct snd_soc_card *card = rtd->card; in rt1308_init() 593 struct snd_soc_card *card = rtd->card; in rt1308_hw_params() 600 clk_freq = sof_dai_get_mclk(rtd); in rt1308_hw_params() [all …]
|
H A D | sof_maxim_common.c | 114 struct snd_soc_dai_link *dai_link = rtd->dai_link; in max_98373_hw_params() 122 for_each_rtd_codec_dais(rtd, i, codec_dai) { in max_98373_hw_params() 132 tdm_slots = sof_dai_get_tdm_slots(rtd); in max_98373_hw_params() 134 dev_err(rtd->dev, "invalid tdm slots %d\n", in max_98373_hw_params() 202 cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in max_98373_trigger() 203 for_each_rtd_codec_dais(rtd, j, codec_dai) { in max_98373_trigger() 241 struct snd_soc_card *card = rtd->card; in max_98373_spk_codec_init() 383 struct snd_soc_dai_link *dai_link = rtd->dai_link; in max_98390_hw_params() 387 for_each_rtd_codec_dais(rtd, i, codec_dai) { in max_98390_hw_params() 418 struct snd_soc_card *card = rtd->card; in max_98390_init() [all …]
|
/linux/sound/soc/amd/ps/ |
H A D | ps-pdm-dma.c | 163 addr = rtd->dma_addr; in acp63_config_dma() 221 struct pdm_stream_instance *rtd; in acp63_pdm_dma_hw_params() local 225 if (!rtd) in acp63_pdm_dma_hw_params() 253 struct pdm_stream_instance *rtd; in acp63_pdm_dma_pointer() local 257 rtd = stream->runtime->private_data; in acp63_pdm_dma_pointer() 261 if (bytescount > rtd->bytescount) in acp63_pdm_dma_pointer() 262 bytescount -= rtd->bytescount; in acp63_pdm_dma_pointer() 292 struct pdm_stream_instance *rtd; in acp63_pdm_dai_trigger() local 312 rtd->bytescount = acp63_pdm_get_byte_count(rtd, substream->stream); in acp63_pdm_dai_trigger() 409 struct pdm_stream_instance *rtd; in acp63_pdm_resume() local [all …]
|
/linux/sound/soc/amd/yc/ |
H A D | acp6x-pdm-dma.c | 159 addr = rtd->dma_addr; in acp6x_config_dma() 219 struct pdm_stream_instance *rtd; in acp6x_pdm_dma_hw_params() local 223 if (!rtd) in acp6x_pdm_dma_hw_params() 250 struct pdm_stream_instance *rtd; in acp6x_pdm_dma_pointer() local 254 rtd = stream->runtime->private_data; in acp6x_pdm_dma_pointer() 258 if (bytescount > rtd->bytescount) in acp6x_pdm_dma_pointer() 259 bytescount -= rtd->bytescount; in acp6x_pdm_dma_pointer() 287 struct pdm_stream_instance *rtd; in acp6x_pdm_dai_trigger() local 308 rtd->bytescount = acp6x_pdm_get_byte_count(rtd, substream->stream); in acp6x_pdm_dai_trigger() 401 struct pdm_stream_instance *rtd; in acp6x_pdm_resume() local [all …]
|
/linux/sound/soc/amd/renoir/ |
H A D | acp3x-pdm-dma.c | 182 addr = rtd->dma_addr; in config_acp_dma() 243 struct pdm_stream_instance *rtd; in acp_pdm_dma_hw_params() local 247 if (!rtd) in acp_pdm_dma_hw_params() 255 rtd->acp_base); in acp_pdm_dma_hw_params() 265 rn_readl(rtd->acp_base + in acp_pdm_get_byte_count() 268 rn_readl(rtd->acp_base + in acp_pdm_get_byte_count() 276 struct pdm_stream_instance *rtd; in acp_pdm_dma_pointer() local 285 bytescount -= rtd->bytescount; in acp_pdm_dma_pointer() 313 struct pdm_stream_instance *rtd; in acp_pdm_dai_trigger() local 334 rtd->bytescount = acp_pdm_get_byte_count(rtd, in acp_pdm_dai_trigger() [all …]
|
/linux/sound/soc/sof/ |
H A D | compress.c | 50 struct snd_soc_pcm_runtime *rtd; in snd_sof_compr_fragment_elapsed() local 59 rtd = cstream->private_data; in snd_sof_compr_fragment_elapsed() 64 spcm = snd_sof_find_spcm_dai(component, rtd); in snd_sof_compr_fragment_elapsed() 312 div_u64_rem(rtd->total_bytes_available, rtd->buffer_size, &offset); in sof_compr_copy_playback() 313 ptr = rtd->dma_area + offset; in sof_compr_copy_playback() 314 n = rtd->buffer_size - offset; in sof_compr_copy_playback() 333 div_u64_rem(rtd->total_bytes_transferred, rtd->buffer_size, &offset); in sof_compr_copy_capture() 334 ptr = rtd->dma_area + offset; in sof_compr_copy_capture() 335 n = rtd->buffer_size - offset; in sof_compr_copy_capture() 353 if (count > rtd->buffer_size) in sof_compr_copy() [all …]
|
/linux/sound/soc/tegra/ |
H A D | tegra_pcm.c | 82 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in tegra_pcm_open() 85 if (rtd->dai_link->no_pcm) in tegra_pcm_open() 97 dev_err(rtd->dev, "failed to set constraint %d\n", ret); in tegra_pcm_open() 111 dev_err(rtd->dev, in tegra_pcm_open() 132 if (rtd->dai_link->no_pcm) in tegra_pcm_close() 151 if (rtd->dai_link->no_pcm) in tegra_pcm_hw_params() 163 dev_err(rtd->dev, "hw params config failed with err %d\n", ret); in tegra_pcm_hw_params() 179 dev_err(rtd->dev, "dma slave config failed with err %d\n", ret); in tegra_pcm_hw_params() 197 struct snd_pcm *pcm = rtd->pcm; in tegra_pcm_dma_allocate() 208 struct snd_soc_pcm_runtime *rtd) in tegra_pcm_construct() argument [all …]
|
/linux/sound/soc/amd/acp/ |
H A D | acp-mach-common.c | 118 struct snd_soc_card *card = rtd->card; in acp_card_rt5682_init() 176 struct snd_soc_card *card = rtd->card; in acp_card_hs_startup() 210 struct snd_soc_card *card = rtd->card; in acp_card_shutdown() 221 struct snd_soc_card *card = rtd->card; in acp_card_rt5682_hw_params() 359 struct snd_soc_card *card = rtd->card; in acp_card_rt5682s_init() 419 struct snd_soc_card *card = rtd->card; in acp_card_rt5682s_hw_params() 583 struct snd_soc_card *card = rtd->card; in acp_card_rt1019_init() 612 struct snd_soc_card *card = rtd->card; in acp_card_rt1019_hw_params() 748 struct snd_soc_card *card = rtd->card; in acp_card_maxim_init() 777 struct snd_soc_card *card = rtd->card; in acp_card_maxim_hw_params() [all …]
|