Lines Matching refs:count1
1173 int result = 0, count1;
1207 count1 = runtime->buffer_size - runtime->hw_ptr;
1208 if (count1 > count)
1209 count1 = count;
1210 if (count1 > (int)(runtime->buffer_size - runtime->avail))
1211 count1 = runtime->buffer_size - runtime->avail;
1212 count1 = get_aligned_size(runtime, count1);
1213 if (!count1)
1215 memcpy(runtime->buffer + runtime->hw_ptr, buffer, count1);
1216 runtime->hw_ptr += count1;
1218 runtime->avail += count1;
1219 count -= count1;
1220 result += count1;
1222 buffer += count1;
1223 count1 = count;
1224 if (count1 > (int)(runtime->buffer_size - runtime->avail)) {
1225 count1 = runtime->buffer_size - runtime->avail;
1226 runtime->xruns += count - count1;
1228 if (count1 > 0) {
1229 memcpy(runtime->buffer, buffer, count1);
1230 runtime->hw_ptr = count1;
1231 runtime->avail += count1;
1232 result += count1;
1253 long result = 0, count1;
1261 count1 = runtime->buffer_size - runtime->appl_ptr;
1262 if (count1 > count)
1263 count1 = count;
1264 if (count1 > (int)runtime->avail)
1265 count1 = runtime->avail;
1269 runtime->appl_ptr += count1;
1271 runtime->avail -= count1;
1274 memcpy(kernelbuf + result, runtime->buffer + appl_ptr, count1);
1278 runtime->buffer + appl_ptr, count1))
1284 result += count1;
1285 count -= count1;
1305 int count1;
1343 count1 = snd_rawmidi_kernel_read1(substream,
1347 if (count1 < 0)
1348 return result > 0 ? result : count1;
1349 result += count1;
1350 buf += count1;
1351 count -= count1;
1393 int result, count1;
1410 count1 = runtime->buffer_size - runtime->hw_ptr;
1411 if (count1 > count)
1412 count1 = count;
1413 if (count1 > (int)(runtime->buffer_size - runtime->avail))
1414 count1 = runtime->buffer_size - runtime->avail;
1415 count1 = get_aligned_size(runtime, count1);
1416 if (!count1)
1418 memcpy(buffer, runtime->buffer + runtime->hw_ptr, count1);
1419 count -= count1;
1420 result += count1;
1422 if (count > (int)(runtime->buffer_size - runtime->avail - count1))
1423 count = runtime->buffer_size - runtime->avail - count1;
1427 memcpy(buffer + count1, runtime->buffer, count);
1582 long count1, result;
1601 count1 = runtime->buffer_size - runtime->appl_ptr;
1602 if (count1 > count)
1603 count1 = count;
1604 if (count1 > (long)runtime->avail)
1605 count1 = runtime->avail;
1609 runtime->appl_ptr += count1;
1611 runtime->avail -= count1;
1615 kernelbuf + result, count1);
1619 userbuf + result, count1)) {
1626 result += count1;
1627 count -= count1;
1630 count1 = runtime->avail < runtime->buffer_size;
1633 if (count1)
1649 int count1;
1687 count1 = snd_rawmidi_kernel_write1(substream, buf, NULL, count);
1688 if (count1 < 0)
1689 return result > 0 ? result : count1;
1690 result += count1;
1691 buf += count1;
1692 if ((size_t)count1 < count && (file->f_flags & O_NONBLOCK))
1694 count -= count1;