Lines Matching refs:cstream

36 	snd_compr_fragment_elapsed(sps->cstream);  in snd_sof_compr_fragment_elapsed_work()
47 void snd_sof_compr_fragment_elapsed(struct snd_compr_stream *cstream) in snd_sof_compr_fragment_elapsed() argument
55 if (!cstream) in snd_sof_compr_fragment_elapsed()
58 rtd = cstream->private_data; in snd_sof_compr_fragment_elapsed()
59 crtd = cstream->runtime; in snd_sof_compr_fragment_elapsed()
70 sof_set_transferred_bytes(sstream, spcm->stream[cstream->direction].posn.host_posn, in snd_sof_compr_fragment_elapsed()
74 schedule_work(&spcm->stream[cstream->direction].period_elapsed_work); in snd_sof_compr_fragment_elapsed()
78 struct snd_compr_stream *cstream, in create_page_table() argument
81 struct snd_dma_buffer *dmab = cstream->runtime->dma_buffer_p; in create_page_table()
82 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in create_page_table()
83 int dir = cstream->direction; in create_page_table()
95 struct snd_compr_stream *cstream) in sof_compr_open() argument
97 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_open()
98 struct snd_compr_runtime *crtd = cstream->runtime; in sof_compr_open()
113 dir = cstream->direction; in sof_compr_open()
115 if (spcm->stream[dir].cstream) { in sof_compr_open()
120 spcm->stream[dir].cstream = cstream; in sof_compr_open()
131 struct snd_compr_stream *cstream) in sof_compr_free() argument
134 struct sof_compr_stream *sstream = cstream->runtime->private_data; in sof_compr_free()
135 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_free()
147 stream.comp_id = spcm->stream[cstream->direction].comp_id; in sof_compr_free()
149 if (spcm->prepared[cstream->direction]) { in sof_compr_free()
153 spcm->prepared[cstream->direction] = false; in sof_compr_free()
156 cancel_work_sync(&spcm->stream[cstream->direction].period_elapsed_work); in sof_compr_free()
157 spcm->stream[cstream->direction].cstream = NULL; in sof_compr_free()
164 struct snd_compr_stream *cstream, struct snd_compr_params *params) in sof_compr_set_params() argument
167 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_set_params()
168 struct snd_compr_runtime *crtd = cstream->runtime; in sof_compr_set_params()
203 cstream->dma_buffer.dev.type = SNDRV_DMA_TYPE_DEV_SG; in sof_compr_set_params()
204 cstream->dma_buffer.dev.dev = sdev->dev; in sof_compr_set_params()
205 ret = snd_compr_malloc_pages(cstream, crtd->buffer_size); in sof_compr_set_params()
209 ret = create_page_table(component, cstream, crtd->dma_area, crtd->dma_bytes); in sof_compr_set_params()
217 pcm->comp_id = spcm->stream[cstream->direction].comp_id; in sof_compr_set_params()
219 pcm->params.buffer.phy_addr = spcm->stream[cstream->direction].page_table.addr; in sof_compr_set_params()
221 pcm->params.direction = cstream->direction; in sof_compr_set_params()
244 spcm->prepared[cstream->direction] = true; in sof_compr_set_params()
253 struct snd_compr_stream *cstream, struct snd_codec *params) in sof_compr_get_params() argument
262 struct snd_compr_stream *cstream, int cmd) in sof_compr_trigger() argument
265 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_trigger()
276 stream.comp_id = spcm->stream[cstream->direction].comp_id; in sof_compr_trigger()
343 struct snd_compr_stream *cstream, in sof_compr_copy() argument
346 struct snd_compr_runtime *rtd = cstream->runtime; in sof_compr_copy()
351 if (cstream->direction == SND_COMPRESS_PLAYBACK) in sof_compr_copy()
358 struct snd_compr_stream *cstream, in sof_compr_pointer() argument
362 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_pointer()
363 struct sof_compr_stream *sstream = cstream->runtime->private_data; in sof_compr_pointer()
371 tstamp->pcm_io_frames = div_u64(spcm->stream[cstream->direction].posn.dai_posn, in sof_compr_pointer()