Lines Matching refs:plugin
37 static snd_pcm_sframes_t io_playback_transfer(struct snd_pcm_plugin *plugin, in io_playback_transfer() argument
42 if (snd_BUG_ON(!plugin)) in io_playback_transfer()
46 if (plugin->access == SNDRV_PCM_ACCESS_RW_INTERLEAVED) { in io_playback_transfer()
47 return pcm_write(plugin->plug, src_channels->area.addr, frames); in io_playback_transfer()
49 int channel, channels = plugin->dst_format.channels; in io_playback_transfer()
50 void **bufs = (void**)plugin->extra_data; in io_playback_transfer()
59 return pcm_writev(plugin->plug, bufs, frames); in io_playback_transfer()
63 static snd_pcm_sframes_t io_capture_transfer(struct snd_pcm_plugin *plugin, in io_capture_transfer() argument
68 if (snd_BUG_ON(!plugin)) in io_capture_transfer()
72 if (plugin->access == SNDRV_PCM_ACCESS_RW_INTERLEAVED) { in io_capture_transfer()
73 return pcm_read(plugin->plug, dst_channels->area.addr, frames); in io_capture_transfer()
75 int channel, channels = plugin->dst_format.channels; in io_capture_transfer()
76 void **bufs = (void**)plugin->extra_data; in io_capture_transfer()
85 return pcm_readv(plugin->plug, bufs, frames); in io_capture_transfer()
90 static snd_pcm_sframes_t io_src_channels(struct snd_pcm_plugin *plugin, in io_src_channels() argument
97 err = snd_pcm_plugin_client_channels(plugin, frames, &v); in io_src_channels()
101 if (plugin->access == SNDRV_PCM_ACCESS_RW_INTERLEAVED) { in io_src_channels()
102 for (channel = 0; channel < plugin->src_format.channels; ++channel, ++v) in io_src_channels()
114 struct snd_pcm_plugin *plugin; in snd_pcm_plugin_build_io() local
127 &plugin); in snd_pcm_plugin_build_io()
130 plugin->access = params_access(params); in snd_pcm_plugin_build_io()
132 plugin->transfer = io_playback_transfer; in snd_pcm_plugin_build_io()
133 if (plugin->access == SNDRV_PCM_ACCESS_RW_INTERLEAVED) in snd_pcm_plugin_build_io()
134 plugin->client_channels = io_src_channels; in snd_pcm_plugin_build_io()
136 plugin->transfer = io_capture_transfer; in snd_pcm_plugin_build_io()
139 *r_plugin = plugin; in snd_pcm_plugin_build_io()