Lines Matching refs:cstream

25 static int snd_soc_compr_components_open(struct snd_compr_stream *cstream)  in snd_soc_compr_components_open()  argument
27 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in snd_soc_compr_components_open()
33 ret = snd_soc_component_module_get_when_open(component, cstream); in snd_soc_compr_components_open()
37 ret = snd_soc_component_compr_open(component, cstream); in snd_soc_compr_components_open()
45 static void snd_soc_compr_components_free(struct snd_compr_stream *cstream, in snd_soc_compr_components_free() argument
48 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in snd_soc_compr_components_free()
53 snd_soc_component_compr_free(component, cstream, rollback); in snd_soc_compr_components_free()
54 snd_soc_component_module_put_when_close(component, cstream, rollback); in snd_soc_compr_components_free()
58 static int soc_compr_clean(struct snd_compr_stream *cstream, int rollback) in soc_compr_clean() argument
60 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_clean()
63 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ in soc_compr_clean()
78 snd_soc_link_compr_shutdown(cstream, rollback); in soc_compr_clean()
80 snd_soc_compr_components_free(cstream, rollback); in soc_compr_clean()
82 snd_soc_dai_compr_shutdown(cpu_dai, cstream, rollback); in soc_compr_clean()
89 snd_soc_pcm_component_pm_runtime_put(rtd, cstream, rollback); in soc_compr_clean()
94 static int soc_compr_free(struct snd_compr_stream *cstream) in soc_compr_free() argument
96 return soc_compr_clean(cstream, 0); in soc_compr_free()
99 static int soc_compr_open(struct snd_compr_stream *cstream) in soc_compr_open() argument
101 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_open()
103 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ in soc_compr_open()
106 ret = snd_soc_pcm_component_pm_runtime_get(rtd, cstream); in soc_compr_open()
112 ret = snd_soc_dai_compr_startup(cpu_dai, cstream); in soc_compr_open()
116 ret = snd_soc_compr_components_open(cstream); in soc_compr_open()
120 ret = snd_soc_link_compr_startup(cstream); in soc_compr_open()
129 soc_compr_clean(cstream, 1); in soc_compr_open()
134 static int soc_compr_open_fe(struct snd_compr_stream *cstream) in soc_compr_open_fe() argument
136 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_open_fe()
138 fe->pcm->streams[cstream->direction].substream; in soc_compr_open_fe()
142 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ in soc_compr_open_fe()
171 ret = snd_soc_dai_compr_startup(cpu_dai, cstream); in soc_compr_open_fe()
175 ret = snd_soc_compr_components_open(cstream); in soc_compr_open_fe()
179 ret = snd_soc_link_compr_startup(cstream); in soc_compr_open_fe()
197 snd_soc_compr_components_free(cstream, 1); in soc_compr_open_fe()
199 snd_soc_dai_compr_shutdown(cpu_dai, cstream, 1); in soc_compr_open_fe()
208 static int soc_compr_free_fe(struct snd_compr_stream *cstream) in soc_compr_free_fe() argument
210 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_free_fe()
213 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ in soc_compr_free_fe()
241 snd_soc_link_compr_shutdown(cstream, 0); in soc_compr_free_fe()
243 snd_soc_compr_components_free(cstream, 0); in soc_compr_free_fe()
245 snd_soc_dai_compr_shutdown(cpu_dai, cstream, 0); in soc_compr_free_fe()
251 static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd) in soc_compr_trigger() argument
253 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_trigger()
256 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ in soc_compr_trigger()
261 ret = snd_soc_component_compr_trigger(cstream, cmd); in soc_compr_trigger()
265 ret = snd_soc_dai_compr_trigger(cpu_dai, cstream, cmd); in soc_compr_trigger()
283 static int soc_compr_trigger_fe(struct snd_compr_stream *cstream, int cmd) in soc_compr_trigger_fe() argument
285 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_trigger_fe()
287 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ in soc_compr_trigger_fe()
292 return snd_soc_component_compr_trigger(cstream, cmd); in soc_compr_trigger_fe()
296 ret = snd_soc_dai_compr_trigger(cpu_dai, cstream, cmd); in soc_compr_trigger_fe()
300 ret = snd_soc_component_compr_trigger(cstream, cmd); in soc_compr_trigger_fe()
329 static int soc_compr_set_params(struct snd_compr_stream *cstream, in soc_compr_set_params() argument
332 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_set_params()
334 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ in soc_compr_set_params()
346 ret = snd_soc_dai_compr_set_params(cpu_dai, cstream, params); in soc_compr_set_params()
350 ret = snd_soc_component_compr_set_params(cstream, params); in soc_compr_set_params()
354 ret = snd_soc_link_compr_set_params(cstream); in soc_compr_set_params()
373 static int soc_compr_set_params_fe(struct snd_compr_stream *cstream, in soc_compr_set_params_fe() argument
376 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_set_params_fe()
378 fe->pcm->streams[cstream->direction].substream; in soc_compr_set_params_fe()
380 int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ in soc_compr_set_params_fe()
403 ret = snd_soc_dai_compr_set_params(cpu_dai, cstream, params); in soc_compr_set_params_fe()
407 ret = snd_soc_component_compr_set_params(cstream, params); in soc_compr_set_params_fe()
411 ret = snd_soc_link_compr_set_params(cstream); in soc_compr_set_params_fe()
425 static int soc_compr_get_params(struct snd_compr_stream *cstream, in soc_compr_get_params() argument
428 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_get_params()
434 ret = snd_soc_dai_compr_get_params(cpu_dai, cstream, params); in soc_compr_get_params()
438 ret = snd_soc_component_compr_get_params(cstream, params); in soc_compr_get_params()
444 static int soc_compr_ack(struct snd_compr_stream *cstream, size_t bytes) in soc_compr_ack() argument
446 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_ack()
452 ret = snd_soc_dai_compr_ack(cpu_dai, cstream, bytes); in soc_compr_ack()
456 ret = snd_soc_component_compr_ack(cstream, bytes); in soc_compr_ack()
462 static int soc_compr_pointer(struct snd_compr_stream *cstream, in soc_compr_pointer() argument
465 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_pointer()
471 ret = snd_soc_dai_compr_pointer(cpu_dai, cstream, tstamp); in soc_compr_pointer()
475 ret = snd_soc_component_compr_pointer(cstream, tstamp); in soc_compr_pointer()
481 static int soc_compr_set_metadata(struct snd_compr_stream *cstream, in soc_compr_set_metadata() argument
484 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_set_metadata()
488 ret = snd_soc_dai_compr_set_metadata(cpu_dai, cstream, metadata); in soc_compr_set_metadata()
492 return snd_soc_component_compr_set_metadata(cstream, metadata); in soc_compr_set_metadata()
495 static int soc_compr_get_metadata(struct snd_compr_stream *cstream, in soc_compr_get_metadata() argument
498 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in soc_compr_get_metadata()
502 ret = snd_soc_dai_compr_get_metadata(cpu_dai, cstream, metadata); in soc_compr_get_metadata()
506 return snd_soc_component_compr_get_metadata(cstream, metadata); in soc_compr_get_metadata()