Lines Matching refs:count
252 int count; member
841 (s->dma_dac.count > 0 in start_dac()
889 (s->dma_adc.mapped || s->dma_adc.count <= in start_adc()
984 if (d->count && (d->sb_hwptr == d->sb_swptr)) { in cs4297a_update_ptr()
1006 d->count += good_diff * FRAME_SAMPLE_BYTES; in cs4297a_update_ptr()
1007 if (d->count > d->sbufsz) { in cs4297a_update_ptr()
1013 if (d->count >= (signed) d->fragsize) in cs4297a_update_ptr()
1016 if (d->count > 0) { in cs4297a_update_ptr()
1019 … "cs4297a: update count -> %d\n", d->count)); in cs4297a_update_ptr()
1078 d->total_bytes, d->count)); in cs4297a_update_ptr()
1097 d->hwptr, hwptr, d->swptr, diff, d->count)); in cs4297a_update_ptr()
1102 d->count += diff * FRAME_SAMPLE_BYTES; in cs4297a_update_ptr()
1103 if (d->count >= d->fragsize) { in cs4297a_update_ptr()
1106 if (d->count > d->sbufsz) in cs4297a_update_ptr()
1107 d->count &= d->sbufsz - 1; in cs4297a_update_ptr()
1110 d->count -= diff * FRAME_SAMPLE_BYTES; in cs4297a_update_ptr()
1111 if (d->count <= 0) { in cs4297a_update_ptr()
1123 if (d->count < 0) { in cs4297a_update_ptr()
1126 d->count = 0; in cs4297a_update_ptr()
1130 } else if (d->count <= in cs4297a_update_ptr()
1141 if ( (d->count <= (signed) d->sbufsz/2) || intflag) in cs4297a_update_ptr()
1145 "cs4297a: update count -> %d\n", d->count)); in cs4297a_update_ptr()
1152 d->total_bytes, d->count)); in cs4297a_update_ptr()
1632 int count; in drain_dac() local
1639 while ((count = __raw_readq(SS_CSR(R_SER_DMA_DSCR_COUNT_TX))) || in drain_dac()
1640 (s->dma_dac.count > 0)) { in drain_dac()
1644 tmo = ((count * FRAME_TX_US) * HZ) / 1000000; in drain_dac()
1664 static ssize_t cs4297a_read(struct file *file, char *buffer, size_t count, in cs4297a_read() argument
1675 printk(KERN_INFO "cs4297a: cs4297a_read()+ %d \n", count)); in cs4297a_read()
1682 if (!access_ok(VERIFY_WRITE, buffer, count)) in cs4297a_read()
1694 while (count > 0) { in cs4297a_read()
1697 count, s->dma_adc.count, in cs4297a_read()
1705 count_fr = s->dma_adc.count / FRAME_SAMPLE_BYTES; in cs4297a_read()
1722 if (cnt_by > (count * 2)) { in cs4297a_read()
1723 cnt = (count * 2) / FRAME_SAMPLE_BYTES; in cs4297a_read()
1724 cnt_by = count * 2; in cs4297a_read()
1727 if (cnt_by > count) { in cs4297a_read()
1728 cnt = count / FRAME_SAMPLE_BYTES; in cs4297a_read()
1729 cnt_by = count; in cs4297a_read()
1757 "_read() copy_to cnt=%d count=%d ", cnt_by, count)); in cs4297a_read()
1760 s->dma_adc.sbufsz, s->dma_adc.count, in cs4297a_read()
1771 s->dma_adc.count -= cnt_by; in cs4297a_read()
1776 count -= copied; in cs4297a_read()
1788 size_t count, loff_t * ppos) in cs4297a_write() argument
1799 count)); in cs4297a_write()
1806 if (!access_ok(VERIFY_READ, buffer, count)) in cs4297a_write()
1809 while (count > 0) { in cs4297a_write()
1819 if (d->count < 0) { in cs4297a_write()
1820 d->count = 0; in cs4297a_write()
1832 if (d->count + cnt > d->sbufsz) in cs4297a_write()
1833 cnt = d->sbufsz - d->count; in cs4297a_write()
1835 if (cnt > count) in cs4297a_write()
1836 cnt = count; in cs4297a_write()
1891 d->count += cnt; in cs4297a_write()
1894 count -= cnt; in cs4297a_write()
1936 if (s->dma_dac.count >= in cs4297a_poll()
1945 if ((signed) (s->dma_dac.sbufsz/2) >= s->dma_dac.count) in cs4297a_poll()
1950 if (s->dma_adc.count >= (signed) s->dma_adc.fragsize) in cs4297a_poll()
1953 if (s->dma_adc.count > 0) in cs4297a_poll()
2022 s->dma_dac.count = s->dma_dac.total_bytes = in cs4297a_ioctl()
2031 s->dma_adc.count = s->dma_adc.total_bytes = in cs4297a_ioctl()
2190 s->dma_dac.sbufsz - s->dma_dac.count; in cs4297a_ioctl()
2210 abinfo.bytes = s->dma_adc.count / 2; in cs4297a_ioctl()
2216 abinfo.bytes = s->dma_adc.count; in cs4297a_ioctl()
2238 val = s->dma_dac.count; in cs4297a_ioctl()
2259 s->dma_adc.count / in cs4297a_ioctl()
2263 s->dma_adc.count >> s->dma_adc. in cs4297a_ioctl()
2271 s->dma_adc.count &= s->dma_adc.fragsize - 1; in cs4297a_ioctl()
2291 s->dma_dac.count >> s->dma_dac.fragshift; in cs4297a_ioctl()
2295 s->dma_dac.count &= s->dma_dac.fragsize - 1; in cs4297a_ioctl()
2591 s->dma_adc.count = 0; in cs4297a_interrupt()