aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/oss/route.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 04:18:00 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:16:33 -0500
commit47eaebfd31610d2a55fbaccd1e7c37690d42ce30 (patch)
treed86d90a3741e09cf660aef3dda96566ff68778eb /sound/core/oss/route.c
parent230b5c1a612ae903c560b55a15df287b0ff437ea (diff)
[ALSA] Use standard bitmap functions
Modules: ALSA<-OSS emulation Use standard bitmap functions instead of in-house ones. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/oss/route.c')
-rw-r--r--sound/core/oss/route.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sound/core/oss/route.c b/sound/core/oss/route.c
index c955b7dfdb30..7519aed757cd 100644
--- a/sound/core/oss/route.c
+++ b/sound/core/oss/route.c
@@ -70,9 +70,9 @@ typedef union {
70 70
71 71
72static void route_to_channel_from_zero(snd_pcm_plugin_t *plugin, 72static void route_to_channel_from_zero(snd_pcm_plugin_t *plugin,
73 const snd_pcm_plugin_channel_t *src_channels ATTRIBUTE_UNUSED, 73 const snd_pcm_plugin_channel_t *src_channels,
74 snd_pcm_plugin_channel_t *dst_channel, 74 snd_pcm_plugin_channel_t *dst_channel,
75 ttable_dst_t* ttable ATTRIBUTE_UNUSED, snd_pcm_uframes_t frames) 75 ttable_dst_t* ttable, snd_pcm_uframes_t frames)
76{ 76{
77 if (dst_channel->wanted) 77 if (dst_channel->wanted)
78 snd_pcm_area_silence(&dst_channel->area, 0, frames, plugin->dst_format.format); 78 snd_pcm_area_silence(&dst_channel->area, 0, frames, plugin->dst_format.format);
@@ -298,46 +298,46 @@ static void route_to_channel(snd_pcm_plugin_t *plugin,
298} 298}
299 299
300static int route_src_channels_mask(snd_pcm_plugin_t *plugin, 300static int route_src_channels_mask(snd_pcm_plugin_t *plugin,
301 bitset_t *dst_vmask, 301 unsigned long *dst_vmask,
302 bitset_t **src_vmask) 302 unsigned long **src_vmask)
303{ 303{
304 route_t *data = (route_t *)plugin->extra_data; 304 route_t *data = (route_t *)plugin->extra_data;
305 int schannels = plugin->src_format.channels; 305 int schannels = plugin->src_format.channels;
306 int dchannels = plugin->dst_format.channels; 306 int dchannels = plugin->dst_format.channels;
307 bitset_t *vmask = plugin->src_vmask; 307 unsigned long *vmask = plugin->src_vmask;
308 int channel; 308 int channel;
309 ttable_dst_t *dp = data->ttable; 309 ttable_dst_t *dp = data->ttable;
310 bitset_zero(vmask, schannels); 310 bitmap_zero(vmask, schannels);
311 for (channel = 0; channel < dchannels; channel++, dp++) { 311 for (channel = 0; channel < dchannels; channel++, dp++) {
312 unsigned int src; 312 unsigned int src;
313 ttable_src_t *sp; 313 ttable_src_t *sp;
314 if (!bitset_get(dst_vmask, channel)) 314 if (!test_bit(channel, dst_vmask))
315 continue; 315 continue;
316 sp = dp->srcs; 316 sp = dp->srcs;
317 for (src = 0; src < dp->nsrcs; src++, sp++) 317 for (src = 0; src < dp->nsrcs; src++, sp++)
318 bitset_set(vmask, sp->channel); 318 set_bit(sp->channel, vmask);
319 } 319 }
320 *src_vmask = vmask; 320 *src_vmask = vmask;
321 return 0; 321 return 0;
322} 322}
323 323
324static int route_dst_channels_mask(snd_pcm_plugin_t *plugin, 324static int route_dst_channels_mask(snd_pcm_plugin_t *plugin,
325 bitset_t *src_vmask, 325 unsigned long *src_vmask,
326 bitset_t **dst_vmask) 326 unsigned long **dst_vmask)
327{ 327{
328 route_t *data = (route_t *)plugin->extra_data; 328 route_t *data = (route_t *)plugin->extra_data;
329 int dchannels = plugin->dst_format.channels; 329 int dchannels = plugin->dst_format.channels;
330 bitset_t *vmask = plugin->dst_vmask; 330 unsigned long *vmask = plugin->dst_vmask;
331 int channel; 331 int channel;
332 ttable_dst_t *dp = data->ttable; 332 ttable_dst_t *dp = data->ttable;
333 bitset_zero(vmask, dchannels); 333 bitmap_zero(vmask, dchannels);
334 for (channel = 0; channel < dchannels; channel++, dp++) { 334 for (channel = 0; channel < dchannels; channel++, dp++) {
335 unsigned int src; 335 unsigned int src;
336 ttable_src_t *sp; 336 ttable_src_t *sp;
337 sp = dp->srcs; 337 sp = dp->srcs;
338 for (src = 0; src < dp->nsrcs; src++, sp++) { 338 for (src = 0; src < dp->nsrcs; src++, sp++) {
339 if (bitset_get(src_vmask, sp->channel)) { 339 if (test_bit(sp->channel, src_vmask)) {
340 bitset_set(vmask, channel); 340 set_bit(channel, vmask);
341 break; 341 break;
342 } 342 }
343 } 343 }