diff options
author | malc <av1474@comtv.ru> | 2009-09-12 02:39:29 +0400 |
---|---|---|
committer | malc <av1474@comtv.ru> | 2009-09-12 02:50:58 +0400 |
commit | 057fa65c5ddf915d73b69964f32fc854c914efd4 (patch) | |
tree | a8a756cfbf97cfc13d896efa7c49a6167b1bbfeb /audio/ossaudio.c | |
parent | 8b438ba3f567a5d3ebd61a4e9b36971877e87671 (diff) | |
download | qemu-057fa65c5ddf915d73b69964f32fc854c914efd4.zip qemu-057fa65c5ddf915d73b69964f32fc854c914efd4.tar.gz qemu-057fa65c5ddf915d73b69964f32fc854c914efd4.tar.bz2 |
audio: remove lsbindex/popcount in favour of host-utils's ctz32
Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'audio/ossaudio.c')
-rw-r--r-- | audio/ossaudio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/ossaudio.c b/audio/ossaudio.c index f2385df..2cc3c6f 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -31,6 +31,7 @@ #include <sys/soundcard.h> #endif #include "qemu-common.h" +#include "host-utils.h" #include "qemu-char.h" #include "audio.h" @@ -273,7 +274,7 @@ static int oss_open (int in, struct oss_params *req, goto err; } - mmmmssss = (req->nfrags << 16) | lsbindex (req->fragsize); + mmmmssss = (req->nfrags << 16) | ctz32 (req->fragsize); if (ioctl (fd, SNDCTL_DSP_SETFRAGMENT, &mmmmssss)) { oss_logerr2 (errno, typ, "Failed to set buffer length (%d, %d)\n", req->nfrags, req->fragsize); |