Lines Matching refs:prtd
67 struct idma_ctrl *prtd = substream->runtime->private_data;
70 spin_lock(&prtd->lock);
71 prtd->token = (void *) substream;
72 spin_unlock(&prtd->lock);
75 val = idma.lp_tx_addr + prtd->periodsz;
102 struct idma_ctrl *prtd = substream->runtime->private_data;
104 spin_lock(&prtd->lock);
105 prtd->cb = cb;
106 spin_unlock(&prtd->lock);
134 struct idma_ctrl *prtd = substream->runtime->private_data;
136 if (prtd && (prtd->state & ST_RUNNING))
145 struct idma_ctrl *prtd = substream->runtime->private_data;
157 prtd->start = prtd->pos = runtime->dma_addr;
158 prtd->period = params_periods(params);
159 prtd->periodsz = params_period_bytes(params);
160 prtd->end = runtime->dma_addr + runtime->dma_bytes;
178 struct idma_ctrl *prtd = substream->runtime->private_data;
180 prtd->pos = prtd->start;
192 struct idma_ctrl *prtd = substream->runtime->private_data;
195 spin_lock(&prtd->lock);
201 prtd->state |= ST_RUNNING;
208 prtd->state &= ~ST_RUNNING;
217 spin_unlock(&prtd->lock);
227 struct idma_ctrl *prtd = runtime->private_data;
231 spin_lock(&prtd->lock);
234 res = src - prtd->start;
236 spin_unlock(&prtd->lock);
262 struct idma_ctrl *prtd = (struct idma_ctrl *)dev_id;
274 addr += prtd->periodsz;
275 addr %= (u32)(prtd->end - prtd->start);
280 if (prtd->cb)
281 prtd->cb(prtd->token, prtd->period);
291 struct idma_ctrl *prtd;
296 prtd = kzalloc(sizeof(struct idma_ctrl), GFP_KERNEL);
297 if (prtd == NULL)
300 ret = request_irq(idma_irq, iis_irq, 0, "i2s", prtd);
303 kfree(prtd);
307 spin_lock_init(&prtd->lock);
309 runtime->private_data = prtd;
318 struct idma_ctrl *prtd = runtime->private_data;
320 free_irq(idma_irq, prtd);
322 if (!prtd)
323 pr_err("idma_close called with prtd == NULL\n");
325 kfree(prtd);