Lines Matching refs:substream

25 			     struct snd_pcm_substream *substream,  in create_page_table()  argument
28 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in create_page_table()
30 struct snd_dma_buffer *dmab = snd_pcm_get_dma_buf(substream); in create_page_table()
31 int stream = substream->stream; in create_page_table()
50 snd_pcm_period_elapsed(sps->substream); in snd_sof_pcm_period_elapsed_work()
61 void snd_sof_pcm_period_elapsed(struct snd_pcm_substream *substream) in snd_sof_pcm_period_elapsed() argument
63 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in snd_sof_pcm_period_elapsed()
83 schedule_work(&spcm->stream[substream->stream].period_elapsed_work); in snd_sof_pcm_period_elapsed()
123 struct snd_pcm_substream *substream, in sof_pcm_hw_params() argument
127 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in sof_pcm_hw_params()
130 struct snd_pcm_runtime *runtime = substream->runtime; in sof_pcm_hw_params()
146 if (pcm_ops->hw_free && spcm->prepared[substream->stream]) { in sof_pcm_hw_params()
147 ret = pcm_ops->hw_free(component, substream); in sof_pcm_hw_params()
151 spcm->prepared[substream->stream] = false; in sof_pcm_hw_params()
155 spcm->pcm.pcm_id, substream->stream); in sof_pcm_hw_params()
157 ret = snd_sof_pcm_platform_hw_params(sdev, substream, params, &platform_params); in sof_pcm_hw_params()
164 if (!spcm->stream[substream->stream].list) { in sof_pcm_hw_params()
166 substream->stream); in sof_pcm_hw_params()
173 ret = create_page_table(component, substream, runtime->dma_area, in sof_pcm_hw_params()
181 ret = pcm_ops->hw_params(component, substream, params, &platform_params); in sof_pcm_hw_params()
186 spcm->prepared[substream->stream] = true; in sof_pcm_hw_params()
189 memcpy(&spcm->params[substream->stream], params, sizeof(*params)); in sof_pcm_hw_params()
195 struct snd_pcm_substream *substream) in sof_pcm_hw_free() argument
197 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in sof_pcm_hw_free()
212 spcm->pcm.pcm_id, substream->stream); in sof_pcm_hw_free()
215 if (pcm_ops->hw_free && spcm->prepared[substream->stream]) { in sof_pcm_hw_free()
216 ret = pcm_ops->hw_free(component, substream); in sof_pcm_hw_free()
220 spcm->prepared[substream->stream] = false; in sof_pcm_hw_free()
224 ret = snd_sof_pcm_platform_hw_free(sdev, substream); in sof_pcm_hw_free()
231 ret = sof_widget_list_free(sdev, spcm, substream->stream); in sof_pcm_hw_free()
235 cancel_work_sync(&spcm->stream[substream->stream].period_elapsed_work); in sof_pcm_hw_free()
241 struct snd_pcm_substream *substream) in sof_pcm_prepare() argument
243 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in sof_pcm_prepare()
255 if (spcm->prepared[substream->stream]) in sof_pcm_prepare()
259 spcm->pcm.pcm_id, substream->stream); in sof_pcm_prepare()
263 substream, &spcm->params[substream->stream]); in sof_pcm_prepare()
278 struct snd_pcm_substream *substream, int cmd) in sof_pcm_trigger() argument
280 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in sof_pcm_trigger()
298 spcm->pcm.pcm_id, substream->stream, cmd); in sof_pcm_trigger()
307 if (spcm->stream[substream->stream].suspend_ignored) { in sof_pcm_trigger()
313 spcm->stream[substream->stream].suspend_ignored = false; in sof_pcm_trigger()
319 spcm->stream[substream->stream].d0i3_compatible) { in sof_pcm_trigger()
326 spcm->stream[substream->stream].suspend_ignored = true; in sof_pcm_trigger()
345 snd_sof_pcm_platform_trigger(sdev, substream, cmd); in sof_pcm_trigger()
348 ret = pcm_ops->trigger(component, substream, cmd); in sof_pcm_trigger()
352 snd_sof_pcm_platform_trigger(sdev, substream, cmd); in sof_pcm_trigger()
356 ret = sof_pcm_stream_free(sdev, substream, spcm, substream->stream, in sof_pcm_trigger()
363 struct snd_pcm_substream *substream) in sof_pcm_pointer() argument
365 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in sof_pcm_pointer()
376 return sof_ops(sdev)->pcm_pointer(sdev, substream); in sof_pcm_pointer()
383 host = bytes_to_frames(substream->runtime, in sof_pcm_pointer()
384 spcm->stream[substream->stream].posn.host_posn); in sof_pcm_pointer()
385 dai = bytes_to_frames(substream->runtime, in sof_pcm_pointer()
386 spcm->stream[substream->stream].posn.dai_posn); in sof_pcm_pointer()
388 trace_sof_pcm_pointer_position(sdev, spcm, substream, host, dai); in sof_pcm_pointer()
394 struct snd_pcm_substream *substream) in sof_pcm_open() argument
396 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in sof_pcm_open()
397 struct snd_pcm_runtime *runtime = substream->runtime; in sof_pcm_open()
413 spcm->pcm.pcm_id, substream->stream); in sof_pcm_open()
416 caps = &spcm->pcm.caps[substream->stream]; in sof_pcm_open()
444 substream->wait_time = 500; in sof_pcm_open()
446 spcm->stream[substream->stream].posn.host_posn = 0; in sof_pcm_open()
447 spcm->stream[substream->stream].posn.dai_posn = 0; in sof_pcm_open()
448 spcm->stream[substream->stream].substream = substream; in sof_pcm_open()
449 spcm->prepared[substream->stream] = false; in sof_pcm_open()
451 ret = snd_sof_pcm_platform_open(sdev, substream); in sof_pcm_open()
459 struct snd_pcm_substream *substream) in sof_pcm_close() argument
461 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in sof_pcm_close()
475 spcm->pcm.pcm_id, substream->stream); in sof_pcm_close()
477 err = snd_sof_pcm_platform_close(sdev, substream); in sof_pcm_close()
525 if (!pcm->streams[stream].substream) { in sof_pcm_new()
530 snd_pcm_set_managed_buffer(pcm->streams[stream].substream, in sof_pcm_new()
547 if (!pcm->streams[stream].substream) { in sof_pcm_new()
552 snd_pcm_set_managed_buffer(pcm->streams[stream].substream, in sof_pcm_new()
645 struct snd_pcm_substream *substream) in sof_pcm_ack() argument
649 return snd_sof_pcm_platform_ack(sdev, substream); in sof_pcm_ack()