Lines Matching refs:count1

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