• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/linux/linux/drivers/sound/cs4281/

Lines Matching refs:cnt

2903 				unsigned *hwsrc, unsigned cnt,
2909 "cs_copy_to_user()+ fmt=0x%x fmt_o=0x%x cnt=%d dest=0x%.8x\n",
2911 (unsigned) cnt, (unsigned) dest));
2913 if (cnt > s->dma_adc.dmasize) {
2914 cnt = s->dma_adc.dmasize;
2916 if (!cnt) {
2922 *copied = cnt / 2;
2925 CopySamples(s->tmpbuff, (void *) hwsrc, cnt,
2929 cnt = cnt / 2;
2932 if (copy_to_user(dest, src, cnt)) {
2936 *copied = cnt;
2938 "cs4281: cs_copy_to_user()- copied bytes is %d \n", cnt));
2952 int cnt;
2971 // "cnt" is the running total of each read from the buffer (changes each loop)
2987 // cnt is the amount of unread bytes from the end of the
2989 cnt = s->dma_adc.dmasize - swptr;
2994 // have not been read, then set the "cnt" (unread bytes) to the
2997 if (s->dma_adc.count < cnt)
2998 cnt = s->dma_adc.count;
3005 if (cnt > (count * 2))
3006 cnt = (count * 2);
3008 if (cnt > count)
3009 cnt = count;
3012 // "cnt" NOW is the smaller of the amount that will be read,
3017 if (cnt <= 0) {
3033 // the "cnt" is the number of bytes to read.
3036 "_read() copy_to cnt=%d count=%d ", cnt, count));
3043 (s, buffer, s->dma_adc.rawbuf + swptr, cnt, &copied))
3045 swptr = (swptr + cnt) % s->dma_adc.dmasize;
3048 s->dma_adc.count -= cnt;
3069 int cnt;
3099 cnt = s->dma_dac.dmasize - swptr;
3100 if (s->dma_dac.count + cnt > s->dma_dac.dmasize)
3101 cnt = s->dma_dac.dmasize - s->dma_dac.count;
3103 if (cnt > count)
3104 cnt = count;
3105 if (cnt <= 0) {
3114 if (copy_from_user(s->dma_dac.rawbuf + swptr, buffer, cnt))
3116 swptr = (swptr + cnt) % s->dma_dac.dmasize;
3119 s->dma_dac.count += cnt;
3122 count -= cnt;
3123 buffer += cnt;
3124 ret += cnt;
3931 int cnt;
3942 cnt = MIDIINBUF - ptr;
3943 if (s->midi.icnt < cnt)
3944 cnt = s->midi.icnt;
3946 if (cnt > count)
3947 cnt = count;
3948 if (cnt <= 0) {
3956 if (copy_to_user(buffer, s->midi.ibuf + ptr, cnt))
3958 ptr = (ptr + cnt) % MIDIINBUF;
3961 s->midi.icnt -= cnt;
3963 count -= cnt;
3964 buffer += cnt;
3965 ret += cnt;
3979 int cnt;
3990 cnt = MIDIOUTBUF - ptr;
3991 if (s->midi.ocnt + cnt > MIDIOUTBUF)
3992 cnt = MIDIOUTBUF - s->midi.ocnt;
3993 if (cnt <= 0)
3996 if (cnt > count)
3997 cnt = count;
3998 if (cnt <= 0) {
4006 if (copy_from_user(s->midi.obuf + ptr, buffer, cnt))
4008 ptr = (ptr + cnt) % MIDIOUTBUF;
4011 s->midi.ocnt += cnt;
4013 count -= cnt;
4014 buffer += cnt;
4015 ret += cnt;