Lines Matching full:rtd

103 static void config_acp5x_dma(struct i2s_stream_instance *rtd, int direction)  in config_acp5x_dma()  argument
110 addr = rtd->dma_addr; in config_acp5x_dma()
112 switch (rtd->i2s_instance) { in config_acp5x_dma()
121 switch (rtd->i2s_instance) { in config_acp5x_dma()
131 acp_writel(ACP_SRAM_PTE_OFFSET | BIT(31), rtd->acp5x_base + in config_acp5x_dma()
133 acp_writel(PAGE_SIZE_4K_ENABLE, rtd->acp5x_base + in config_acp5x_dma()
136 for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) { in config_acp5x_dma()
141 acp_writel(low, rtd->acp5x_base + ACP_SCRATCH_REG_0 + val); in config_acp5x_dma()
143 acp_writel(high, rtd->acp5x_base + ACP_SCRATCH_REG_0 + val + 4); in config_acp5x_dma()
150 switch (rtd->i2s_instance) { in config_acp5x_dma()
158 rtd->acp5x_base + ACP_HS_TX_RINGBUFADDR); in config_acp5x_dma()
169 rtd->acp5x_base + ACP_I2S_TX_RINGBUFADDR); in config_acp5x_dma()
172 switch (rtd->i2s_instance) { in config_acp5x_dma()
180 rtd->acp5x_base + ACP_HS_RX_RINGBUFADDR); in config_acp5x_dma()
191 rtd->acp5x_base + ACP_I2S_RX_RINGBUFADDR); in config_acp5x_dma()
194 acp_writel(DMA_SIZE, rtd->acp5x_base + reg_dma_size); in config_acp5x_dma()
195 acp_writel(acp_fifo_addr, rtd->acp5x_base + reg_fifo_addr); in config_acp5x_dma()
196 acp_writel(FIFO_SIZE, rtd->acp5x_base + reg_fifo_size); in config_acp5x_dma()
199 rtd->acp5x_base + ACP_EXTERNAL_INTR_CNTL); in config_acp5x_dma()
241 struct i2s_stream_instance *rtd; in acp5x_dma_hw_params() local
252 rtd = substream->runtime->private_data; in acp5x_dma_hw_params()
254 if (!rtd) in acp5x_dma_hw_params()
259 rtd->i2s_instance = pinfo->play_i2s_instance; in acp5x_dma_hw_params()
260 switch (rtd->i2s_instance) { in acp5x_dma_hw_params()
269 rtd->i2s_instance = pinfo->cap_i2s_instance; in acp5x_dma_hw_params()
270 switch (rtd->i2s_instance) { in acp5x_dma_hw_params()
284 rtd->dma_addr = substream->runtime->dma_addr; in acp5x_dma_hw_params()
285 rtd->num_pages = (PAGE_ALIGN(size) >> PAGE_SHIFT); in acp5x_dma_hw_params()
286 config_acp5x_dma(rtd, substream->stream); in acp5x_dma_hw_params()
293 struct i2s_stream_instance *rtd; in acp5x_dma_pointer() local
298 rtd = substream->runtime->private_data; in acp5x_dma_pointer()
301 bytescount = acp_get_byte_count(rtd, substream->stream); in acp5x_dma_pointer()
302 if (bytescount > rtd->bytescount) in acp5x_dma_pointer()
303 bytescount -= rtd->bytescount; in acp5x_dma_pointer()
309 struct snd_soc_pcm_runtime *rtd) in acp5x_dma_new() argument
313 snd_pcm_set_managed_buffer_all(rtd->pcm, SNDRV_DMA_TYPE_DEV, in acp5x_dma_new()
426 struct i2s_stream_instance *rtd; in acp5x_pcm_resume() local
432 rtd = adata->play_stream->runtime->private_data; in acp5x_pcm_resume()
433 config_acp5x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK); in acp5x_pcm_resume()
434 acp_writel((rtd->xfer_resolution << 3), rtd->acp5x_base + ACP_HSTDM_ITER); in acp5x_pcm_resume()
442 rtd = adata->i2ssp_play_stream->runtime->private_data; in acp5x_pcm_resume()
443 config_acp5x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK); in acp5x_pcm_resume()
444 acp_writel((rtd->xfer_resolution << 3), rtd->acp5x_base + ACP_I2STDM_ITER); in acp5x_pcm_resume()
453 rtd = adata->capture_stream->runtime->private_data; in acp5x_pcm_resume()
454 config_acp5x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE); in acp5x_pcm_resume()
455 acp_writel((rtd->xfer_resolution << 3), rtd->acp5x_base + ACP_HSTDM_IRER); in acp5x_pcm_resume()
463 rtd = adata->i2ssp_capture_stream->runtime->private_data; in acp5x_pcm_resume()
464 config_acp5x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE); in acp5x_pcm_resume()
465 acp_writel((rtd->xfer_resolution << 3), rtd->acp5x_base + ACP_I2STDM_IRER); in acp5x_pcm_resume()