Lines Matching refs:rtd
27 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in snd_soc_compr_components_open() local
32 for_each_rtd_components(rtd, i, component) { in snd_soc_compr_components_open()
48 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in snd_soc_compr_components_free() local
52 for_each_rtd_components(rtd, i, component) { in snd_soc_compr_components_free()
60 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_clean() local
61 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); in soc_compr_clean()
62 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); in soc_compr_clean()
65 mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); in soc_compr_clean()
68 snd_soc_runtime_deactivate(rtd, stream); in soc_compr_clean()
85 snd_soc_dapm_stream_stop(rtd, stream); in soc_compr_clean()
87 mutex_unlock(&rtd->card->pcm_mutex); in soc_compr_clean()
89 snd_soc_pcm_component_pm_runtime_put(rtd, cstream, rollback); in soc_compr_clean()
101 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_open() local
102 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); in soc_compr_open()
106 ret = snd_soc_pcm_component_pm_runtime_get(rtd, cstream); in soc_compr_open()
110 mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); in soc_compr_open()
124 snd_soc_runtime_activate(rtd, stream); in soc_compr_open()
126 mutex_unlock(&rtd->card->pcm_mutex); in soc_compr_open()
251 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_trigger() local
252 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); in soc_compr_trigger()
253 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); in soc_compr_trigger()
257 mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); in soc_compr_trigger()
277 mutex_unlock(&rtd->card->pcm_mutex); in soc_compr_trigger()
330 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_set_params() local
331 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); in soc_compr_set_params()
335 mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); in soc_compr_set_params()
356 snd_soc_dapm_stream_event(rtd, stream, SND_SOC_DAPM_STREAM_START); in soc_compr_set_params()
359 rtd->pop_wait = 0; in soc_compr_set_params()
360 mutex_unlock(&rtd->card->pcm_mutex); in soc_compr_set_params()
362 cancel_delayed_work_sync(&rtd->delayed_work); in soc_compr_set_params()
367 mutex_unlock(&rtd->card->pcm_mutex); 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 = asoc_rtd_to_cpu(rtd, 0); in soc_compr_get_params()
429 mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); in soc_compr_get_params()
437 mutex_unlock(&rtd->card->pcm_mutex); 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 = asoc_rtd_to_cpu(rtd, 0); in soc_compr_ack()
447 mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); in soc_compr_ack()
455 mutex_unlock(&rtd->card->pcm_mutex); 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 = asoc_rtd_to_cpu(rtd, 0); in soc_compr_pointer()
466 mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); in soc_compr_pointer()
474 mutex_unlock(&rtd->card->pcm_mutex); 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 = asoc_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 = asoc_rtd_to_cpu(rtd, 0); in soc_compr_get_metadata()
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 = asoc_rtd_to_codec(rtd, 0); in snd_soc_new_compress()
548 struct snd_soc_dai *cpu_dai = asoc_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()
622 rtd->pcm = be_pcm; in snd_soc_new_compress()
623 rtd->fe_compr = 1; in snd_soc_new_compress()
624 if (rtd->dai_link->dpcm_playback) in snd_soc_new_compress()
625 be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd; in snd_soc_new_compress()
626 else if (rtd->dai_link->dpcm_capture) in snd_soc_new_compress()
627 be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd; in snd_soc_new_compress()
631 rtd->dai_link->stream_name, codec_dai->name, num); in snd_soc_new_compress()
636 for_each_rtd_components(rtd, i, component) { in snd_soc_new_compress()
645 ret = snd_compress_new(rtd->card->snd_card, num, direction, in snd_soc_new_compress()
648 component = asoc_rtd_to_codec(rtd, 0)->component; in snd_soc_new_compress()
656 rtd->close_delayed_work_func = snd_soc_close_delayed_work; in snd_soc_new_compress()
658 rtd->compr = compr; in snd_soc_new_compress()
659 compr->private_data = rtd; in snd_soc_new_compress()
661 dev_dbg(rtd->card->dev, "Compress ASoC: %s <-> %s mapping ok\n", in snd_soc_new_compress()