Lines Matching refs:frames

56 	snd_pcm_uframes_t frames, ofs, transfer;  in snd_pcm_playback_silence()  local
75 frames = runtime->silence_threshold - noise_dist; in snd_pcm_playback_silence()
76 if (frames > runtime->silence_size) in snd_pcm_playback_silence()
77 frames = runtime->silence_size; in snd_pcm_playback_silence()
89 frames = new_hw_ptr - ofs; in snd_pcm_playback_silence()
90 if ((snd_pcm_sframes_t)frames < 0) in snd_pcm_playback_silence()
91 frames += runtime->boundary; in snd_pcm_playback_silence()
92 runtime->silence_filled -= frames; in snd_pcm_playback_silence()
100 frames = runtime->buffer_size - runtime->silence_filled; in snd_pcm_playback_silence()
102 if (snd_BUG_ON(frames > runtime->buffer_size)) in snd_pcm_playback_silence()
104 if (frames == 0) in snd_pcm_playback_silence()
107 while (frames > 0) { in snd_pcm_playback_silence()
108 transfer = ofs + frames > runtime->buffer_size ? runtime->buffer_size - ofs : frames; in snd_pcm_playback_silence()
137 frames -= transfer; in snd_pcm_playback_silence()
1992 snd_pcm_uframes_t frames) in snd_pcm_lib_write_transfer() argument
1998 if ((err = substream->ops->copy(substream, -1, hwoff, buf, frames)) < 0) in snd_pcm_lib_write_transfer()
2002 if (copy_from_user(hwbuf, buf, frames_to_bytes(runtime, frames))) in snd_pcm_lib_write_transfer()
2049 snd_pcm_uframes_t frames, appl_ptr, appl_ofs; in snd_pcm_lib_write1() local
2062 frames = size > avail ? avail : size; in snd_pcm_lib_write1()
2064 if (frames > cont) in snd_pcm_lib_write1()
2065 frames = cont; in snd_pcm_lib_write1()
2066 if (snd_BUG_ON(!frames)) { in snd_pcm_lib_write1()
2074 err = transfer(substream, appl_ofs, data, offset, frames); in snd_pcm_lib_write1()
2088 appl_ptr += frames; in snd_pcm_lib_write1()
2095 offset += frames; in snd_pcm_lib_write1()
2096 size -= frames; in snd_pcm_lib_write1()
2097 xfer += frames; in snd_pcm_lib_write1()
2098 avail -= frames; in snd_pcm_lib_write1()
2152 snd_pcm_uframes_t frames) in snd_pcm_lib_writev_transfer() argument
2164 if ((err = substream->ops->silence(substream, c, hwoff, frames)) < 0) in snd_pcm_lib_writev_transfer()
2168 if ((err = substream->ops->copy(substream, c, hwoff, buf, frames)) < 0) in snd_pcm_lib_writev_transfer()
2178 snd_pcm_format_set_silence(runtime->format, hwbuf, frames); in snd_pcm_lib_writev_transfer()
2181 if (copy_from_user(hwbuf, buf, samples_to_bytes(runtime, frames))) in snd_pcm_lib_writev_transfer()
2191 snd_pcm_uframes_t frames) in snd_pcm_lib_writev() argument
2205 return snd_pcm_lib_write1(substream, (unsigned long)bufs, frames, in snd_pcm_lib_writev()
2214 snd_pcm_uframes_t frames) in snd_pcm_lib_read_transfer() argument
2220 if ((err = substream->ops->copy(substream, -1, hwoff, buf, frames)) < 0) in snd_pcm_lib_read_transfer()
2224 if (copy_to_user(buf, hwbuf, frames_to_bytes(runtime, frames))) in snd_pcm_lib_read_transfer()
2274 snd_pcm_uframes_t frames, appl_ptr, appl_ofs; in snd_pcm_lib_read1() local
2294 frames = size > avail ? avail : size; in snd_pcm_lib_read1()
2296 if (frames > cont) in snd_pcm_lib_read1()
2297 frames = cont; in snd_pcm_lib_read1()
2298 if (snd_BUG_ON(!frames)) { in snd_pcm_lib_read1()
2306 err = transfer(substream, appl_ofs, data, offset, frames); in snd_pcm_lib_read1()
2320 appl_ptr += frames; in snd_pcm_lib_read1()
2327 offset += frames; in snd_pcm_lib_read1()
2328 size -= frames; in snd_pcm_lib_read1()
2329 xfer += frames; in snd_pcm_lib_read1()
2330 avail -= frames; in snd_pcm_lib_read1()
2361 snd_pcm_uframes_t frames) in snd_pcm_lib_readv_transfer() argument
2374 if ((err = substream->ops->copy(substream, c, hwoff, buf, frames)) < 0) in snd_pcm_lib_readv_transfer()
2387 if (copy_to_user(buf, hwbuf, samples_to_bytes(runtime, frames))) in snd_pcm_lib_readv_transfer()
2396 snd_pcm_uframes_t frames) in snd_pcm_lib_readv() argument
2412 …return snd_pcm_lib_read1(substream, (unsigned long)bufs, frames, nonblock, snd_pcm_lib_readv_trans… in snd_pcm_lib_readv()