Lines Matching refs:stream
86 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in catpt_get_stream_template()
90 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in catpt_get_stream_template()
118 struct catpt_stream_runtime *stream) in catpt_stream_read_position() argument
122 memcpy_fromio(&pos, cdev->lpe_ba + stream->info.read_pos_regaddr, in catpt_stream_read_position()
128 struct catpt_stream_runtime *stream, u32 channel) in catpt_stream_volume() argument
135 offset = stream->info.volume_regaddr[channel]; in catpt_stream_volume()
264 struct catpt_stream_runtime *stream; in catpt_dai_startup() local
270 stream = kzalloc(sizeof(*stream), GFP_KERNEL); in catpt_dai_startup()
271 if (!stream) in catpt_dai_startup()
275 &stream->pgtbl); in catpt_dai_startup()
287 stream->template = template; in catpt_dai_startup()
288 stream->persistent = res; in catpt_dai_startup()
289 stream->substream = substream; in catpt_dai_startup()
290 INIT_LIST_HEAD(&stream->node); in catpt_dai_startup()
291 snd_soc_dai_set_dma_data(dai, substream, stream); in catpt_dai_startup()
294 list_add_tail(&stream->node, &cdev->stream_list); in catpt_dai_startup()
300 snd_dma_free_pages(&stream->pgtbl); in catpt_dai_startup()
302 kfree(stream); in catpt_dai_startup()
310 struct catpt_stream_runtime *stream; in catpt_dai_shutdown() local
312 stream = snd_soc_dai_get_dma_data(dai, substream); in catpt_dai_shutdown()
315 list_del(&stream->node); in catpt_dai_shutdown()
318 release_resource(stream->persistent); in catpt_dai_shutdown()
319 kfree(stream->persistent); in catpt_dai_shutdown()
322 snd_dma_free_pages(&stream->pgtbl); in catpt_dai_shutdown()
323 kfree(stream); in catpt_dai_shutdown()
330 struct catpt_stream_runtime *stream) in catpt_dai_apply_usettings() argument
337 u32 id = stream->info.stream_hw_id; in catpt_dai_apply_usettings()
365 if (stream->template->type != CATPT_STRM_TYPE_LOOPBACK) in catpt_dai_apply_usettings()
378 struct catpt_stream_runtime *stream; in catpt_dai_hw_params() local
385 stream = snd_soc_dai_get_dma_data(dai, substream); in catpt_dai_hw_params()
386 if (stream->allocated) in catpt_dai_hw_params()
399 catpt_arrange_page_table(substream, &stream->pgtbl); in catpt_dai_hw_params()
402 rinfo.page_table_addr = stream->pgtbl.addr; in catpt_dai_hw_params()
408 ret = catpt_ipc_alloc_stream(cdev, stream->template->path_id, in catpt_dai_hw_params()
409 stream->template->type, in catpt_dai_hw_params()
411 stream->template->num_entries, in catpt_dai_hw_params()
412 stream->template->entries, in catpt_dai_hw_params()
413 stream->persistent, in catpt_dai_hw_params()
415 &stream->info); in catpt_dai_hw_params()
419 ret = catpt_dai_apply_usettings(dai, stream); in catpt_dai_hw_params()
423 stream->allocated = true; in catpt_dai_hw_params()
431 struct catpt_stream_runtime *stream; in catpt_dai_hw_free() local
433 stream = snd_soc_dai_get_dma_data(dai, substream); in catpt_dai_hw_free()
434 if (!stream->allocated) in catpt_dai_hw_free()
437 catpt_ipc_reset_stream(cdev, stream->info.stream_hw_id); in catpt_dai_hw_free()
438 catpt_ipc_free_stream(cdev, stream->info.stream_hw_id); in catpt_dai_hw_free()
440 stream->allocated = false; in catpt_dai_hw_free()
448 struct catpt_stream_runtime *stream; in catpt_dai_prepare() local
451 stream = snd_soc_dai_get_dma_data(dai, substream); in catpt_dai_prepare()
452 if (stream->prepared) in catpt_dai_prepare()
455 ret = catpt_ipc_reset_stream(cdev, stream->info.stream_hw_id); in catpt_dai_prepare()
459 ret = catpt_ipc_pause_stream(cdev, stream->info.stream_hw_id); in catpt_dai_prepare()
463 stream->prepared = true; in catpt_dai_prepare()
471 struct catpt_stream_runtime *stream; in catpt_dai_trigger() local
476 stream = snd_soc_dai_get_dma_data(dai, substream); in catpt_dai_trigger()
481 if (stream->template->type != CATPT_STRM_TYPE_RENDER) in catpt_dai_trigger()
489 ret = catpt_ipc_set_write_pos(cdev, stream->info.stream_hw_id, in catpt_dai_trigger()
498 ret = catpt_ipc_resume_stream(cdev, stream->info.stream_hw_id); in catpt_dai_trigger()
504 stream->prepared = false; in catpt_dai_trigger()
508 ret = catpt_ipc_pause_stream(cdev, stream->info.stream_hw_id); in catpt_dai_trigger()
522 struct catpt_stream_runtime *stream, in catpt_stream_update_position() argument
525 struct snd_pcm_substream *substream = stream->substream; in catpt_stream_update_position()
532 if (!stream->prepared) in catpt_stream_update_position()
535 if (stream->template->type != CATPT_STRM_TYPE_RENDER) in catpt_stream_update_position()
546 ret = catpt_ipc_set_write_pos(cdev, stream->info.stream_hw_id, in catpt_stream_update_position()
551 stream->info.stream_hw_id, ret); in catpt_stream_update_position()
609 struct catpt_stream_runtime *stream; in catpt_component_pointer() local
617 stream = snd_soc_dai_get_dma_data(cpu_dai, substream); in catpt_component_pointer()
618 pos = catpt_stream_read_position(cdev, stream); in catpt_component_pointer()
898 struct catpt_stream_runtime *stream; in catpt_stream_volume_get() local
903 stream = catpt_stream_find(cdev, pin_id); in catpt_stream_volume_get()
904 if (!stream) { in catpt_stream_volume_get()
913 dspvol = catpt_stream_volume(cdev, stream, i); in catpt_stream_volume_get()
930 struct catpt_stream_runtime *stream; in catpt_stream_volume_put() local
934 stream = catpt_stream_find(cdev, pin_id); in catpt_stream_volume_put()
935 if (!stream) { in catpt_stream_volume_put()
943 ret = catpt_set_dspvol(cdev, stream->info.stream_hw_id, in catpt_stream_volume_put()
1006 struct catpt_stream_runtime *stream; in catpt_loopback_switch_put() local
1011 stream = catpt_stream_find(cdev, CATPT_PIN_ID_REFERENCE); in catpt_loopback_switch_put()
1012 if (!stream) { in catpt_loopback_switch_put()
1019 ret = catpt_ipc_mute_loopback(cdev, stream->info.stream_hw_id, mute); in catpt_loopback_switch_put()