Searched refs:dmadata (Results 1 - 3 of 3) sorted by relevance
/linux-4.4.14/sound/soc/txx9/ |
H A D | txx9aclc.c | 27 struct txx9aclc_dmadata dmadata[2]; member in struct:txx9aclc_soc_device 34 struct txx9aclc_dmadata *dmadata); 56 struct txx9aclc_dmadata *dmadata = runtime->private_data; txx9aclc_pcm_hw_params() local 74 dmadata->substream = substream; txx9aclc_pcm_hw_params() 75 dmadata->pos = 0; txx9aclc_pcm_hw_params() 87 struct txx9aclc_dmadata *dmadata = runtime->private_data; txx9aclc_pcm_prepare() local 89 dmadata->dma_addr = runtime->dma_addr; txx9aclc_pcm_prepare() 90 dmadata->buffer_bytes = snd_pcm_lib_buffer_bytes(substream); txx9aclc_pcm_prepare() 91 dmadata->period_bytes = snd_pcm_lib_period_bytes(substream); txx9aclc_pcm_prepare() 93 if (dmadata->buffer_bytes == dmadata->period_bytes) { txx9aclc_pcm_prepare() 94 dmadata->frag_bytes = dmadata->period_bytes >> 1; txx9aclc_pcm_prepare() 95 dmadata->frags = 2; txx9aclc_pcm_prepare() 97 dmadata->frag_bytes = dmadata->period_bytes; txx9aclc_pcm_prepare() 98 dmadata->frags = dmadata->buffer_bytes / dmadata->period_bytes; txx9aclc_pcm_prepare() 100 dmadata->frag_count = 0; txx9aclc_pcm_prepare() 101 dmadata->pos = 0; txx9aclc_pcm_prepare() 107 struct txx9aclc_dmadata *dmadata = arg; txx9aclc_dma_complete() local 111 spin_lock_irqsave(&dmadata->dma_lock, flags); txx9aclc_dma_complete() 112 if (dmadata->frag_count >= 0) { txx9aclc_dma_complete() 113 dmadata->dmacount--; txx9aclc_dma_complete() 114 if (!WARN_ON(dmadata->dmacount < 0)) txx9aclc_dma_complete() 115 tasklet_schedule(&dmadata->tasklet); txx9aclc_dma_complete() 117 spin_unlock_irqrestore(&dmadata->dma_lock, flags); txx9aclc_dma_complete() 121 txx9aclc_dma_submit(struct txx9aclc_dmadata *dmadata, dma_addr_t buf_dma_addr) txx9aclc_dma_submit() argument 123 struct dma_chan *chan = dmadata->dma_chan; txx9aclc_dma_submit() 129 dmadata->frag_bytes, buf_dma_addr & (PAGE_SIZE - 1)); txx9aclc_dma_submit() 132 dmadata->substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? txx9aclc_dma_submit() 140 desc->callback_param = dmadata; txx9aclc_dma_submit() 149 struct txx9aclc_dmadata *dmadata = (struct txx9aclc_dmadata *)data; txx9aclc_dma_tasklet() local 150 struct dma_chan *chan = dmadata->dma_chan; txx9aclc_dma_tasklet() 152 struct snd_pcm_substream *substream = dmadata->substream; txx9aclc_dma_tasklet() 158 spin_lock_irqsave(&dmadata->dma_lock, flags); txx9aclc_dma_tasklet() 159 if (dmadata->frag_count < 0) { txx9aclc_dma_tasklet() 163 spin_unlock_irqrestore(&dmadata->dma_lock, flags); txx9aclc_dma_tasklet() 167 desc = txx9aclc_dma_submit(dmadata, txx9aclc_dma_tasklet() 168 dmadata->dma_addr + i * dmadata->frag_bytes); txx9aclc_dma_tasklet() 172 dmadata->dmacount = NR_DMA_CHAIN; txx9aclc_dma_tasklet() 174 spin_lock_irqsave(&dmadata->dma_lock, flags); txx9aclc_dma_tasklet() 176 dmadata->frag_count = NR_DMA_CHAIN % dmadata->frags; txx9aclc_dma_tasklet() 177 spin_unlock_irqrestore(&dmadata->dma_lock, flags); txx9aclc_dma_tasklet() 180 if (WARN_ON(dmadata->dmacount >= NR_DMA_CHAIN)) { txx9aclc_dma_tasklet() 181 spin_unlock_irqrestore(&dmadata->dma_lock, flags); txx9aclc_dma_tasklet() 184 while (dmadata->dmacount < NR_DMA_CHAIN) { txx9aclc_dma_tasklet() 185 dmadata->dmacount++; txx9aclc_dma_tasklet() 186 spin_unlock_irqrestore(&dmadata->dma_lock, flags); txx9aclc_dma_tasklet() 187 desc = txx9aclc_dma_submit(dmadata, txx9aclc_dma_tasklet() 188 dmadata->dma_addr + txx9aclc_dma_tasklet() 189 dmadata->frag_count * dmadata->frag_bytes); txx9aclc_dma_tasklet() 194 spin_lock_irqsave(&dmadata->dma_lock, flags); txx9aclc_dma_tasklet() 195 dmadata->frag_count++; txx9aclc_dma_tasklet() 196 dmadata->frag_count %= dmadata->frags; txx9aclc_dma_tasklet() 197 dmadata->pos += dmadata->frag_bytes; txx9aclc_dma_tasklet() 198 dmadata->pos %= dmadata->buffer_bytes; txx9aclc_dma_tasklet() 199 if ((dmadata->frag_count * dmadata->frag_bytes) % txx9aclc_dma_tasklet() 200 dmadata->period_bytes == 0) txx9aclc_dma_tasklet() 203 spin_unlock_irqrestore(&dmadata->dma_lock, flags); txx9aclc_dma_tasklet() 208 struct txx9aclc_dmadata *dmadata = substream->runtime->private_data; txx9aclc_pcm_trigger() local 216 spin_lock_irqsave(&dmadata->dma_lock, flags); txx9aclc_pcm_trigger() 219 dmadata->frag_count = -1; txx9aclc_pcm_trigger() 220 tasklet_schedule(&dmadata->tasklet); txx9aclc_pcm_trigger() 234 spin_unlock_irqrestore(&dmadata->dma_lock, flags); txx9aclc_pcm_trigger() 241 struct txx9aclc_dmadata *dmadata = substream->runtime->private_data; txx9aclc_pcm_pointer() local 243 return bytes_to_frames(substream->runtime, dmadata->pos); txx9aclc_pcm_pointer() 249 struct txx9aclc_dmadata *dmadata = &dev->dmadata[substream->stream]; txx9aclc_pcm_open() local 260 substream->runtime->private_data = dmadata; txx9aclc_pcm_open() 266 struct txx9aclc_dmadata *dmadata = substream->runtime->private_data; txx9aclc_pcm_close() local 267 struct dma_chan *chan = dmadata->dma_chan; txx9aclc_pcm_close() 269 dmadata->frag_count = -1; txx9aclc_pcm_close() 299 dev->dmadata[0].stream = SNDRV_PCM_STREAM_PLAYBACK; txx9aclc_pcm_new() 300 dev->dmadata[1].stream = SNDRV_PCM_STREAM_CAPTURE; txx9aclc_pcm_new() 307 dev->dmadata[i].dma_res = r; txx9aclc_pcm_new() 308 ret = txx9aclc_dma_init(dev, &dev->dmadata[i]); txx9aclc_pcm_new() 317 if (dev->dmadata[i].dma_chan) txx9aclc_pcm_new() 318 dma_release_channel(dev->dmadata[i].dma_chan); txx9aclc_pcm_new() 319 dev->dmadata[i].dma_chan = NULL; txx9aclc_pcm_new() 326 struct txx9aclc_dmadata *dmadata = param; filter() local 330 devname = kasprintf(GFP_KERNEL, "%s.%d", dmadata->dma_res->name, filter() 331 (int)dmadata->dma_res->start); filter() 333 chan->private = &dmadata->dma_slave; filter() 341 struct txx9aclc_dmadata *dmadata) txx9aclc_dma_init() 344 struct txx9dmac_slave *ds = &dmadata->dma_slave; txx9aclc_dma_init() 347 spin_lock_init(&dmadata->dma_lock); txx9aclc_dma_init() 350 if (dmadata->stream == SNDRV_PCM_STREAM_PLAYBACK) { txx9aclc_dma_init() 361 dmadata->dma_chan = dma_request_channel(mask, filter, dmadata); txx9aclc_dma_init() 362 if (!dmadata->dma_chan) { txx9aclc_dma_init() 365 dmadata->stream == SNDRV_PCM_STREAM_PLAYBACK ? txx9aclc_dma_init() 369 tasklet_init(&dmadata->tasklet, txx9aclc_dma_tasklet, txx9aclc_dma_init() 370 (unsigned long)dmadata); txx9aclc_dma_init() 393 struct txx9aclc_dmadata *dmadata = &dev->dmadata[i]; txx9aclc_pcm_remove() local 394 struct dma_chan *chan = dmadata->dma_chan; txx9aclc_pcm_remove() 396 dmadata->frag_count = -1; txx9aclc_pcm_remove() 400 dev->dmadata[i].dma_chan = NULL; txx9aclc_pcm_remove() 340 txx9aclc_dma_init(struct txx9aclc_soc_device *dev, struct txx9aclc_dmadata *dmadata) txx9aclc_dma_init() argument
|
/linux-4.4.14/sound/soc/au1x/ |
H A D | dbdma2.c | 337 struct au1xpsc_audio_dmadata *dmadata; au1xpsc_pcm_drvprobe() local 339 dmadata = devm_kzalloc(&pdev->dev, au1xpsc_pcm_drvprobe() 342 if (!dmadata) au1xpsc_pcm_drvprobe() 345 platform_set_drvdata(pdev, dmadata); au1xpsc_pcm_drvprobe()
|
/linux-4.4.14/drivers/net/ethernet/cavium/liquidio/ |
H A D | octeon_nic.h | 46 u64 dmadata; member in struct:octnic_ctrl_pkt
|
Completed in 106 milliseconds