Lines Matching full:frames
49 static int snd_pcm_plugin_alloc(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t frames) in snd_pcm_plugin_alloc() argument
65 size = array3_size(frames, format->channels, width); in snd_pcm_plugin_alloc()
72 if (plugin->buf_frames < frames) { in snd_pcm_plugin_alloc()
75 plugin->buf_frames = frames; in snd_pcm_plugin_alloc()
84 c->frames = frames; in snd_pcm_plugin_alloc()
96 c->frames = frames; in snd_pcm_plugin_alloc()
108 int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames) in snd_pcm_plug_alloc() argument
117 frames = plugin->dst_frames(plugin, frames); in snd_pcm_plug_alloc()
118 if ((snd_pcm_sframes_t)frames <= 0) in snd_pcm_plug_alloc()
121 err = snd_pcm_plugin_alloc(plugin, frames); in snd_pcm_plug_alloc()
129 frames = plugin->src_frames(plugin, frames); in snd_pcm_plug_alloc()
130 if ((snd_pcm_sframes_t)frames <= 0) in snd_pcm_plug_alloc()
133 err = snd_pcm_plugin_alloc(plugin, frames); in snd_pcm_plug_alloc()
143 snd_pcm_uframes_t frames, in snd_pcm_plugin_client_channels() argument
147 return frames; in snd_pcm_plugin_client_channels()
204 snd_pcm_sframes_t frames, in calc_dst_frames() argument
210 while (plugin && frames > 0) { in calc_dst_frames()
213 frames > plugin->buf_frames) in calc_dst_frames()
214 frames = plugin->buf_frames; in calc_dst_frames()
216 frames = plugin->dst_frames(plugin, frames); in calc_dst_frames()
217 if (frames < 0) in calc_dst_frames()
218 return frames; in calc_dst_frames()
222 return frames; in calc_dst_frames()
226 snd_pcm_sframes_t frames, in calc_src_frames() argument
232 while (plugin && frames > 0) { in calc_src_frames()
235 frames = plugin->src_frames(plugin, frames); in calc_src_frames()
236 if (frames < 0) in calc_src_frames()
237 return frames; in calc_src_frames()
240 frames > plugin->buf_frames) in calc_src_frames()
241 frames = plugin->buf_frames; in calc_src_frames()
244 return frames; in calc_src_frames()
587 v->frames = count; in snd_pcm_plug_client_channels_buf()
602 snd_pcm_sframes_t frames = size; in snd_pcm_plug_write_transfer() local
606 if (frames <= 0) in snd_pcm_plug_write_transfer()
607 return frames; in snd_pcm_plug_write_transfer()
610 snd_pcm_sframes_t frames1 = frames; in snd_pcm_plug_write_transfer()
612 frames1 = plugin->dst_frames(plugin, frames); in snd_pcm_plug_write_transfer()
620 frames = err; in snd_pcm_plug_write_transfer()
622 frames = plugin->src_frames(plugin, frames1); in snd_pcm_plug_write_transfer()
623 if (frames <= 0) in snd_pcm_plug_write_transfer()
624 return frames; in snd_pcm_plug_write_transfer()
629 pdprintf("write plugin: %s, %li\n", plugin->name, frames); in snd_pcm_plug_write_transfer()
630 frames = plugin->transfer(plugin, src_channels, dst_channels, frames); in snd_pcm_plug_write_transfer()
631 if (frames < 0) in snd_pcm_plug_write_transfer()
632 return frames; in snd_pcm_plug_write_transfer()
636 return calc_src_frames(plug, frames, true); in snd_pcm_plug_write_transfer()
643 snd_pcm_sframes_t frames = size; in snd_pcm_plug_read_transfer() local
646 frames = calc_src_frames(plug, frames, true); in snd_pcm_plug_read_transfer()
647 if (frames < 0) in snd_pcm_plug_read_transfer()
648 return frames; in snd_pcm_plug_read_transfer()
652 while (plugin && frames > 0) { in snd_pcm_plug_read_transfer()
655 err = plugin->client_channels(plugin, frames, &dst_channels); in snd_pcm_plug_read_transfer()
658 frames = err; in snd_pcm_plug_read_transfer()
662 pdprintf("read plugin: %s, %li\n", plugin->name, frames); in snd_pcm_plug_read_transfer()
663 frames = plugin->transfer(plugin, src_channels, dst_channels, frames); in snd_pcm_plug_read_transfer()
664 if (frames < 0) in snd_pcm_plug_read_transfer()
665 return frames; in snd_pcm_plug_read_transfer()
669 return frames; in snd_pcm_plug_read_transfer()