Lines Matching refs:rtd

80 	struct ep93xx_runtime_data *rtd = substream->runtime->private_data;
82 if (buf == rtd->buf + rtd->periods - 1)
83 rtd->pointer_bytes = 0;
85 rtd->pointer_bytes += buf->size;
88 ep93xx_dma_m2p_submit_recursive(&rtd->cl, buf);
89 tasklet_schedule(&rtd->period_tasklet);
100 struct ep93xx_runtime_data *rtd;
106 rtd = kmalloc(sizeof(*rtd), GFP_KERNEL);
107 if (!rtd)
110 memset(&rtd->period_tasklet, 0, sizeof(rtd->period_tasklet));
111 rtd->period_tasklet.func = ep93xx_pcm_period_elapsed;
112 rtd->period_tasklet.data = (unsigned long)substream;
114 rtd->cl.name = dma_params->name;
115 rtd->cl.flags = dma_params->dma_port | EP93XX_DMA_M2P_IGNORE_ERROR |
118 rtd->cl.cookie = substream;
119 rtd->cl.buffer_started = ep93xx_pcm_buffer_started;
120 rtd->cl.buffer_finished = ep93xx_pcm_buffer_finished;
121 ret = ep93xx_dma_m2p_client_register(&rtd->cl);
123 kfree(rtd);
127 substream->runtime->private_data = rtd;
133 struct ep93xx_runtime_data *rtd = substream->runtime->private_data;
135 ep93xx_dma_m2p_client_unregister(&rtd->cl);
136 kfree(rtd);
144 struct ep93xx_runtime_data *rtd = runtime->private_data;
152 rtd->periods = (totsize + period - 1) / period;
153 for (i = 0; i < rtd->periods; i++) {
154 rtd->buf[i].bus_addr = runtime->dma_addr + (i * period);
155 rtd->buf[i].size = period;
157 rtd->buf[i].size = totsize - (i * period);
171 struct ep93xx_runtime_data *rtd = substream->runtime->private_data;
180 rtd->pointer_bytes = 0;
181 for (i = 0; i < rtd->periods; i++)
182 ep93xx_dma_m2p_submit(&rtd->cl, rtd->buf + i);
188 ep93xx_dma_m2p_flush(&rtd->cl);
202 struct ep93xx_runtime_data *rtd = substream->runtime->private_data;
205 return bytes_to_frames(runtime, rtd->pointer_bytes);