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()
147 stream.comp_id = spcm->stream[cstream->direction].comp_id; in sof_compr_free()
149 if (spcm->prepared[cstream->direction]) { in sof_compr_free()
152 spcm->prepared[cstream->direction] = false; in sof_compr_free()
155 cancel_work_sync(&spcm->stream[cstream->direction].period_elapsed_work); in sof_compr_free()
156 spcm->stream[cstream->direction].cstream = NULL; in sof_compr_free()
163 struct snd_compr_stream *cstream, struct snd_compr_params *params) in sof_compr_set_params() argument
166 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_set_params()
167 struct snd_compr_runtime *crtd = cstream->runtime; in sof_compr_set_params()
210 cstream->dma_buffer.dev.type = SNDRV_DMA_TYPE_DEV_SG; in sof_compr_set_params()
211 cstream->dma_buffer.dev.dev = sdev->dev; in sof_compr_set_params()
212 ret = snd_compr_malloc_pages(cstream, crtd->buffer_size); in sof_compr_set_params()
216 ret = create_page_table(component, cstream, crtd->dma_area, crtd->dma_bytes); in sof_compr_set_params()
224 pcm->comp_id = spcm->stream[cstream->direction].comp_id; in sof_compr_set_params()
226 pcm->params.buffer.phy_addr = spcm->stream[cstream->direction].page_table.addr; in sof_compr_set_params()
228 pcm->params.direction = cstream->direction; in sof_compr_set_params()
247 ret = snd_sof_set_stream_data_offset(sdev, &spcm->stream[cstream->direction], in sof_compr_set_params()
259 spcm->prepared[cstream->direction] = true; in sof_compr_set_params()
268 struct snd_compr_stream *cstream, struct snd_codec *params) in sof_compr_get_params() argument
277 struct snd_compr_stream *cstream, int cmd) in sof_compr_trigger() argument
280 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_trigger()
290 stream.comp_id = spcm->stream[cstream->direction].comp_id; in sof_compr_trigger()
356 struct snd_compr_stream *cstream, in sof_compr_copy() argument
359 struct snd_compr_runtime *rtd = cstream->runtime; in sof_compr_copy()
364 if (cstream->direction == SND_COMPRESS_PLAYBACK) in sof_compr_copy()
371 struct snd_compr_stream *cstream, in sof_compr_pointer() argument
375 struct snd_soc_pcm_runtime *rtd = cstream->private_data; in sof_compr_pointer()
376 struct sof_compr_stream *sstream = cstream->runtime->private_data; in sof_compr_pointer()
384 tstamp->pcm_io_frames = div_u64(spcm->stream[cstream->direction].posn.dai_posn, in sof_compr_pointer()