Lines Matching refs:siu_stream
53 struct siu_stream *siu_stream = &port_info->playback; in siu_pcm_stmwrite_stop() local
56 if (!siu_stream->rw_flg) in siu_pcm_stmwrite_stop()
66 siu_stream->rw_flg = 0; in siu_pcm_stmwrite_stop()
73 struct siu_stream *siu_stream = &port_info->playback; in siu_pcm_stmwrite_start() local
75 if (siu_stream->rw_flg) in siu_pcm_stmwrite_start()
82 siu_stream->rw_flg = RWF_STM_WT; in siu_pcm_stmwrite_start()
85 tasklet_schedule(&siu_stream->tasklet); in siu_pcm_stmwrite_start()
92 struct siu_stream *siu_stream = arg; in siu_dma_tx_complete() local
94 if (!siu_stream->rw_flg) in siu_dma_tx_complete()
98 if (++siu_stream->cur_period >= in siu_dma_tx_complete()
99 GET_MAX_PERIODS(siu_stream->buf_bytes, in siu_dma_tx_complete()
100 siu_stream->period_bytes)) in siu_dma_tx_complete()
101 siu_stream->cur_period = 0; in siu_dma_tx_complete()
104 __func__, siu_stream->cur_period, in siu_dma_tx_complete()
105 siu_stream->cur_period * siu_stream->period_bytes, in siu_dma_tx_complete()
106 siu_stream->buf_bytes, siu_stream->cookie); in siu_dma_tx_complete()
108 tasklet_schedule(&siu_stream->tasklet); in siu_dma_tx_complete()
111 snd_pcm_period_elapsed(siu_stream->substream); in siu_dma_tx_complete()
119 struct siu_stream *siu_stream = &port_info->playback; in siu_pcm_wr_set() local
120 struct snd_pcm_substream *substream = siu_stream->substream; in siu_pcm_wr_set()
133 desc = dmaengine_prep_slave_sg(siu_stream->chan, in siu_pcm_wr_set()
141 desc->callback_param = siu_stream; in siu_pcm_wr_set()
148 siu_stream->tx_desc = desc; in siu_pcm_wr_set()
149 siu_stream->cookie = cookie; in siu_pcm_wr_set()
151 dma_async_issue_pending(siu_stream->chan); in siu_pcm_wr_set()
167 struct siu_stream *siu_stream = &port_info->capture; in siu_pcm_rd_set() local
168 struct snd_pcm_substream *substream = siu_stream->substream; in siu_pcm_rd_set()
183 desc = dmaengine_prep_slave_sg(siu_stream->chan, in siu_pcm_rd_set()
191 desc->callback_param = siu_stream; in siu_pcm_rd_set()
198 siu_stream->tx_desc = desc; in siu_pcm_rd_set()
199 siu_stream->cookie = cookie; in siu_pcm_rd_set()
201 dma_async_issue_pending(siu_stream->chan); in siu_pcm_rd_set()
215 struct siu_stream *siu_stream = (struct siu_stream *)data; in siu_io_tasklet() local
216 struct snd_pcm_substream *substream = siu_stream->substream; in siu_io_tasklet()
221 dev_dbg(dev, "%s: flags %x\n", __func__, siu_stream->rw_flg); in siu_io_tasklet()
223 if (!siu_stream->rw_flg) { in siu_io_tasklet()
234 siu_stream->cur_period, in siu_io_tasklet()
235 siu_stream->period_bytes); in siu_io_tasklet()
237 siu_stream->cur_period, in siu_io_tasklet()
238 siu_stream->period_bytes); in siu_io_tasklet()
239 count = siu_stream->period_bytes; in siu_io_tasklet()
246 siu_stream->cur_period, in siu_io_tasklet()
247 siu_stream->period_bytes), in siu_io_tasklet()
248 siu_stream->period_bytes); in siu_io_tasklet()
255 struct siu_stream *siu_stream = &port_info->capture; in siu_pcm_stmread_start() local
257 if (siu_stream->xfer_cnt > 0x1000000) in siu_pcm_stmread_start()
259 if (siu_stream->rw_flg) in siu_pcm_stmread_start()
263 siu_stream->cur_period = 0; in siu_pcm_stmread_start()
266 siu_stream->rw_flg = RWF_STM_RD; in siu_pcm_stmread_start()
268 tasklet_schedule(&siu_stream->tasklet); in siu_pcm_stmread_start()
277 struct siu_stream *siu_stream = &port_info->capture; in siu_pcm_stmread_stop() local
278 struct device *dev = siu_stream->substream->pcm->card->dev; in siu_pcm_stmread_stop()
281 if (!siu_stream->rw_flg) in siu_pcm_stmread_stop()
291 siu_stream->rw_flg = 0; in siu_pcm_stmread_stop()
317 struct siu_stream *siu_stream; in siu_pcm_hw_free() local
320 siu_stream = &port_info->playback; in siu_pcm_hw_free()
322 siu_stream = &port_info->capture; in siu_pcm_hw_free()
346 struct siu_stream *siu_stream; in siu_pcm_open() local
358 siu_stream = &port_info->playback; in siu_pcm_open()
359 param = &siu_stream->param; in siu_pcm_open()
363 siu_stream = &port_info->capture; in siu_pcm_open()
364 param = &siu_stream->param; in siu_pcm_open()
370 siu_stream->chan = dma_request_channel(mask, filter, param); in siu_pcm_open()
371 if (!siu_stream->chan) { in siu_pcm_open()
376 siu_stream->substream = ss; in siu_pcm_open()
386 struct siu_stream *siu_stream; in siu_pcm_close() local
391 siu_stream = &port_info->playback; in siu_pcm_close()
393 siu_stream = &port_info->capture; in siu_pcm_close()
395 dma_release_channel(siu_stream->chan); in siu_pcm_close()
396 siu_stream->chan = NULL; in siu_pcm_close()
398 siu_stream->substream = NULL; in siu_pcm_close()
409 struct siu_stream *siu_stream; in siu_pcm_prepare() local
413 siu_stream = &port_info->playback; in siu_pcm_prepare()
415 siu_stream = &port_info->capture; in siu_pcm_prepare()
417 rt = siu_stream->substream->runtime; in siu_pcm_prepare()
419 siu_stream->buf_bytes = snd_pcm_lib_buffer_bytes(ss); in siu_pcm_prepare()
420 siu_stream->period_bytes = snd_pcm_lib_period_bytes(ss); in siu_pcm_prepare()
423 info->port_id, rt->channels, siu_stream->period_bytes); in siu_pcm_prepare()
426 if (siu_stream->buf_bytes % siu_stream->period_bytes) { in siu_pcm_prepare()
428 __func__, siu_stream->buf_bytes, in siu_pcm_prepare()
429 siu_stream->period_bytes); in siu_pcm_prepare()
433 xfer_cnt = bytes_to_frames(rt, siu_stream->period_bytes); in siu_pcm_prepare()
437 siu_stream->format = rt->format; in siu_pcm_prepare()
438 siu_stream->xfer_cnt = xfer_cnt; in siu_pcm_prepare()
442 (unsigned long)rt->dma_addr, siu_stream->buf_bytes, in siu_pcm_prepare()
443 siu_stream->period_bytes, in siu_pcm_prepare()
444 siu_stream->format, rt->channels, (int)xfer_cnt); in siu_pcm_prepare()
499 struct siu_stream *siu_stream; in siu_pcm_pointer_dma() local
502 siu_stream = &port_info->playback; in siu_pcm_pointer_dma()
504 siu_stream = &port_info->capture; in siu_pcm_pointer_dma()
511 siu_stream->cur_period, in siu_pcm_pointer_dma()
512 siu_stream->period_bytes) - rt->dma_addr; in siu_pcm_pointer_dma()
517 siu_read32(base + SIU_SBFSTS), ptr, siu_stream->buf_bytes, in siu_pcm_pointer_dma()
518 siu_stream->cookie); in siu_pcm_pointer_dma()
520 if (ptr >= siu_stream->buf_bytes) in siu_pcm_pointer_dma()