Lines Matching refs:dma_dac
304 serdma_t dma_dac, dma_adc;
323 s->dma_dac.ready = 1;
661 init_serdma(&s->dma_dac))
672 s->dma_dac.descrtab[i].descr_a = M_DMA_SERRX_SOP | V_DMA_DSCRA_A_SIZE(1) |
673 (s->dma_dac.dma_buf_phys + i*FRAME_BYTES);
674 s->dma_dac.descrtab[i].descr_b = V_DMA_DSCRB_PKT_SIZE(FRAME_BYTES);
688 __raw_writeq(s->dma_dac.descrtab_phys, SS_CSR(R_SER_DMA_DSCR_BASE_TX));
718 serdma_t *d = &s->dma_dac;
733 interruptible_sleep_on(&s->dma_dac.reg_wait);
813 if (!(s->ena & FMODE_WRITE) && (s->dma_dac.mapped ||
814 (s->dma_dac.count > 0
815 && s->dma_dac.ready))) {
1064 serdma_t *d = &s->dma_dac;
1607 if (s->dma_dac.mapped)
1611 add_wait_queue(&s->dma_dac.wait, &wait);
1613 (s->dma_dac.count > 0)) {
1626 s->dma_dac.descrtab_phys) / sizeof(serdma_descr_t));
1627 s->dma_dac.hwptr = s->dma_dac.swptr = hwptr;
1629 remove_wait_queue(&s->dma_dac.wait, &wait);
1775 if (s->dma_dac.mapped)
1777 if (!s->dma_dac.ready && (ret = prog_dmabuf_dac(s)))
1783 serdma_t *d = &s->dma_dac;
1853 wake_up(&s->dma_dac.reg_wait);
1893 if(!s->dma_dac.ready && prog_dmabuf_dac(s))
1895 poll_wait(file, &s->dma_dac.wait, wait);
1901 if(!s->dma_dac.ready && prog_dmabuf_adc(s))
1908 if (s->dma_dac.mapped) {
1909 if (s->dma_dac.count >=
1910 (signed) s->dma_dac.fragsize) {
1911 if (s->dma_dac.wakeup)
1915 s->dma_dac.wakeup = 0;
1918 if ((signed) (s->dma_dac.sbufsz/2) >= s->dma_dac.count)
1963 mapped = ((file->f_mode & FMODE_WRITE) && s->dma_dac.mapped) ||
1995 s->dma_dac.count = s->dma_dac.total_bytes =
1996 s->dma_dac.blocks = s->dma_dac.wakeup = 0;
1997 s->dma_dac.swptr = s->dma_dac.hwptr =
1999 s->dma_dac.descrtab_phys) / sizeof(serdma_descr_t));
2005 s->dma_adc.blocks = s->dma_dac.wakeup = 0;
2032 s->dma_dac.ready = 0;
2054 s->dma_dac.ready = 0;
2096 s->dma_dac.ready = 0;
2142 if (!s->dma_dac.ready
2154 if (!s->dma_dac.ready && (val = prog_dmabuf_dac(s)))
2158 abinfo.fragsize = s->dma_dac.fragsize;
2159 if (s->dma_dac.mapped)
2160 abinfo.bytes = s->dma_dac.sbufsz;
2163 s->dma_dac.sbufsz - s->dma_dac.count;
2164 abinfo.fragstotal = s->dma_dac.numfrag;
2165 abinfo.fragments = abinfo.bytes >> s->dma_dac.fragshift;
2207 if(!s->dma_dac.ready && prog_dmabuf_dac(s))
2211 val = s->dma_dac.count;
2251 if(!s->dma_dac.ready && prog_dmabuf_dac(s))
2255 cinfo.bytes = s->dma_dac.total_bytes;
2256 if (s->dma_dac.mapped) {
2258 (cinfo.bytes >> s->dma_dac.fragshift) -
2259 s->dma_dac.blocks;
2260 s->dma_dac.blocks =
2261 cinfo.bytes >> s->dma_dac.fragshift;
2264 s->dma_dac.count >> s->dma_dac.fragshift;
2266 cinfo.ptr = s->dma_dac.hwptr;
2267 if (s->dma_dac.mapped)
2268 s->dma_dac.count &= s->dma_dac.fragsize - 1;
2276 return put_user(s->dma_dac.fragsize, (int *) arg);
2294 && s->dma_dac.subdivision)) return -EINVAL;
2302 s->dma_dac.subdivision = val;
2364 dealloc_dmabuf(s, &s->dma_dac);
2482 s->dma_dac.ossfragshift = s->dma_dac.ossmaxfrags =
2483 s->dma_dac.subdivision = 0;
2619 init_waitqueue_head(&s->dma_dac.wait);
2621 init_waitqueue_head(&s->dma_dac.reg_wait);