Lines Matching refs:siu_stream
41 struct siu_stream *siu_stream = &port_info->playback; in siu_pcm_stmwrite_stop() local
44 if (!siu_stream->rw_flg) in siu_pcm_stmwrite_stop()
54 siu_stream->rw_flg = 0; in siu_pcm_stmwrite_stop()
61 struct siu_stream *siu_stream = &port_info->playback; in siu_pcm_stmwrite_start() local
63 if (siu_stream->rw_flg) in siu_pcm_stmwrite_start()
70 siu_stream->rw_flg = RWF_STM_WT; in siu_pcm_stmwrite_start()
73 queue_work(system_highpri_wq, &siu_stream->work); in siu_pcm_stmwrite_start()
80 struct siu_stream *siu_stream = arg; in siu_dma_tx_complete() local
82 if (!siu_stream->rw_flg) in siu_dma_tx_complete()
86 if (++siu_stream->cur_period >= in siu_dma_tx_complete()
87 GET_MAX_PERIODS(siu_stream->buf_bytes, in siu_dma_tx_complete()
88 siu_stream->period_bytes)) in siu_dma_tx_complete()
89 siu_stream->cur_period = 0; in siu_dma_tx_complete()
92 __func__, siu_stream->cur_period, in siu_dma_tx_complete()
93 siu_stream->cur_period * siu_stream->period_bytes, in siu_dma_tx_complete()
94 siu_stream->buf_bytes, siu_stream->cookie); in siu_dma_tx_complete()
96 queue_work(system_highpri_wq, &siu_stream->work); in siu_dma_tx_complete()
99 snd_pcm_period_elapsed(siu_stream->substream); in siu_dma_tx_complete()
107 struct siu_stream *siu_stream = &port_info->playback; in siu_pcm_wr_set() local
108 struct snd_pcm_substream *substream = siu_stream->substream; in siu_pcm_wr_set()
121 desc = dmaengine_prep_slave_sg(siu_stream->chan, in siu_pcm_wr_set()
129 desc->callback_param = siu_stream; in siu_pcm_wr_set()
136 siu_stream->tx_desc = desc; in siu_pcm_wr_set()
137 siu_stream->cookie = cookie; in siu_pcm_wr_set()
139 dma_async_issue_pending(siu_stream->chan); in siu_pcm_wr_set()
155 struct siu_stream *siu_stream = &port_info->capture; in siu_pcm_rd_set() local
156 struct snd_pcm_substream *substream = siu_stream->substream; in siu_pcm_rd_set()
171 desc = dmaengine_prep_slave_sg(siu_stream->chan, in siu_pcm_rd_set()
179 desc->callback_param = siu_stream; in siu_pcm_rd_set()
186 siu_stream->tx_desc = desc; in siu_pcm_rd_set()
187 siu_stream->cookie = cookie; in siu_pcm_rd_set()
189 dma_async_issue_pending(siu_stream->chan); in siu_pcm_rd_set()
203 struct siu_stream *siu_stream = container_of(work, struct siu_stream, in siu_io_work() local
205 struct snd_pcm_substream *substream = siu_stream->substream; in siu_io_work()
210 dev_dbg(dev, "%s: flags %x\n", __func__, siu_stream->rw_flg); in siu_io_work()
212 if (!siu_stream->rw_flg) { in siu_io_work()
222 siu_stream->cur_period, in siu_io_work()
223 siu_stream->period_bytes); in siu_io_work()
224 count = siu_stream->period_bytes; in siu_io_work()
231 siu_stream->cur_period, in siu_io_work()
232 siu_stream->period_bytes), in siu_io_work()
233 siu_stream->period_bytes); in siu_io_work()
240 struct siu_stream *siu_stream = &port_info->capture; in siu_pcm_stmread_start() local
242 if (siu_stream->xfer_cnt > 0x1000000) in siu_pcm_stmread_start()
244 if (siu_stream->rw_flg) in siu_pcm_stmread_start()
248 siu_stream->cur_period = 0; in siu_pcm_stmread_start()
251 siu_stream->rw_flg = RWF_STM_RD; in siu_pcm_stmread_start()
253 queue_work(system_highpri_wq, &siu_stream->work); in siu_pcm_stmread_start()
262 struct siu_stream *siu_stream = &port_info->capture; in siu_pcm_stmread_stop() local
263 struct device *dev = siu_stream->substream->pcm->card->dev; in siu_pcm_stmread_stop()
266 if (!siu_stream->rw_flg) in siu_pcm_stmread_stop()
276 siu_stream->rw_flg = 0; in siu_pcm_stmread_stop()
298 struct siu_stream *siu_stream; in siu_pcm_open() local
310 siu_stream = &port_info->playback; in siu_pcm_open()
311 param = &siu_stream->param; in siu_pcm_open()
315 siu_stream = &port_info->capture; in siu_pcm_open()
316 param = &siu_stream->param; in siu_pcm_open()
322 siu_stream->chan = dma_request_channel(mask, filter, param); in siu_pcm_open()
323 if (!siu_stream->chan) { in siu_pcm_open()
328 siu_stream->substream = ss; in siu_pcm_open()
339 struct siu_stream *siu_stream; in siu_pcm_close() local
344 siu_stream = &port_info->playback; in siu_pcm_close()
346 siu_stream = &port_info->capture; in siu_pcm_close()
348 dma_release_channel(siu_stream->chan); in siu_pcm_close()
349 siu_stream->chan = NULL; in siu_pcm_close()
351 siu_stream->substream = NULL; in siu_pcm_close()
363 struct siu_stream *siu_stream; in siu_pcm_prepare() local
367 siu_stream = &port_info->playback; in siu_pcm_prepare()
369 siu_stream = &port_info->capture; in siu_pcm_prepare()
371 rt = siu_stream->substream->runtime; in siu_pcm_prepare()
373 siu_stream->buf_bytes = snd_pcm_lib_buffer_bytes(ss); in siu_pcm_prepare()
374 siu_stream->period_bytes = snd_pcm_lib_period_bytes(ss); in siu_pcm_prepare()
377 info->port_id, rt->channels, siu_stream->period_bytes); in siu_pcm_prepare()
380 if (siu_stream->buf_bytes % siu_stream->period_bytes) { in siu_pcm_prepare()
382 __func__, siu_stream->buf_bytes, in siu_pcm_prepare()
383 siu_stream->period_bytes); in siu_pcm_prepare()
387 xfer_cnt = bytes_to_frames(rt, siu_stream->period_bytes); in siu_pcm_prepare()
391 siu_stream->format = rt->format; in siu_pcm_prepare()
392 siu_stream->xfer_cnt = xfer_cnt; in siu_pcm_prepare()
396 (unsigned long)rt->dma_addr, siu_stream->buf_bytes, in siu_pcm_prepare()
397 siu_stream->period_bytes, in siu_pcm_prepare()
398 siu_stream->format, rt->channels, (int)xfer_cnt); in siu_pcm_prepare()
456 struct siu_stream *siu_stream; in siu_pcm_pointer_dma() local
459 siu_stream = &port_info->playback; in siu_pcm_pointer_dma()
461 siu_stream = &port_info->capture; in siu_pcm_pointer_dma()
468 siu_stream->cur_period, in siu_pcm_pointer_dma()
469 siu_stream->period_bytes) - rt->dma_addr; in siu_pcm_pointer_dma()
474 siu_read32(base + SIU_SBFSTS), ptr, siu_stream->buf_bytes, in siu_pcm_pointer_dma()
475 siu_stream->cookie); in siu_pcm_pointer_dma()
477 if (ptr >= siu_stream->buf_bytes) in siu_pcm_pointer_dma()