Lines Matching refs:cstream

23 static int soc_compr_components_open(struct snd_compr_stream *cstream,  in soc_compr_components_open()  argument
26 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_components_open()
38 ret = component->driver->compr_ops->open(cstream); in soc_compr_components_open()
53 static int soc_compr_components_free(struct snd_compr_stream *cstream, in soc_compr_components_free() argument
56 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_components_free()
70 component->driver->compr_ops->free(cstream); in soc_compr_components_free()
76 static int soc_compr_open(struct snd_compr_stream *cstream) in soc_compr_open() argument
78 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_open()
86 ret = cpu_dai->driver->cops->startup(cstream, cpu_dai); in soc_compr_open()
95 ret = soc_compr_components_open(cstream, &component); in soc_compr_open()
100 ret = rtd->dai_link->compr_ops->startup(cstream); in soc_compr_open()
109 snd_soc_runtime_activate(rtd, cstream->direction); in soc_compr_open()
116 soc_compr_components_free(cstream, component); in soc_compr_open()
119 cpu_dai->driver->cops->shutdown(cstream, cpu_dai); in soc_compr_open()
125 static int soc_compr_open_fe(struct snd_compr_stream *cstream) in soc_compr_open_fe() argument
127 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_open_fe()
129 fe->pcm->streams[cstream->direction].substream; in soc_compr_open_fe()
137 if (cstream->direction == SND_COMPRESS_PLAYBACK) in soc_compr_open_fe()
169 ret = cpu_dai->driver->cops->startup(cstream, cpu_dai); in soc_compr_open_fe()
178 ret = soc_compr_components_open(cstream, &component); in soc_compr_open_fe()
183 ret = fe->dai_link->compr_ops->startup(cstream); in soc_compr_open_fe()
204 soc_compr_components_free(cstream, component); in soc_compr_open_fe()
207 cpu_dai->driver->cops->shutdown(cstream, cpu_dai); in soc_compr_open_fe()
245 static int soc_compr_free(struct snd_compr_stream *cstream) in soc_compr_free() argument
247 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_free()
254 if (cstream->direction == SND_COMPRESS_PLAYBACK) in soc_compr_free()
261 snd_soc_dai_digital_mute(codec_dai, 1, cstream->direction); in soc_compr_free()
270 rtd->dai_link->compr_ops->shutdown(cstream); in soc_compr_free()
272 soc_compr_components_free(cstream, NULL); in soc_compr_free()
275 cpu_dai->driver->cops->shutdown(cstream, cpu_dai); in soc_compr_free()
277 if (cstream->direction == SND_COMPRESS_PLAYBACK) { in soc_compr_free()
299 static int soc_compr_free_fe(struct snd_compr_stream *cstream) in soc_compr_free_fe() argument
301 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_free_fe()
308 if (cstream->direction == SND_COMPRESS_PLAYBACK) in soc_compr_free_fe()
337 fe->dai_link->compr_ops->shutdown(cstream); in soc_compr_free_fe()
339 soc_compr_components_free(cstream, NULL); in soc_compr_free_fe()
342 cpu_dai->driver->cops->shutdown(cstream, cpu_dai); in soc_compr_free_fe()
348 static int soc_compr_components_trigger(struct snd_compr_stream *cstream, in soc_compr_components_trigger() argument
351 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_components_trigger()
363 ret = component->driver->compr_ops->trigger(cstream, cmd); in soc_compr_components_trigger()
371 static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd) in soc_compr_trigger() argument
373 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_trigger()
380 ret = soc_compr_components_trigger(cstream, cmd); in soc_compr_trigger()
385 cpu_dai->driver->cops->trigger(cstream, cmd, cpu_dai); in soc_compr_trigger()
389 snd_soc_dai_digital_mute(codec_dai, 0, cstream->direction); in soc_compr_trigger()
392 snd_soc_dai_digital_mute(codec_dai, 1, cstream->direction); in soc_compr_trigger()
401 static int soc_compr_trigger_fe(struct snd_compr_stream *cstream, int cmd) in soc_compr_trigger_fe() argument
403 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_trigger_fe()
409 return soc_compr_components_trigger(cstream, cmd); in soc_compr_trigger_fe()
411 if (cstream->direction == SND_COMPRESS_PLAYBACK) in soc_compr_trigger_fe()
419 ret = cpu_dai->driver->cops->trigger(cstream, cmd, cpu_dai); in soc_compr_trigger_fe()
424 ret = soc_compr_components_trigger(cstream, cmd); in soc_compr_trigger_fe()
453 static int soc_compr_components_set_params(struct snd_compr_stream *cstream, in soc_compr_components_set_params() argument
456 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_components_set_params()
468 ret = component->driver->compr_ops->set_params(cstream, params); in soc_compr_components_set_params()
476 static int soc_compr_set_params(struct snd_compr_stream *cstream, in soc_compr_set_params() argument
479 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_set_params()
493 ret = cpu_dai->driver->cops->set_params(cstream, params, cpu_dai); in soc_compr_set_params()
498 ret = soc_compr_components_set_params(cstream, params); in soc_compr_set_params()
503 ret = rtd->dai_link->compr_ops->set_params(cstream); in soc_compr_set_params()
508 if (cstream->direction == SND_COMPRESS_PLAYBACK) in soc_compr_set_params()
528 static int soc_compr_set_params_fe(struct snd_compr_stream *cstream, in soc_compr_set_params_fe() argument
531 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_set_params_fe()
533 fe->pcm->streams[cstream->direction].substream; in soc_compr_set_params_fe()
537 if (cstream->direction == SND_COMPRESS_PLAYBACK) in soc_compr_set_params_fe()
563 ret = cpu_dai->driver->cops->set_params(cstream, params, cpu_dai); in soc_compr_set_params_fe()
568 ret = soc_compr_components_set_params(cstream, params); in soc_compr_set_params_fe()
573 ret = fe->dai_link->compr_ops->set_params(cstream); in soc_compr_set_params_fe()
587 static int soc_compr_get_params(struct snd_compr_stream *cstream, in soc_compr_get_params() argument
590 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_get_params()
599 ret = cpu_dai->driver->cops->get_params(cstream, params, cpu_dai); in soc_compr_get_params()
611 ret = component->driver->compr_ops->get_params(cstream, params); in soc_compr_get_params()
620 static int soc_compr_get_caps(struct snd_compr_stream *cstream, in soc_compr_get_caps() argument
623 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_get_caps()
637 ret = component->driver->compr_ops->get_caps(cstream, caps); in soc_compr_get_caps()
645 static int soc_compr_get_codec_caps(struct snd_compr_stream *cstream, in soc_compr_get_codec_caps() argument
648 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_get_codec_caps()
662 ret = component->driver->compr_ops->get_codec_caps(cstream, in soc_compr_get_codec_caps()
671 static int soc_compr_ack(struct snd_compr_stream *cstream, size_t bytes) in soc_compr_ack() argument
673 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_ack()
682 ret = cpu_dai->driver->cops->ack(cstream, bytes, cpu_dai); in soc_compr_ack()
694 ret = component->driver->compr_ops->ack(cstream, bytes); in soc_compr_ack()
704 static int soc_compr_pointer(struct snd_compr_stream *cstream, in soc_compr_pointer() argument
707 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_pointer()
716 cpu_dai->driver->cops->pointer(cstream, tstamp, cpu_dai); in soc_compr_pointer()
725 ret = component->driver->compr_ops->pointer(cstream, tstamp); in soc_compr_pointer()
733 static int soc_compr_copy(struct snd_compr_stream *cstream, in soc_compr_copy() argument
736 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_copy()
750 ret = component->driver->compr_ops->copy(cstream, buf, count); in soc_compr_copy()
758 static int soc_compr_set_metadata(struct snd_compr_stream *cstream, in soc_compr_set_metadata() argument
761 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_set_metadata()
768 ret = cpu_dai->driver->cops->set_metadata(cstream, metadata, cpu_dai); in soc_compr_set_metadata()
780 ret = component->driver->compr_ops->set_metadata(cstream, in soc_compr_set_metadata()
789 static int soc_compr_get_metadata(struct snd_compr_stream *cstream, in soc_compr_get_metadata() argument
792 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_get_metadata()
799 ret = cpu_dai->driver->cops->get_metadata(cstream, metadata, cpu_dai); in soc_compr_get_metadata()
811 return component->driver->compr_ops->get_metadata(cstream, in soc_compr_get_metadata()