22 #include <linux/time.h>
28 const struct snd_pcm_plugin_channel *src_channels,
29 struct snd_pcm_plugin_channel *dst_channels,
33 unsigned int nchannels;
35 if (
snd_BUG_ON(!plugin || !src_channels || !dst_channels))
39 nchannels = plugin->src_format.channels;
40 for (channel = 0; channel < nchannels; channel++) {
42 src_channels->area.step % 8))
45 dst_channels->area.step % 8))
47 if (!src_channels->enabled) {
48 if (dst_channels->wanted)
50 dst_channels->enabled = 0;
53 dst_channels->enabled = 1;
54 snd_pcm_area_copy(&src_channels->area, 0, &dst_channels->area, 0, frames, plugin->src_format.format);
62 struct snd_pcm_plugin_format *src_format,
63 struct snd_pcm_plugin_format *dst_format,
64 struct snd_pcm_plugin **r_plugin)
67 struct snd_pcm_plugin *plugin;
74 if (
snd_BUG_ON(src_format->format != dst_format->format))
76 if (
snd_BUG_ON(src_format->rate != dst_format->rate))
78 if (
snd_BUG_ON(src_format->channels != dst_format->channels))
89 plugin->transfer = copy_transfer;