Lines Matching refs:prtd
67 struct idma_ctrl *prtd = substream->runtime->private_data; in idma_enqueue() local
70 spin_lock(&prtd->lock); in idma_enqueue()
71 prtd->token = (void *) substream; in idma_enqueue()
72 spin_unlock(&prtd->lock); in idma_enqueue()
75 val = idma.lp_tx_addr + prtd->periodsz; in idma_enqueue()
102 struct idma_ctrl *prtd = substream->runtime->private_data; in idma_setcallbk() local
104 spin_lock(&prtd->lock); in idma_setcallbk()
105 prtd->cb = cb; in idma_setcallbk()
106 spin_unlock(&prtd->lock); in idma_setcallbk()
134 struct idma_ctrl *prtd = substream->runtime->private_data; in idma_done() local
136 if (prtd && (prtd->state & ST_RUNNING)) in idma_done()
145 struct idma_ctrl *prtd = substream->runtime->private_data; in idma_hw_params() local
157 prtd->start = prtd->pos = runtime->dma_addr; in idma_hw_params()
158 prtd->period = params_periods(params); in idma_hw_params()
159 prtd->periodsz = params_period_bytes(params); in idma_hw_params()
160 prtd->end = runtime->dma_addr + runtime->dma_bytes; in idma_hw_params()
178 struct idma_ctrl *prtd = substream->runtime->private_data; in idma_prepare() local
180 prtd->pos = prtd->start; in idma_prepare()
192 struct idma_ctrl *prtd = substream->runtime->private_data; in idma_trigger() local
195 spin_lock(&prtd->lock); in idma_trigger()
201 prtd->state |= ST_RUNNING; in idma_trigger()
208 prtd->state &= ~ST_RUNNING; in idma_trigger()
217 spin_unlock(&prtd->lock); in idma_trigger()
227 struct idma_ctrl *prtd = runtime->private_data; in idma_pointer() local
231 spin_lock(&prtd->lock); in idma_pointer()
234 res = src - prtd->start; in idma_pointer()
236 spin_unlock(&prtd->lock); in idma_pointer()
259 struct idma_ctrl *prtd = (struct idma_ctrl *)dev_id; in iis_irq() local
271 addr += prtd->periodsz; in iis_irq()
272 addr %= (u32)(prtd->end - prtd->start); in iis_irq()
277 if (prtd->cb) in iis_irq()
278 prtd->cb(prtd->token, prtd->period); in iis_irq()
288 struct idma_ctrl *prtd; in idma_open() local
293 prtd = kzalloc(sizeof(struct idma_ctrl), GFP_KERNEL); in idma_open()
294 if (prtd == NULL) in idma_open()
297 ret = request_irq(idma_irq, iis_irq, 0, "i2s", prtd); in idma_open()
300 kfree(prtd); in idma_open()
304 spin_lock_init(&prtd->lock); in idma_open()
306 runtime->private_data = prtd; in idma_open()
315 struct idma_ctrl *prtd = runtime->private_data; in idma_close() local
317 free_irq(idma_irq, prtd); in idma_close()
319 if (!prtd) in idma_close()
322 kfree(prtd); in idma_close()