Lines Matching refs:closure
61 struct rw_closure *closure = state->private_data;
71 if (avail_count > frame_cache_get_count(&closure->cache)) {
72 avail_count -= frame_cache_get_count(&closure->cache);
76 if (closure->access == SND_PCM_ACCESS_RW_INTERLEAVED) {
78 closure->cache.buf_ptr,
82 closure->cache.buf_ptr,
89 frame_cache_increase_count(&closure->cache, handled_frame_count);
90 avail_count = frame_cache_get_count(&closure->cache);
95 err = mapper_context_process_frames(mapper, closure->cache.buf,
100 frame_cache_reduce(&closure->cache, consumed_count);
206 struct rw_closure *closure = state->private_data;
216 if (avail_count > frame_cache_get_count(&closure->cache)) {
217 avail_count -= frame_cache_get_count(&closure->cache);
221 closure->cache.buf_ptr, &avail_count, cntrs);
224 frame_cache_increase_count(&closure->cache, avail_count);
225 avail_count = frame_cache_get_count(&closure->cache);
231 if (closure->access == SND_PCM_ACCESS_RW_INTERLEAVED) {
233 closure->cache.buf, consumed_count);
236 closure->cache.buf, consumed_count);
244 frame_cache_reduce(&closure->cache, consumed_count);
360 struct rw_closure *closure = state->private_data;
384 err = snd_pcm_hw_params_get_access(state->hw_params, &closure->access);
388 err = frame_cache_init(&closure->cache, closure->access,
396 closure->process_frames = r_process_frames_nonblocking;
398 closure->process_frames = r_process_frames_blocking;
401 closure->process_frames = w_process_frames_nonblocking;
403 closure->process_frames = w_process_frames_blocking;
414 struct rw_closure *closure = state->private_data;
423 return closure->process_frames(state, status, frame_count, mapper, cntrs);
428 struct rw_closure *closure = state->private_data;
430 frame_cache_destroy(&closure->cache);