Lines Matching refs:cstream

37 	snd_compr_fragment_elapsed(sps->cstream);  in snd_sof_compr_fragment_elapsed_work()
48 void snd_sof_compr_fragment_elapsed(struct snd_compr_stream *cstream) in snd_sof_compr_fragment_elapsed() argument
56 if (!cstream) in snd_sof_compr_fragment_elapsed()
59 rtd = cstream->private_data; in snd_sof_compr_fragment_elapsed()
60 crtd = cstream->runtime; in snd_sof_compr_fragment_elapsed()
71 sof_set_transferred_bytes(sstream, spcm->stream[cstream->direction].posn.host_posn, in snd_sof_compr_fragment_elapsed()
75 schedule_work(&spcm->stream[cstream->direction].period_elapsed_work); in snd_sof_compr_fragment_elapsed()
79 struct snd_compr_stream *cstream, in create_page_table() argument
82 struct snd_dma_buffer *dmab = cstream->runtime->dma_buffer_p; in create_page_table()
83 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in create_page_table()
84 int dir = cstream->direction; in create_page_table()
96 struct snd_compr_stream *cstream) in sof_compr_open() argument
98 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_open()
99 struct snd_compr_runtime *crtd = cstream->runtime; in sof_compr_open()
114 dir = cstream->direction; in sof_compr_open()
116 if (spcm->stream[dir].cstream) { in sof_compr_open()
121 spcm->stream[dir].cstream = cstream; in sof_compr_open()
132 struct snd_compr_stream *cstream) in sof_compr_free() argument
135 struct sof_compr_stream *sstream = cstream->runtime->private_data; in sof_compr_free()
136 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_free()
148 stream.comp_id = spcm->stream[cstream->direction].comp_id; in sof_compr_free()
150 if (spcm->prepared[cstream->direction]) { in sof_compr_free()
154 spcm->prepared[cstream->direction] = false; in sof_compr_free()
157 cancel_work_sync(&spcm->stream[cstream->direction].period_elapsed_work); in sof_compr_free()
158 spcm->stream[cstream->direction].cstream = NULL; in sof_compr_free()
165 struct snd_compr_stream *cstream, struct snd_compr_params *params) in sof_compr_set_params() argument
168 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_set_params()
169 struct snd_compr_runtime *crtd = cstream->runtime; in sof_compr_set_params()
204 cstream->dma_buffer.dev.type = SNDRV_DMA_TYPE_DEV_SG; in sof_compr_set_params()
205 cstream->dma_buffer.dev.dev = sdev->dev; in sof_compr_set_params()
206 ret = snd_compr_malloc_pages(cstream, crtd->buffer_size); in sof_compr_set_params()
210 ret = create_page_table(component, cstream, crtd->dma_area, crtd->dma_bytes); in sof_compr_set_params()
218 pcm->comp_id = spcm->stream[cstream->direction].comp_id; in sof_compr_set_params()
220 pcm->params.buffer.phy_addr = spcm->stream[cstream->direction].page_table.addr; in sof_compr_set_params()
222 pcm->params.direction = cstream->direction; in sof_compr_set_params()
241 ret = snd_sof_set_stream_data_offset(sdev, &spcm->stream[cstream->direction], in sof_compr_set_params()
253 spcm->prepared[cstream->direction] = true; in sof_compr_set_params()
262 struct snd_compr_stream *cstream, struct snd_codec *params) in sof_compr_get_params() argument
271 struct snd_compr_stream *cstream, int cmd) in sof_compr_trigger() argument
274 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_trigger()
285 stream.comp_id = spcm->stream[cstream->direction].comp_id; in sof_compr_trigger()
352 struct snd_compr_stream *cstream, in sof_compr_copy() argument
355 struct snd_compr_runtime *rtd = cstream->runtime; in sof_compr_copy()
360 if (cstream->direction == SND_COMPRESS_PLAYBACK) in sof_compr_copy()
367 struct snd_compr_stream *cstream, in sof_compr_pointer() argument
371 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_pointer()
372 struct sof_compr_stream *sstream = cstream->runtime->private_data; in sof_compr_pointer()
380 tstamp->pcm_io_frames = div_u64(spcm->stream[cstream->direction].posn.dai_posn, in sof_compr_pointer()