Lines Matching full:count1

1144 	int result = 0, count1;
1175 count1 = runtime->buffer_size - runtime->hw_ptr;
1176 if (count1 > count)
1177 count1 = count;
1178 if (count1 > (int)(runtime->buffer_size - runtime->avail))
1179 count1 = runtime->buffer_size - runtime->avail;
1180 count1 = get_aligned_size(runtime, count1);
1181 if (!count1)
1183 memcpy(runtime->buffer + runtime->hw_ptr, buffer, count1);
1184 runtime->hw_ptr += count1;
1186 runtime->avail += count1;
1187 count -= count1;
1188 result += count1;
1190 buffer += count1;
1191 count1 = count;
1192 if (count1 > (int)(runtime->buffer_size - runtime->avail)) {
1193 count1 = runtime->buffer_size - runtime->avail;
1194 runtime->xruns += count - count1;
1196 if (count1 > 0) {
1197 memcpy(runtime->buffer, buffer, count1);
1198 runtime->hw_ptr = count1;
1199 runtime->avail += count1;
1200 result += count1;
1219 long result = 0, count1;
1227 count1 = runtime->buffer_size - runtime->appl_ptr;
1228 if (count1 > count)
1229 count1 = count;
1230 if (count1 > (int)runtime->avail)
1231 count1 = runtime->avail;
1235 runtime->appl_ptr += count1;
1237 runtime->avail -= count1;
1240 memcpy(kernelbuf + result, runtime->buffer + appl_ptr, count1);
1244 runtime->buffer + appl_ptr, count1))
1250 result += count1;
1251 count -= count1;
1271 int count1;
1309 count1 = snd_rawmidi_kernel_read1(substream,
1313 if (count1 < 0)
1314 return result > 0 ? result : count1;
1315 result += count1;
1316 buf += count1;
1317 count -= count1;
1354 int result, count1;
1371 count1 = runtime->buffer_size - runtime->hw_ptr;
1372 if (count1 > count)
1373 count1 = count;
1374 if (count1 > (int)(runtime->buffer_size - runtime->avail))
1375 count1 = runtime->buffer_size - runtime->avail;
1376 count1 = get_aligned_size(runtime, count1);
1377 if (!count1)
1379 memcpy(buffer, runtime->buffer + runtime->hw_ptr, count1);
1380 count -= count1;
1381 result += count1;
1383 if (count > (int)(runtime->buffer_size - runtime->avail - count1))
1384 count = runtime->buffer_size - runtime->avail - count1;
1388 memcpy(buffer + count1, runtime->buffer, count);
1521 long count1, result;
1540 count1 = runtime->buffer_size - runtime->appl_ptr;
1541 if (count1 > count)
1542 count1 = count;
1543 if (count1 > (long)runtime->avail)
1544 count1 = runtime->avail;
1548 runtime->appl_ptr += count1;
1550 runtime->avail -= count1;
1554 kernelbuf + result, count1);
1558 userbuf + result, count1)) {
1565 result += count1;
1566 count -= count1;
1569 count1 = runtime->avail < runtime->buffer_size;
1572 if (count1)
1588 int count1;
1626 count1 = snd_rawmidi_kernel_write1(substream, buf, NULL, count);
1627 if (count1 < 0)
1628 return result > 0 ? result : count1;
1629 result += count1;
1630 buf += count1;
1631 if ((size_t)count1 < count && (file->f_flags & O_NONBLOCK))
1633 count -= count1;