Lines Matching refs:dma
186 switch (dev->dma) { in config_resources()
276 nsamps = dma_setup(sm, send, dev->dma) - 1; in setup_dma_dsp()
305 disable_dma(dev->dma); in sbc_interrupt()
306 clear_dma_ff(dev->dma); in sbc_interrupt()
307 dma_ptr(sm, sm->dma.ptt_cnt > 0, dev->dma, &curfrag); in sbc_interrupt()
308 enable_dma(dev->dma); in sbc_interrupt()
311 if (sm->dma.ptt_cnt <= 0) { in sbc_interrupt()
316 disable_dma(dev->dma); in sbc_interrupt()
324 disable_dma(dev->dma); in sbc_interrupt()
351 dev->irq < 2 || dev->irq > 15 || dev->dma > 3) in sbc_open()
390 dmasz = (NUM_FRAGMENTS + 1) * sm->dma.ifragsz; in sbc_open()
391 u = NUM_FRAGMENTS * sm->dma.ofragsz; in sbc_open()
394 if (!(sm->dma.ibuf = sm->dma.obuf = kmalloc(dmasz, GFP_KERNEL | GFP_DMA))) in sbc_open()
406 if (request_dma(dev->dma, sm->hwdrv->hw_name)) { in sbc_open()
407 kfree(sm->dma.obuf); in sbc_open()
412 free_dma(dev->dma); in sbc_open()
413 kfree(sm->dma.obuf); in sbc_open()
430 disable_dma(dev->dma); in sbc_close()
433 free_dma(dev->dma); in sbc_close()
435 kfree(sm->dma.obuf); in sbc_close()
484 sm->dma.ifragsz = (sm->mode_rx->srate + 50)/100; in sbc_sethw()
485 sm->dma.ofragsz = (sm->mode_tx->srate + 50)/100; in sbc_sethw()
486 if (sm->dma.ifragsz < sm->mode_rx->overlap) in sbc_sethw()
487 sm->dma.ifragsz = sm->mode_rx->overlap; in sbc_sethw()
488 sm->dma.i16bit = sm->dma.o16bit = 0; in sbc_sethw()
614 if (sm->dma.o16bit) { in setup_dma_fdx_dsp()
619 isamps = dma_setup(sm, 0, dev->dma) - 1; in setup_dma_fdx_dsp()
637 osamps = dma_setup(sm, 1, dev->dma) - 1; in setup_dma_fdx_dsp()
672 if (sm->dma.o16bit) { in sbcfdx_interrupt()
674 disable_dma(dev->dma); in sbcfdx_interrupt()
675 clear_dma_ff(dev->dma); in sbcfdx_interrupt()
676 dma_ptr(sm, 0, dev->dma, &icfrag); in sbcfdx_interrupt()
677 enable_dma(dev->dma); in sbcfdx_interrupt()
680 disable_dma(dev->dma); in sbcfdx_interrupt()
681 clear_dma_ff(dev->dma); in sbcfdx_interrupt()
682 dma_ptr(sm, 1, dev->dma, &ocfrag); in sbcfdx_interrupt()
683 enable_dma(dev->dma); in sbcfdx_interrupt()
688 if (sm->dma.o16bit) { in sbcfdx_interrupt()
733 dev->irq < 2 || dev->irq > 15 || dev->dma > 3) in sbcfdx_open()
762 if (!(sm->dma.ibuf = kmalloc(sm->dma.ifragsz * (NUM_FRAGMENTS+1), GFP_KERNEL | GFP_DMA))) in sbcfdx_open()
764 if (!(sm->dma.obuf = kmalloc(sm->dma.ofragsz * NUM_FRAGMENTS, GFP_KERNEL | GFP_DMA))) { in sbcfdx_open()
765 kfree(sm->dma.ibuf); in sbcfdx_open()
778 if (request_dma(dev->dma, sm->hwdrv->hw_name)) { in sbcfdx_open()
779 kfree(sm->dma.ibuf); in sbcfdx_open()
780 kfree(sm->dma.obuf); in sbcfdx_open()
784 kfree(sm->dma.ibuf); in sbcfdx_open()
785 kfree(sm->dma.obuf); in sbcfdx_open()
786 free_dma(dev->dma); in sbcfdx_open()
791 kfree(sm->dma.ibuf); in sbcfdx_open()
792 kfree(sm->dma.obuf); in sbcfdx_open()
793 free_dma(dev->dma); in sbcfdx_open()
811 disable_dma(dev->dma); in sbcfdx_close()
815 free_dma(dev->dma); in sbcfdx_close()
818 kfree(sm->dma.ibuf); in sbcfdx_close()
819 kfree(sm->dma.obuf); in sbcfdx_close()
863 sm->dma.ifragsz = (sm->mode_rx->srate + 50)/100; in sbcfdx_sethw()
864 sm->dma.ofragsz = (sm->mode_tx->srate + 50)/100; in sbcfdx_sethw()
865 if (sm->dma.ifragsz < sm->mode_rx->overlap) in sbcfdx_sethw()
866 sm->dma.ifragsz = sm->mode_rx->overlap; in sbcfdx_sethw()
868 sm->dma.i16bit = 1; in sbcfdx_sethw()
869 sm->dma.o16bit = 0; in sbcfdx_sethw()
870 sm->dma.ifragsz <<= 1; in sbcfdx_sethw()
872 sm->dma.i16bit = 0; in sbcfdx_sethw()
873 sm->dma.o16bit = 1; in sbcfdx_sethw()
874 sm->dma.ofragsz <<= 1; in sbcfdx_sethw()