Lines Matching refs:dma_dac
133 } dma_dac, dma_adc;
342 struct dmabuf *dac = &s->dma_dac;
392 struct dmabuf *dac = &s->dma_dac;
445 struct dmabuf *db = &s->dma_dac;
580 struct dmabuf *db = &s->dma_dac;
709 return prog_dmabuf(s, &s->dma_dac);
716 struct dmabuf *db = &s->dma_dac;
848 if (s->dma_dac.mapped || !s->dma_dac.ready || s->dma_dac.stopped)
853 count = s->dma_dac.count;
855 if (count <= s->dma_dac.fragsize)
862 48000 : s->dma_dac.sample_rate);
863 tmo /= s->dma_dac.dma_bytes_per_sample;
1115 struct dmabuf *db = &s->dma_dac;
1219 if (!s->dma_dac.ready)
1221 poll_wait(file, &s->dma_dac.wait, wait);
1236 if (s->dma_dac.mapped) {
1237 if (s->dma_dac.count >=
1238 (signed)s->dma_dac.dma_fragsize)
1241 if ((signed) s->dma_dac.dmasize >=
1242 s->dma_dac.count + (signed)s->dma_dac.dma_fragsize)
1261 db = &s->dma_dac;
1352 mapped = ((file->f_mode & FMODE_WRITE) && s->dma_dac.mapped) ||
1386 s->dma_dac.count = s->dma_dac.total_bytes = 0;
1387 s->dma_dac.nextIn = s->dma_dac.nextOut =
1388 s->dma_dac.rawbuf;
1420 s->dma_dac.sample_rate,
1434 s->dma_dac.num_channels = val ? 2 : 1;
1515 s->dma_dac.num_channels = val;
1543 s->dma_dac.sample_size = 16;
1546 s->dma_dac.sample_size = 8;
1556 val = (s->dma_dac.sample_size == 16) ?
1569 if (file->f_mode & FMODE_WRITE && !s->dma_dac.stopped)
1598 abinfo.fragsize = s->dma_dac.fragsize;
1600 count = s->dma_dac.count;
1601 count -= dma_count_done(&s->dma_dac);
1605 abinfo.bytes = (s->dma_dac.dmasize - count) /
1606 s->dma_dac.cnt_factor;
1607 abinfo.fragstotal = s->dma_dac.numfrag;
1608 abinfo.fragments = abinfo.bytes >> s->dma_dac.fragshift;
1639 count = s->dma_dac.count;
1640 count -= dma_count_done(&s->dma_dac);
1644 count /= s->dma_dac.cnt_factor;
1674 cinfo.bytes = s->dma_dac.total_bytes;
1675 count = s->dma_dac.count;
1676 if (!s->dma_dac.stopped) {
1677 diff = dma_count_done(&s->dma_dac);
1680 cinfo.ptr = virt_to_phys(s->dma_dac.nextOut) + diff -
1681 virt_to_phys(s->dma_dac.rawbuf);
1683 cinfo.ptr = virt_to_phys(s->dma_dac.nextOut) -
1684 virt_to_phys(s->dma_dac.rawbuf);
1685 if (s->dma_dac.mapped)
1686 s->dma_dac.count &= (s->dma_dac.dma_fragsize-1);
1690 cinfo.blocks = count >> s->dma_dac.fragshift;
1695 return put_user(s->dma_dac.fragsize, (int *) arg);
1717 s->dma_dac.ossfragshift = val & 0xffff;
1718 s->dma_dac.ossmaxfrags = (val >> 16) & 0xffff;
1719 if (s->dma_dac.ossfragshift < 4)
1720 s->dma_dac.ossfragshift = 4;
1721 if (s->dma_dac.ossfragshift > 15)
1722 s->dma_dac.ossfragshift = 15;
1723 if (s->dma_dac.ossmaxfrags < 4)
1724 s->dma_dac.ossmaxfrags = 4;
1732 (file->f_mode & FMODE_WRITE && s->dma_dac.subdivision))
1746 s->dma_dac.subdivision = val;
1755 s->dma_dac.sample_rate,
1762 return put_user(s->dma_dac.num_channels, (int *)arg);
1768 return put_user(s->dma_dac.sample_size, (int *)arg);
1840 s->dma_dac.ossfragshift = s->dma_dac.ossmaxfrags =
1841 s->dma_dac.subdivision = s->dma_dac.total_bytes = 0;
1842 s->dma_dac.num_channels = 1;
1843 s->dma_dac.sample_size = 8;
1846 s->dma_dac.sample_size = 16;
1884 kfree(s->dma_dac.rawbuf);
1885 s->dma_dac.rawbuf = NULL;
1925 init_waitqueue_head(&s->dma_dac.wait);
1948 if ((s->dma_dac.dmanr = au1xxx_dbdma_chan_alloc(DBDMA_MEM_CHAN,
1953 au1xxx_dbdma_set_devwidth(s->dma_dac.dmanr, 16);
1954 if (au1xxx_dbdma_ring_alloc(s->dma_dac.dmanr,
2085 au1xxx_dbdma_chan_free(s->dma_dac.dmanr);
2102 au1xxx_dbdma_chan_free(s->dma_dac.dmanr);