Lines Matching refs:dmap_out

280 	struct dma_buffparms *dmap_out = NULL;  in DMAbuf_open()  local
285 adev->dmap_in = adev->dmap_out; in DMAbuf_open()
290 dmap_out = adev->dmap_out; in DMAbuf_open()
292 if (dmap_in == dmap_out) in DMAbuf_open()
296 if ((retval = open_dmap(adev, mode, dmap_out)) < 0) { in DMAbuf_open()
307 close_dmap(adev, dmap_out); in DMAbuf_open()
317 if (adev->dmap_out->dma_mode == DMODE_OUTPUT) in DMAbuf_open()
318 memset(adev->dmap_out->raw_buf, adev->dmap_out->neutral_byte, in DMAbuf_open()
319 adev->dmap_out->bytes_in_use); in DMAbuf_open()
336 struct dma_buffparms *dmap = adev->dmap_out; in dma_reset_output()
346 adev->dmap_out->flags |= DMA_SYNCING; in dma_reset_output()
348 adev->dmap_out->underrun_count = 0; in dma_reset_output()
349 if (!signal_pending(current) && adev->dmap_out->qlen && in dma_reset_output()
350 adev->dmap_out->underrun_count == 0) in dma_reset_output()
353 adev->dmap_out->flags &= ~(DMA_SYNCING | DMA_ACTIVE); in dma_reset_output()
362 adev->dmap_out->flags &= ~DMA_STARTED; in dma_reset_output()
371 reorganize_buffers(dev, adev->dmap_out, 0); in dma_reset_output()
433 if (adev->dmap_out->dma_mode == DMODE_OUTPUT) { in DMAbuf_sync()
434 dmap = adev->dmap_out; in DMAbuf_sync()
439 adev->dmap_out->flags |= DMA_SYNCING; in DMAbuf_sync()
440 adev->dmap_out->underrun_count = 0; in DMAbuf_sync()
441 while (!signal_pending(current) && n++ <= adev->dmap_out->nbufs && in DMAbuf_sync()
442 adev->dmap_out->qlen && adev->dmap_out->underrun_count == 0) { in DMAbuf_sync()
447 adev->dmap_out->flags &= ~DMA_SYNCING; in DMAbuf_sync()
449 return adev->dmap_out->qlen; in DMAbuf_sync()
452 adev->dmap_out->flags &= ~(DMA_SYNCING | DMA_ACTIVE); in DMAbuf_sync()
470 adev->dmap_out->dma_mode = DMODE_NONE; in DMAbuf_sync()
471 return adev->dmap_out->qlen; in DMAbuf_sync()
480 adev->dmap_out->closing = 1; in DMAbuf_release()
485 if (!(adev->dmap_out->mapping_flags & DMA_MAP_MAPPED)) in DMAbuf_release()
486 if (!signal_pending(current) && (adev->dmap_out->dma_mode == DMODE_OUTPUT)) in DMAbuf_release()
488 if (adev->dmap_out->dma_mode == DMODE_OUTPUT) in DMAbuf_release()
489 memset(adev->dmap_out->raw_buf, adev->dmap_out->neutral_byte, adev->dmap_out->bytes_in_use); in DMAbuf_release()
497 close_dmap(adev, adev->dmap_out); in DMAbuf_release()
706 struct dma_buffparms *dmap = adev->dmap_out; in DMAbuf_space_in_queue()
743 struct dma_buffparms *dmap = adev->dmap_out; in output_sleep()
777 struct dma_buffparms *dmap = adev->dmap_out; in find_output_space()
829 struct dma_buffparms *dmap = adev->dmap_out; in DMAbuf_getwrbuffer()
860 struct dma_buffparms *dmap = adev->dmap_out; in DMAbuf_move_wrpointer()
908 struct dma_buffparms *dmap = (dma_mode == DMA_MODE_WRITE) ? adev->dmap_out : adev->dmap_in; in DMAbuf_start_dma()
912 printk("Device %d, chn=%s\n", dev, (dmap == adev->dmap_out) ? "out" : "in"); in DMAbuf_start_dma()
923 struct dma_buffparms *dmap = (dma_mode == DMA_MODE_WRITE) ? adev->dmap_out : adev->dmap_in; in local_start_dma()
927 printk(KERN_ERR "Device %s, chn=%s\n", adev->name, (dmap == adev->dmap_out) ? "out" : "in"); in local_start_dma()
953 struct dma_buffparms *dmap = adev->dmap_out; in do_outputintr()
1009 memset(adev->dmap_out->raw_buf, adev->dmap_out->neutral_byte, in do_outputintr()
1010 adev->dmap_out->buffsize); in do_outputintr()
1025 struct dma_buffparms *dmap = adev->dmap_out; in DMAbuf_outputintr()
1163 if ((err = open_dmap(adev, OPEN_READWRITE, adev->dmap_out)) < 0) in DMAbuf_open_dma()
1165 dma_init_buffers(adev->dmap_out); in DMAbuf_open_dma()
1166 adev->dmap_out->flags |= DMA_ALLOC_DONE; in DMAbuf_open_dma()
1167 adev->dmap_out->fragment_size = adev->dmap_out->buffsize; in DMAbuf_open_dma()
1169 if (adev->dmap_out->dma >= 0) { in DMAbuf_open_dma()
1173 clear_dma_ff(adev->dmap_out->dma); in DMAbuf_open_dma()
1174 disable_dma(adev->dmap_out->dma); in DMAbuf_open_dma()
1182 close_dmap(audio_devs[dev], audio_devs[dev]->dmap_out); in DMAbuf_close_dma()
1198 if (adev && adev->dmap_out == NULL) { in DMAbuf_init()
1204 adev->dmap_out = audio_devs[parent]->dmap_out; in DMAbuf_init()
1207 adev->dmap_out = adev->dmap_in = &adev->dmaps[0]; in DMAbuf_init()
1208 adev->dmap_out->dma = dma1; in DMAbuf_init()
1218 if (adev->dmap_out->raw_buf == NULL) in DMAbuf_init()
1219 sound_alloc_dmap(adev->dmap_out); in DMAbuf_init()
1258 struct dma_buffparms *dmap = adev->dmap_out; in poll_output()
1292 sound_free_dmap(adev->dmap_out); in DMAbuf_deinit()