Lines Matching defs:bytes
581 long bytes = frames_to_bytes(runtime, frames);
583 return bytes;
585 return runtime->oss.buffer_bytes * bytes / buffer_size;
588 u64 bsize = (u64)runtime->oss.buffer_bytes * (u64)bytes;
594 static long snd_pcm_alsa_frames(struct snd_pcm_substream *substream, long bytes)
599 return bytes_to_frames(runtime, bytes);
600 return bytes_to_frames(runtime, (buffer_size * bytes) / runtime->oss.buffer_bytes);
1056 pdprintf("oss: period bytes = %i, buffer bytes = %i\n",
1356 static ssize_t snd_pcm_oss_write2(struct snd_pcm_substream *substream, const char *buf, size_t bytes, int in_kernel)
1365 if (copy_from_user(runtime->oss.buffer, (const char __force __user *)buf, bytes))
1369 frames = bytes / oss_frame_bytes;
1376 bytes = frames1 * oss_frame_bytes;
1380 frames = bytes_to_frames(runtime, bytes);
1384 bytes = frames_to_bytes(runtime, frames1);
1386 return bytes;
1389 static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const char __user *buf, size_t bytes)
1399 while (bytes > 0) {
1407 if (bytes < runtime->oss.period_bytes || runtime->oss.buffer_used > 0) {
1408 tmp = bytes;
1419 bytes -= tmp;
1427 runtime->oss.bytes += tmp;
1444 runtime->oss.bytes += tmp;
1446 bytes -= tmp;
1466 static ssize_t snd_pcm_oss_read2(struct snd_pcm_substream *substream, char *buf, size_t bytes, int in_kernel)
1477 frames = bytes / oss_frame_bytes;
1484 bytes = frames1 * oss_frame_bytes;
1485 if (!in_kernel && copy_to_user(final_dst, buf, bytes))
1490 frames = bytes_to_frames(runtime, bytes);
1494 bytes = frames_to_bytes(runtime, frames1);
1496 return bytes;
1499 static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __user *buf, size_t bytes)
1509 while (bytes > 0) {
1517 if (bytes < runtime->oss.period_bytes || runtime->oss.buffer_used > 0) {
1522 runtime->oss.bytes += tmp;
1526 tmp = bytes;
1534 bytes -= tmp;
1542 runtime->oss.bytes += tmp;
1544 bytes -= tmp;
2228 info.bytes = snd_pcm_oss_bytes(substream, runtime->status->hw_ptr) & INT_MAX;
2236 info.bytes = (runtime->oss.bytes - delay) & INT_MAX;
2240 info.bytes = (runtime->oss.bytes + delay) & INT_MAX;
2274 info.bytes = runtime->oss.period_bytes * runtime->oss.periods;
2277 info.bytes = 0;
2297 info.bytes = snd_pcm_oss_bytes(substream, avail) + fixup;
2298 info.fragments = info.bytes / runtime->oss.period_bytes;
2303 "pcm_oss: space: bytes = %i, fragments = %i, fragstotal = %i, fragsize = %i\n",
2304 info.bytes, info.fragments, info.fragstotal, info.fragsize);
2776 "pcm_oss: read %li bytes (returned %li bytes)\n",
2796 pcm_dbg(substream->pcm, "pcm_oss: write %li bytes (wrote %li bytes)\n",
2931 pr_debug("pcm_oss: mmap ok, bytes = 0x%x\n",