Lines Matching refs:rtd
86 struct i2s_stream_instance *rtd; in acp5x_i2s_hwparams() local
99 rtd = substream->runtime->private_data; in acp5x_i2s_hwparams()
105 rtd->i2s_instance = pinfo->play_i2s_instance; in acp5x_i2s_hwparams()
107 rtd->i2s_instance = pinfo->cap_i2s_instance; in acp5x_i2s_hwparams()
114 rtd->xfer_resolution = 0x0; in acp5x_i2s_hwparams()
117 rtd->xfer_resolution = 0x02; in acp5x_i2s_hwparams()
120 rtd->xfer_resolution = 0x04; in acp5x_i2s_hwparams()
123 rtd->xfer_resolution = 0x05; in acp5x_i2s_hwparams()
129 switch (rtd->i2s_instance) { in acp5x_i2s_hwparams()
140 switch (rtd->i2s_instance) { in acp5x_i2s_hwparams()
152 val = acp_readl(rtd->acp5x_base + reg_val); in acp5x_i2s_hwparams()
153 acp_writel(val | 0x2, rtd->acp5x_base + reg_val); in acp5x_i2s_hwparams()
154 acp_writel(adata->tdm_fmt, rtd->acp5x_base + frmt_reg); in acp5x_i2s_hwparams()
156 val = acp_readl(rtd->acp5x_base + reg_val); in acp5x_i2s_hwparams()
158 val = val | (rtd->xfer_resolution << 3); in acp5x_i2s_hwparams()
159 acp_writel(val, rtd->acp5x_base + reg_val); in acp5x_i2s_hwparams()
226 rtd->lrclk_div = lrclk_div_val; in acp5x_i2s_hwparams()
227 rtd->bclk_div = bclk_div_val; in acp5x_i2s_hwparams()
235 struct i2s_stream_instance *rtd; in acp5x_i2s_trigger() local
241 rtd = substream->runtime->private_data; in acp5x_i2s_trigger()
250 rtd->bytescount = acp_get_byte_count(rtd, in acp5x_i2s_trigger()
253 switch (rtd->i2s_instance) { in acp5x_i2s_trigger()
270 switch (rtd->i2s_instance) { in acp5x_i2s_trigger()
287 acp_writel(period_bytes, rtd->acp5x_base + water_val); in acp5x_i2s_trigger()
288 acp_writel(buf_size, rtd->acp5x_base + buf_reg); in acp5x_i2s_trigger()
290 acp5x_set_i2s_clk(adata, rtd); in acp5x_i2s_trigger()
291 val = acp_readl(rtd->acp5x_base + reg_val); in acp5x_i2s_trigger()
293 acp_writel(val, rtd->acp5x_base + reg_val); in acp5x_i2s_trigger()
294 acp_writel(1, rtd->acp5x_base + ier_val); in acp5x_i2s_trigger()
301 switch (rtd->i2s_instance) { in acp5x_i2s_trigger()
311 switch (rtd->i2s_instance) { in acp5x_i2s_trigger()
320 val = acp_readl(rtd->acp5x_base + reg_val); in acp5x_i2s_trigger()
322 acp_writel(val, rtd->acp5x_base + reg_val); in acp5x_i2s_trigger()
324 if (!(acp_readl(rtd->acp5x_base + ACP_HSTDM_ITER) & BIT(0)) && in acp5x_i2s_trigger()
325 !(acp_readl(rtd->acp5x_base + ACP_HSTDM_IRER) & BIT(0))) in acp5x_i2s_trigger()
326 acp_writel(0, rtd->acp5x_base + ACP_HSTDM_IER); in acp5x_i2s_trigger()
327 if (!(acp_readl(rtd->acp5x_base + ACP_I2STDM_ITER) & BIT(0)) && in acp5x_i2s_trigger()
328 !(acp_readl(rtd->acp5x_base + ACP_I2STDM_IRER) & BIT(0))) in acp5x_i2s_trigger()
329 acp_writel(0, rtd->acp5x_base + ACP_I2STDM_IER); in acp5x_i2s_trigger()