• Home
  • Raw
  • Download

Lines Matching full:count1

980 	int result = 0, count1;  in snd_rawmidi_receive()  local
1003 count1 = runtime->buffer_size - runtime->hw_ptr; in snd_rawmidi_receive()
1004 if (count1 > count) in snd_rawmidi_receive()
1005 count1 = count; in snd_rawmidi_receive()
1006 if (count1 > (int)(runtime->buffer_size - runtime->avail)) in snd_rawmidi_receive()
1007 count1 = runtime->buffer_size - runtime->avail; in snd_rawmidi_receive()
1008 memcpy(runtime->buffer + runtime->hw_ptr, buffer, count1); in snd_rawmidi_receive()
1009 runtime->hw_ptr += count1; in snd_rawmidi_receive()
1011 runtime->avail += count1; in snd_rawmidi_receive()
1012 count -= count1; in snd_rawmidi_receive()
1013 result += count1; in snd_rawmidi_receive()
1015 buffer += count1; in snd_rawmidi_receive()
1016 count1 = count; in snd_rawmidi_receive()
1017 if (count1 > (int)(runtime->buffer_size - runtime->avail)) { in snd_rawmidi_receive()
1018 count1 = runtime->buffer_size - runtime->avail; in snd_rawmidi_receive()
1019 runtime->xruns += count - count1; in snd_rawmidi_receive()
1021 if (count1 > 0) { in snd_rawmidi_receive()
1022 memcpy(runtime->buffer, buffer, count1); in snd_rawmidi_receive()
1023 runtime->hw_ptr = count1; in snd_rawmidi_receive()
1024 runtime->avail += count1; in snd_rawmidi_receive()
1025 result += count1; in snd_rawmidi_receive()
1045 long result = 0, count1; in snd_rawmidi_kernel_read1() local
1053 count1 = runtime->buffer_size - runtime->appl_ptr; in snd_rawmidi_kernel_read1()
1054 if (count1 > count) in snd_rawmidi_kernel_read1()
1055 count1 = count; in snd_rawmidi_kernel_read1()
1056 if (count1 > (int)runtime->avail) in snd_rawmidi_kernel_read1()
1057 count1 = runtime->avail; in snd_rawmidi_kernel_read1()
1061 runtime->appl_ptr += count1; in snd_rawmidi_kernel_read1()
1063 runtime->avail -= count1; in snd_rawmidi_kernel_read1()
1066 memcpy(kernelbuf + result, runtime->buffer + appl_ptr, count1); in snd_rawmidi_kernel_read1()
1070 runtime->buffer + appl_ptr, count1)) in snd_rawmidi_kernel_read1()
1076 result += count1; in snd_rawmidi_kernel_read1()
1077 count -= count1; in snd_rawmidi_kernel_read1()
1097 int count1; in snd_rawmidi_read() local
1135 count1 = snd_rawmidi_kernel_read1(substream, in snd_rawmidi_read()
1139 if (count1 < 0) in snd_rawmidi_read()
1140 return result > 0 ? result : count1; in snd_rawmidi_read()
1141 result += count1; in snd_rawmidi_read()
1142 buf += count1; in snd_rawmidi_read()
1143 count -= count1; in snd_rawmidi_read()
1183 int result, count1; in __snd_rawmidi_transmit_peek() local
1200 count1 = runtime->buffer_size - runtime->hw_ptr; in __snd_rawmidi_transmit_peek()
1201 if (count1 > count) in __snd_rawmidi_transmit_peek()
1202 count1 = count; in __snd_rawmidi_transmit_peek()
1203 if (count1 > (int)(runtime->buffer_size - runtime->avail)) in __snd_rawmidi_transmit_peek()
1204 count1 = runtime->buffer_size - runtime->avail; in __snd_rawmidi_transmit_peek()
1205 memcpy(buffer, runtime->buffer + runtime->hw_ptr, count1); in __snd_rawmidi_transmit_peek()
1206 count -= count1; in __snd_rawmidi_transmit_peek()
1207 result += count1; in __snd_rawmidi_transmit_peek()
1209 if (count > (int)(runtime->buffer_size - runtime->avail - count1)) in __snd_rawmidi_transmit_peek()
1210 count = runtime->buffer_size - runtime->avail - count1; in __snd_rawmidi_transmit_peek()
1211 memcpy(buffer + count1, runtime->buffer, count); in __snd_rawmidi_transmit_peek()
1361 long count1, result; in snd_rawmidi_kernel_write1() local
1380 count1 = runtime->buffer_size - runtime->appl_ptr; in snd_rawmidi_kernel_write1()
1381 if (count1 > count) in snd_rawmidi_kernel_write1()
1382 count1 = count; in snd_rawmidi_kernel_write1()
1383 if (count1 > (long)runtime->avail) in snd_rawmidi_kernel_write1()
1384 count1 = runtime->avail; in snd_rawmidi_kernel_write1()
1388 runtime->appl_ptr += count1; in snd_rawmidi_kernel_write1()
1390 runtime->avail -= count1; in snd_rawmidi_kernel_write1()
1394 kernelbuf + result, count1); in snd_rawmidi_kernel_write1()
1398 userbuf + result, count1)) { in snd_rawmidi_kernel_write1()
1405 result += count1; in snd_rawmidi_kernel_write1()
1406 count -= count1; in snd_rawmidi_kernel_write1()
1409 count1 = runtime->avail < runtime->buffer_size; in snd_rawmidi_kernel_write1()
1412 if (count1) in snd_rawmidi_kernel_write1()
1428 int count1; in snd_rawmidi_write() local
1466 count1 = snd_rawmidi_kernel_write1(substream, buf, NULL, count); in snd_rawmidi_write()
1467 if (count1 < 0) in snd_rawmidi_write()
1468 return result > 0 ? result : count1; in snd_rawmidi_write()
1469 result += count1; in snd_rawmidi_write()
1470 buf += count1; in snd_rawmidi_write()
1471 if ((size_t)count1 < count && (file->f_flags & O_NONBLOCK)) in snd_rawmidi_write()
1473 count -= count1; in snd_rawmidi_write()