Lines Matching refs:dma_dac
312 serdma_t dma_dac, dma_adc; member
333 s->dma_dac.ready = 1; in prog_dmabuf_dac()
674 init_serdma(&s->dma_dac)) in dma_init()
685 s->dma_dac.descrtab[i].descr_a = M_DMA_SERRX_SOP | V_DMA_DSCRA_A_SIZE(1) | in dma_init()
686 (s->dma_dac.dma_buf_phys + i*FRAME_BYTES); in dma_init()
687 s->dma_dac.descrtab[i].descr_b = V_DMA_DSCRB_PKT_SIZE(FRAME_BYTES); in dma_init()
701 out64(s->dma_dac.descrtab_phys, SS_CSR(R_SER_DMA_DSCR_BASE_TX)); in dma_init()
731 serdma_t *d = &s->dma_dac; in serdma_reg_access()
746 interruptible_sleep_on(&s->dma_dac.reg_wait); in serdma_reg_access()
833 if (!(s->ena & FMODE_WRITE) && (s->dma_dac.mapped || in start_dac()
834 (s->dma_dac.count > 0 in start_dac()
835 && s->dma_dac.ready))) { in start_dac()
1084 serdma_t *d = &s->dma_dac; in cs4297a_update_ptr()
1626 if (s->dma_dac.mapped) in drain_dac()
1630 add_wait_queue(&s->dma_dac.wait, &wait); in drain_dac()
1632 (s->dma_dac.count > 0)) { in drain_dac()
1645 s->dma_dac.descrtab_phys) / sizeof(serdma_descr_t)); in drain_dac()
1646 s->dma_dac.hwptr = s->dma_dac.swptr = hwptr; in drain_dac()
1648 remove_wait_queue(&s->dma_dac.wait, &wait); in drain_dac()
1798 if (s->dma_dac.mapped) in cs4297a_write()
1800 if (!s->dma_dac.ready && (ret = prog_dmabuf_dac(s))) in cs4297a_write()
1806 serdma_t *d = &s->dma_dac; in cs4297a_write()
1876 wake_up(&s->dma_dac.reg_wait); in cs4297a_write()
1916 if(!s->dma_dac.ready && prog_dmabuf_dac(s)) in cs4297a_poll()
1918 poll_wait(file, &s->dma_dac.wait, wait); in cs4297a_poll()
1924 if(!s->dma_dac.ready && prog_dmabuf_adc(s)) in cs4297a_poll()
1931 if (s->dma_dac.mapped) { in cs4297a_poll()
1932 if (s->dma_dac.count >= in cs4297a_poll()
1933 (signed) s->dma_dac.fragsize) { in cs4297a_poll()
1934 if (s->dma_dac.wakeup) in cs4297a_poll()
1938 s->dma_dac.wakeup = 0; in cs4297a_poll()
1941 if ((signed) (s->dma_dac.sbufsz/2) >= s->dma_dac.count) in cs4297a_poll()
1986 mapped = ((file->f_mode & FMODE_WRITE) && s->dma_dac.mapped) || in cs4297a_ioctl()
2018 s->dma_dac.count = s->dma_dac.total_bytes = in cs4297a_ioctl()
2019 s->dma_dac.blocks = s->dma_dac.wakeup = 0; in cs4297a_ioctl()
2020 s->dma_dac.swptr = s->dma_dac.hwptr = in cs4297a_ioctl()
2022 s->dma_dac.descrtab_phys) / sizeof(serdma_descr_t)); in cs4297a_ioctl()
2028 s->dma_adc.blocks = s->dma_dac.wakeup = 0; in cs4297a_ioctl()
2055 s->dma_dac.ready = 0; in cs4297a_ioctl()
2077 s->dma_dac.ready = 0; in cs4297a_ioctl()
2119 s->dma_dac.ready = 0; in cs4297a_ioctl()
2165 if (!s->dma_dac.ready in cs4297a_ioctl()
2177 if (!s->dma_dac.ready && (val = prog_dmabuf_dac(s))) in cs4297a_ioctl()
2181 abinfo.fragsize = s->dma_dac.fragsize; in cs4297a_ioctl()
2182 if (s->dma_dac.mapped) in cs4297a_ioctl()
2183 abinfo.bytes = s->dma_dac.sbufsz; in cs4297a_ioctl()
2186 s->dma_dac.sbufsz - s->dma_dac.count; in cs4297a_ioctl()
2187 abinfo.fragstotal = s->dma_dac.numfrag; in cs4297a_ioctl()
2188 abinfo.fragments = abinfo.bytes >> s->dma_dac.fragshift; in cs4297a_ioctl()
2228 if(!s->dma_dac.ready && prog_dmabuf_dac(s)) in cs4297a_ioctl()
2232 val = s->dma_dac.count; in cs4297a_ioctl()
2272 if(!s->dma_dac.ready && prog_dmabuf_dac(s)) in cs4297a_ioctl()
2276 cinfo.bytes = s->dma_dac.total_bytes; in cs4297a_ioctl()
2277 if (s->dma_dac.mapped) { in cs4297a_ioctl()
2279 (cinfo.bytes >> s->dma_dac.fragshift) - in cs4297a_ioctl()
2280 s->dma_dac.blocks; in cs4297a_ioctl()
2281 s->dma_dac.blocks = in cs4297a_ioctl()
2282 cinfo.bytes >> s->dma_dac.fragshift; in cs4297a_ioctl()
2285 s->dma_dac.count >> s->dma_dac.fragshift; in cs4297a_ioctl()
2287 cinfo.ptr = s->dma_dac.hwptr; in cs4297a_ioctl()
2288 if (s->dma_dac.mapped) in cs4297a_ioctl()
2289 s->dma_dac.count &= s->dma_dac.fragsize - 1; in cs4297a_ioctl()
2297 return put_user(s->dma_dac.fragsize, (int *) arg); in cs4297a_ioctl()
2315 && s->dma_dac.subdivision)) return -EINVAL; in cs4297a_ioctl()
2323 s->dma_dac.subdivision = val; in cs4297a_ioctl()
2375 dealloc_dmabuf(s, &s->dma_dac); in cs4297a_release()
2496 s->dma_dac.ossfragshift = s->dma_dac.ossmaxfrags = in cs4297a_open()
2497 s->dma_dac.subdivision = 0; in cs4297a_open()
2649 init_waitqueue_head(&s->dma_dac.wait); in cs4297a_init()
2651 init_waitqueue_head(&s->dma_dac.reg_wait); in cs4297a_init()