Lines Matching full:rtd

26 	struct snd_soc_pcm_runtime *rtd = cstream->private_data;  in snd_soc_compr_components_open()  local
31 for_each_rtd_components(rtd, i, component) { in snd_soc_compr_components_open()
47 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in snd_soc_compr_components_free() local
51 for_each_rtd_components(rtd, i, component) { in snd_soc_compr_components_free()
59 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_clean() local
60 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in soc_compr_clean()
61 struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); in soc_compr_clean()
64 snd_soc_dpcm_mutex_lock(rtd); in soc_compr_clean()
67 snd_soc_runtime_deactivate(rtd, stream); in soc_compr_clean()
84 snd_soc_dapm_stream_stop(rtd, stream); in soc_compr_clean()
86 snd_soc_dpcm_mutex_unlock(rtd); in soc_compr_clean()
88 snd_soc_pcm_component_pm_runtime_put(rtd, cstream, rollback); in soc_compr_clean()
100 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_open() local
101 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in soc_compr_open()
105 ret = snd_soc_pcm_component_pm_runtime_get(rtd, cstream); in soc_compr_open()
109 snd_soc_dpcm_mutex_lock(rtd); in soc_compr_open()
123 snd_soc_runtime_activate(rtd, stream); in soc_compr_open()
125 snd_soc_dpcm_mutex_unlock(rtd); in soc_compr_open()
246 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_trigger() local
247 struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); in soc_compr_trigger()
248 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in soc_compr_trigger()
252 snd_soc_dpcm_mutex_lock(rtd); in soc_compr_trigger()
272 snd_soc_dpcm_mutex_unlock(rtd); in soc_compr_trigger()
325 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_set_params() local
326 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in soc_compr_set_params()
330 snd_soc_dpcm_mutex_lock(rtd); in soc_compr_set_params()
351 snd_soc_dapm_stream_event(rtd, stream, SND_SOC_DAPM_STREAM_START); in soc_compr_set_params()
354 rtd->pop_wait = 0; in soc_compr_set_params()
355 snd_soc_dpcm_mutex_unlock(rtd); in soc_compr_set_params()
357 cancel_delayed_work_sync(&rtd->delayed_work); in soc_compr_set_params()
362 snd_soc_dpcm_mutex_unlock(rtd); in soc_compr_set_params()
425 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_get_params() local
426 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in soc_compr_get_params()
429 snd_soc_dpcm_mutex_lock(rtd); in soc_compr_get_params()
437 snd_soc_dpcm_mutex_unlock(rtd); in soc_compr_get_params()
443 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_ack() local
444 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in soc_compr_ack()
447 snd_soc_dpcm_mutex_lock(rtd); in soc_compr_ack()
455 snd_soc_dpcm_mutex_unlock(rtd); in soc_compr_ack()
462 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_pointer() local
464 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in soc_compr_pointer()
466 snd_soc_dpcm_mutex_lock(rtd); in soc_compr_pointer()
474 snd_soc_dpcm_mutex_unlock(rtd); in soc_compr_pointer()
481 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_set_metadata() local
482 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in soc_compr_set_metadata()
495 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_get_metadata() local
496 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in soc_compr_get_metadata()
539 * @rtd: The runtime for which we will create compress
544 int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) in snd_soc_new_compress() argument
547 struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); in snd_soc_new_compress()
548 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); in snd_soc_new_compress()
563 if (rtd->dai_link->num_cpus > 1 || in snd_soc_new_compress()
564 rtd->dai_link->num_codecs > 1) { in snd_soc_new_compress()
565 dev_err(rtd->card->dev, in snd_soc_new_compress()
571 dev_err(rtd->card->dev, "Missing codec\n"); in snd_soc_new_compress()
588 dev_err(rtd->card->dev, in snd_soc_new_compress()
599 compr = devm_kzalloc(rtd->card->dev, sizeof(*compr), GFP_KERNEL); in snd_soc_new_compress()
603 compr->ops = devm_kzalloc(rtd->card->dev, sizeof(soc_compr_ops), in snd_soc_new_compress()
608 if (rtd->dai_link->dynamic) { in snd_soc_new_compress()
610 rtd->dai_link->stream_name); in snd_soc_new_compress()
612 ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, in snd_soc_new_compress()
613 rtd->dai_link->dpcm_playback, in snd_soc_new_compress()
614 rtd->dai_link->dpcm_capture, &be_pcm); in snd_soc_new_compress()
616 dev_err(rtd->card->dev, in snd_soc_new_compress()
618 rtd->dai_link->name, ret); in snd_soc_new_compress()
623 be_pcm->nonatomic = rtd->dai_link->nonatomic; 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()
627 if (rtd->dai_link->dpcm_playback) in snd_soc_new_compress()
628 be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd; in snd_soc_new_compress()
629 if (rtd->dai_link->dpcm_capture) in snd_soc_new_compress()
630 be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd; in snd_soc_new_compress()
634 rtd->dai_link->stream_name, codec_dai->name, num); in snd_soc_new_compress()
639 for_each_rtd_components(rtd, i, component) { in snd_soc_new_compress()
648 ret = snd_compress_new(rtd->card->snd_card, num, direction, in snd_soc_new_compress()
651 component = snd_soc_rtd_to_codec(rtd, 0)->component; in snd_soc_new_compress()
659 rtd->close_delayed_work_func = snd_soc_close_delayed_work; in snd_soc_new_compress()
661 rtd->compr = compr; in snd_soc_new_compress()
662 compr->private_data = rtd; in snd_soc_new_compress()
664 dev_dbg(rtd->card->dev, "Compress ASoC: %s <-> %s mapping ok\n", in snd_soc_new_compress()