Lines Matching refs:bytes

581 	long bytes = frames_to_bytes(runtime, frames);  in snd_pcm_oss_bytes()  local
583 return bytes; in snd_pcm_oss_bytes()
585 return runtime->oss.buffer_bytes * bytes / buffer_size; in snd_pcm_oss_bytes()
588 u64 bsize = (u64)runtime->oss.buffer_bytes * (u64)bytes; in snd_pcm_oss_bytes()
594 static long snd_pcm_alsa_frames(struct snd_pcm_substream *substream, long bytes) in snd_pcm_alsa_frames() argument
599 return bytes_to_frames(runtime, bytes); in snd_pcm_alsa_frames()
600 return bytes_to_frames(runtime, (buffer_size * bytes) / runtime->oss.buffer_bytes); in snd_pcm_alsa_frames()
1356 …d_pcm_oss_write2(struct snd_pcm_substream *substream, const char *buf, size_t bytes, int in_kernel) in snd_pcm_oss_write2() argument
1365 if (copy_from_user(runtime->oss.buffer, (const char __force __user *)buf, bytes)) in snd_pcm_oss_write2()
1369 frames = bytes / oss_frame_bytes; in snd_pcm_oss_write2()
1376 bytes = frames1 * oss_frame_bytes; in snd_pcm_oss_write2()
1380 frames = bytes_to_frames(runtime, bytes); in snd_pcm_oss_write2()
1384 bytes = frames_to_bytes(runtime, frames1); in snd_pcm_oss_write2()
1386 return bytes; in snd_pcm_oss_write2()
1389 …ize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const char __user *buf, size_t bytes) in snd_pcm_oss_write1() argument
1399 while (bytes > 0) { in snd_pcm_oss_write1()
1407 if (bytes < runtime->oss.period_bytes || runtime->oss.buffer_used > 0) { in snd_pcm_oss_write1()
1408 tmp = bytes; in snd_pcm_oss_write1()
1419 bytes -= tmp; in snd_pcm_oss_write1()
1427 runtime->oss.bytes += tmp; in snd_pcm_oss_write1()
1444 runtime->oss.bytes += tmp; in snd_pcm_oss_write1()
1446 bytes -= tmp; in snd_pcm_oss_write1()
1466 static ssize_t snd_pcm_oss_read2(struct snd_pcm_substream *substream, char *buf, size_t bytes, int … in snd_pcm_oss_read2() argument
1477 frames = bytes / oss_frame_bytes; in snd_pcm_oss_read2()
1484 bytes = frames1 * oss_frame_bytes; in snd_pcm_oss_read2()
1485 if (!in_kernel && copy_to_user(final_dst, buf, bytes)) in snd_pcm_oss_read2()
1490 frames = bytes_to_frames(runtime, bytes); in snd_pcm_oss_read2()
1494 bytes = frames_to_bytes(runtime, frames1); in snd_pcm_oss_read2()
1496 return bytes; in snd_pcm_oss_read2()
1499 …atic ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __user *buf, size_t bytes) in snd_pcm_oss_read1() argument
1509 while (bytes > 0) { in snd_pcm_oss_read1()
1517 if (bytes < runtime->oss.period_bytes || runtime->oss.buffer_used > 0) { in snd_pcm_oss_read1()
1522 runtime->oss.bytes += tmp; in snd_pcm_oss_read1()
1526 tmp = bytes; in snd_pcm_oss_read1()
1534 bytes -= tmp; in snd_pcm_oss_read1()
1542 runtime->oss.bytes += tmp; in snd_pcm_oss_read1()
1544 bytes -= tmp; in snd_pcm_oss_read1()
2229 info.bytes = snd_pcm_oss_bytes(substream, runtime->status->hw_ptr) & INT_MAX; in snd_pcm_oss_get_ptr()
2237 info.bytes = (runtime->oss.bytes - delay) & INT_MAX; in snd_pcm_oss_get_ptr()
2241 info.bytes = (runtime->oss.bytes + delay) & INT_MAX; in snd_pcm_oss_get_ptr()
2275 info.bytes = runtime->oss.period_bytes * runtime->oss.periods; in snd_pcm_oss_get_space()
2278 info.bytes = 0; in snd_pcm_oss_get_space()
2298 info.bytes = snd_pcm_oss_bytes(substream, avail) + fixup; in snd_pcm_oss_get_space()
2299 info.fragments = info.bytes / runtime->oss.period_bytes; in snd_pcm_oss_get_space()
2305 info.bytes, info.fragments, info.fragstotal, info.fragsize); in snd_pcm_oss_get_space()