Lines Matching refs:bytes
615 long bytes = frames_to_bytes(runtime, frames); in snd_pcm_oss_bytes() local
617 return bytes; in snd_pcm_oss_bytes()
619 return runtime->oss.buffer_bytes * bytes / buffer_size; in snd_pcm_oss_bytes()
622 u64 bsize = (u64)runtime->oss.buffer_bytes * (u64)bytes; in snd_pcm_oss_bytes()
628 static long snd_pcm_alsa_frames(struct snd_pcm_substream *substream, long bytes) in snd_pcm_alsa_frames() argument
633 return bytes_to_frames(runtime, bytes); in snd_pcm_alsa_frames()
634 return bytes_to_frames(runtime, (buffer_size * bytes) / runtime->oss.buffer_bytes); in snd_pcm_alsa_frames()
1329 …d_pcm_oss_write2(struct snd_pcm_substream *substream, const char *buf, size_t bytes, int in_kernel) in snd_pcm_oss_write2() argument
1338 if (copy_from_user(runtime->oss.buffer, (const char __force __user *)buf, bytes)) in snd_pcm_oss_write2()
1342 frames = bytes / oss_frame_bytes; in snd_pcm_oss_write2()
1349 bytes = frames1 * oss_frame_bytes; in snd_pcm_oss_write2()
1353 frames = bytes_to_frames(runtime, bytes); in snd_pcm_oss_write2()
1357 bytes = frames_to_bytes(runtime, frames1); in snd_pcm_oss_write2()
1359 return bytes; in snd_pcm_oss_write2()
1362 …ize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const char __user *buf, size_t bytes) in snd_pcm_oss_write1() argument
1374 while (bytes > 0) { in snd_pcm_oss_write1()
1375 if (bytes < runtime->oss.period_bytes || runtime->oss.buffer_used > 0) { in snd_pcm_oss_write1()
1376 tmp = bytes; in snd_pcm_oss_write1()
1387 bytes -= tmp; in snd_pcm_oss_write1()
1395 runtime->oss.bytes += tmp; in snd_pcm_oss_write1()
1412 runtime->oss.bytes += tmp; in snd_pcm_oss_write1()
1414 bytes -= tmp; in snd_pcm_oss_write1()
1429 static ssize_t snd_pcm_oss_read2(struct snd_pcm_substream *substream, char *buf, size_t bytes, int … in snd_pcm_oss_read2() argument
1440 frames = bytes / oss_frame_bytes; in snd_pcm_oss_read2()
1447 bytes = frames1 * oss_frame_bytes; in snd_pcm_oss_read2()
1448 if (!in_kernel && copy_to_user(final_dst, buf, bytes)) in snd_pcm_oss_read2()
1453 frames = bytes_to_frames(runtime, bytes); in snd_pcm_oss_read2()
1457 bytes = frames_to_bytes(runtime, frames1); in snd_pcm_oss_read2()
1459 return bytes; in snd_pcm_oss_read2()
1462 …atic ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __user *buf, size_t bytes) in snd_pcm_oss_read1() argument
1474 while (bytes > 0) { in snd_pcm_oss_read1()
1475 if (bytes < runtime->oss.period_bytes || runtime->oss.buffer_used > 0) { in snd_pcm_oss_read1()
1480 runtime->oss.bytes += tmp; in snd_pcm_oss_read1()
1484 tmp = bytes; in snd_pcm_oss_read1()
1492 bytes -= tmp; in snd_pcm_oss_read1()
1500 runtime->oss.bytes += tmp; in snd_pcm_oss_read1()
1502 bytes -= tmp; in snd_pcm_oss_read1()
2133 info.bytes = snd_pcm_oss_bytes(substream, runtime->status->hw_ptr) & INT_MAX; in snd_pcm_oss_get_ptr()
2141 info.bytes = (runtime->oss.bytes - delay) & INT_MAX; in snd_pcm_oss_get_ptr()
2145 info.bytes = (runtime->oss.bytes + delay) & INT_MAX; in snd_pcm_oss_get_ptr()
2177 info.bytes = runtime->oss.period_bytes * runtime->oss.periods; in snd_pcm_oss_get_space()
2180 info.bytes = 0; in snd_pcm_oss_get_space()
2200 info.bytes = snd_pcm_oss_bytes(substream, avail) + fixup; in snd_pcm_oss_get_space()
2201 info.fragments = info.bytes / runtime->oss.period_bytes; in snd_pcm_oss_get_space()
2207 info.bytes, info.fragments, info.fragstotal, info.fragsize); in snd_pcm_oss_get_space()