22 #include <linux/time.h>
28 #define pcm_write(plug,buf,count) snd_pcm_oss_write3(plug,buf,count,1)
29 #define pcm_writev(plug,vec,count) snd_pcm_oss_writev3(plug,vec,count,1)
30 #define pcm_read(plug,buf,count) snd_pcm_oss_read3(plug,buf,count,1)
31 #define pcm_readv(plug,vec,count) snd_pcm_oss_readv3(plug,vec,count,1)
38 const struct snd_pcm_plugin_channel *src_channels,
39 struct snd_pcm_plugin_channel *dst_channels,
47 return pcm_write(plugin->plug, src_channels->area.addr, frames);
50 void **
bufs = (
void**)plugin->extra_data;
53 for (channel = 0; channel <
channels; channel++) {
54 if (src_channels[channel].
enabled)
64 const struct snd_pcm_plugin_channel *src_channels,
65 struct snd_pcm_plugin_channel *dst_channels,
73 return pcm_read(plugin->plug, dst_channels->area.addr, frames);
76 void **
bufs = (
void**)plugin->extra_data;
79 for (channel = 0; channel <
channels; channel++) {
80 if (dst_channels[channel].
enabled)
85 return pcm_readv(plugin->plug, bufs, frames);
92 struct snd_pcm_plugin_channel **channels)
96 struct snd_pcm_plugin_channel *
v;
102 for (channel = 0; channel < plugin->src_format.channels; ++
channel, ++
v)
110 struct snd_pcm_plugin **r_plugin)
113 struct snd_pcm_plugin_format format;
114 struct snd_pcm_plugin *plugin;
126 sizeof(
void *) * format.channels,
132 plugin->transfer = io_playback_transfer;
134 plugin->client_channels = io_src_channels;
136 plugin->transfer = io_capture_transfer;