Lines Matching refs:pcd
132 static void au1x_pcm_dbdma_free(struct au1xpsc_audio_dmadata *pcd)
134 if (pcd->ddma_chan) {
135 au1xxx_dbdma_stop(pcd->ddma_chan);
136 au1xxx_dbdma_reset(pcd->ddma_chan);
137 au1xxx_dbdma_chan_free(pcd->ddma_chan);
138 pcd->ddma_chan = 0;
139 pcd->msbits = 0;
148 static int au1x_pcm_dbdma_realloc(struct au1xpsc_audio_dmadata *pcd,
156 if ((pcd->ddma_chan) && (msbits == pcd->msbits))
159 au1x_pcm_dbdma_free(pcd);
162 pcd->ddma_chan = au1xxx_dbdma_chan_alloc(pcd->ddma_id,
164 au1x_pcm_dmarx_cb, (void *)pcd);
166 pcd->ddma_chan = au1xxx_dbdma_chan_alloc(DSCR_CMD0_ALWAYS,
167 pcd->ddma_id,
168 au1x_pcm_dmatx_cb, (void *)pcd);
170 if (!pcd->ddma_chan)
173 au1xxx_dbdma_set_devwidth(pcd->ddma_chan, msbits);
174 au1xxx_dbdma_ring_alloc(pcd->ddma_chan, 2);
176 pcd->msbits = msbits;
178 au1xxx_dbdma_stop(pcd->ddma_chan);
179 au1xxx_dbdma_reset(pcd->ddma_chan);
188 struct au1xpsc_audio_dmadata *pcd = snd_soc_component_get_drvdata(component);
189 return &pcd[ss->stream];
197 struct au1xpsc_audio_dmadata *pcd;
201 pcd = to_dmadata(substream, component);
212 ret = au1x_pcm_dbdma_realloc(pcd, stype, params->msbits);
218 pcd->substream = substream;
219 pcd->period_bytes = params_period_bytes(params);
220 pcd->periods = params_periods(params);
221 pcd->dma_area_s = pcd->dma_area = runtime->dma_addr;
222 pcd->q_period = 0;
223 pcd->curr_period = 0;
224 pcd->pos = 0;
234 struct au1xpsc_audio_dmadata *pcd = to_dmadata(substream, component);
236 au1xxx_dbdma_reset(pcd->ddma_chan);
239 au1x_pcm_queue_rx(pcd);
240 au1x_pcm_queue_rx(pcd);
242 au1x_pcm_queue_tx(pcd);
243 au1x_pcm_queue_tx(pcd);
280 struct au1xpsc_audio_dmadata *pcd = to_dmadata(substream, component);
288 pcd->ddma_id = dmaids[stype];