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()
1990 snd_pcm_uframes_t frames) in snd_pcm_lib_write_transfer() argument
1996 if ((err = substream->ops->copy(substream, -1, hwoff, buf, frames)) < 0) in snd_pcm_lib_write_transfer()
2000 if (copy_from_user(hwbuf, buf, frames_to_bytes(runtime, frames))) in snd_pcm_lib_write_transfer()
2047 snd_pcm_uframes_t frames, appl_ptr, appl_ofs; in snd_pcm_lib_write1() local
2060 frames = size > avail ? avail : size; in snd_pcm_lib_write1()
2062 if (frames > cont) in snd_pcm_lib_write1()
2063 frames = cont; in snd_pcm_lib_write1()
2064 if (snd_BUG_ON(!frames)) { in snd_pcm_lib_write1()
2072 err = transfer(substream, appl_ofs, data, offset, frames); in snd_pcm_lib_write1()
2086 appl_ptr += frames; in snd_pcm_lib_write1()
2093 offset += frames; in snd_pcm_lib_write1()
2094 size -= frames; in snd_pcm_lib_write1()
2095 xfer += frames; in snd_pcm_lib_write1()
2096 avail -= frames; in snd_pcm_lib_write1()
2150 snd_pcm_uframes_t frames) in snd_pcm_lib_writev_transfer() argument
2162 if ((err = substream->ops->silence(substream, c, hwoff, frames)) < 0) in snd_pcm_lib_writev_transfer()
2166 if ((err = substream->ops->copy(substream, c, hwoff, buf, frames)) < 0) in snd_pcm_lib_writev_transfer()
2176 snd_pcm_format_set_silence(runtime->format, hwbuf, frames); in snd_pcm_lib_writev_transfer()
2179 if (copy_from_user(hwbuf, buf, samples_to_bytes(runtime, frames))) in snd_pcm_lib_writev_transfer()
2189 snd_pcm_uframes_t frames) in snd_pcm_lib_writev() argument
2203 return snd_pcm_lib_write1(substream, (unsigned long)bufs, frames, in snd_pcm_lib_writev()
2212 snd_pcm_uframes_t frames) in snd_pcm_lib_read_transfer() argument
2218 if ((err = substream->ops->copy(substream, -1, hwoff, buf, frames)) < 0) in snd_pcm_lib_read_transfer()
2222 if (copy_to_user(buf, hwbuf, frames_to_bytes(runtime, frames))) in snd_pcm_lib_read_transfer()
2272 snd_pcm_uframes_t frames, appl_ptr, appl_ofs; in snd_pcm_lib_read1() local
2292 frames = size > avail ? avail : size; in snd_pcm_lib_read1()
2294 if (frames > cont) in snd_pcm_lib_read1()
2295 frames = cont; in snd_pcm_lib_read1()
2296 if (snd_BUG_ON(!frames)) { in snd_pcm_lib_read1()
2304 err = transfer(substream, appl_ofs, data, offset, frames); in snd_pcm_lib_read1()
2318 appl_ptr += frames; in snd_pcm_lib_read1()
2325 offset += frames; in snd_pcm_lib_read1()
2326 size -= frames; in snd_pcm_lib_read1()
2327 xfer += frames; in snd_pcm_lib_read1()
2328 avail -= frames; in snd_pcm_lib_read1()
2359 snd_pcm_uframes_t frames) in snd_pcm_lib_readv_transfer() argument
2372 if ((err = substream->ops->copy(substream, c, hwoff, buf, frames)) < 0) in snd_pcm_lib_readv_transfer()
2385 if (copy_to_user(buf, hwbuf, samples_to_bytes(runtime, frames))) in snd_pcm_lib_readv_transfer()
2394 snd_pcm_uframes_t frames) in snd_pcm_lib_readv() argument
2410 …return snd_pcm_lib_read1(substream, (unsigned long)bufs, frames, nonblock, snd_pcm_lib_readv_trans… in snd_pcm_lib_readv()