Lines Matching refs:plug

35 #define snd_pcm_plug_first(plug) ((plug)->runtime->oss.plugin_first)
36 #define snd_pcm_plug_last(plug) ((plug)->runtime->oss.plugin_last)
108 int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)
111 if (snd_BUG_ON(!snd_pcm_plug_first(plug)))
113 if (snd_pcm_plug_stream(plug) == SNDRV_PCM_STREAM_PLAYBACK) {
114 struct snd_pcm_plugin *plugin = snd_pcm_plug_first(plug);
126 struct snd_pcm_plugin *plugin = snd_pcm_plug_last(plug);
150 int snd_pcm_plugin_build(struct snd_pcm_substream *plug,
160 if (snd_BUG_ON(!plug))
168 plugin->plug = plug;
169 plugin->stream = snd_pcm_plug_stream(plug);
203 static snd_pcm_sframes_t calc_dst_frames(struct snd_pcm_substream *plug,
209 plugin = snd_pcm_plug_first(plug);
225 static snd_pcm_sframes_t calc_src_frames(struct snd_pcm_substream *plug,
231 plugin = snd_pcm_plug_last(plug);
247 snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *plug, snd_pcm_uframes_t drv_frames)
249 if (snd_BUG_ON(!plug))
251 switch (snd_pcm_plug_stream(plug)) {
253 return calc_src_frames(plug, drv_frames, false);
255 return calc_dst_frames(plug, drv_frames, false);
262 snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *plug, snd_pcm_uframes_t clt_frames)
264 if (snd_BUG_ON(!plug))
266 switch (snd_pcm_plug_stream(plug)) {
268 return calc_dst_frames(plug, clt_frames, false);
270 return calc_src_frames(plug, clt_frames, false);
371 int snd_pcm_plug_format_plugins(struct snd_pcm_substream *plug,
381 int stream = snd_pcm_plug_stream(plug);
429 err = snd_pcm_plugin_build_mulaw(plug,
446 err = snd_pcm_plugin_build_route(plug, &srcformat, &tmpformat, &plugin);
464 err = snd_pcm_plugin_build_linear(plug,
478 err = snd_pcm_plugin_build_rate(plug,
498 err = snd_pcm_plugin_build_mulaw(plug,
504 err = snd_pcm_plugin_build_linear(plug,
525 err = snd_pcm_plugin_build_route(plug, &srcformat, &tmpformat, &plugin);
540 err = snd_pcm_plugin_build_copy(plug,
557 snd_pcm_sframes_t snd_pcm_plug_client_channels_buf(struct snd_pcm_substream *plug,
566 int stream = snd_pcm_plug_stream(plug);
571 plugin = snd_pcm_plug_first(plug);
574 plugin = snd_pcm_plug_last(plug);
597 snd_pcm_sframes_t snd_pcm_plug_write_transfer(struct snd_pcm_substream *plug, struct snd_pcm_plugin_channel *src_channels, snd_pcm_uframes_t size)
604 plugin = snd_pcm_plug_first(plug);
636 return calc_src_frames(plug, frames, true);
639 snd_pcm_sframes_t snd_pcm_plug_read_transfer(struct snd_pcm_substream *plug, struct snd_pcm_plugin_channel *dst_channels_final, snd_pcm_uframes_t size)
646 frames = calc_src_frames(plug, frames, true);
651 plugin = snd_pcm_plug_first(plug);