diff options
author | malc | 2009-09-12 00:39:29 +0200 |
---|---|---|
committer | malc | 2009-09-12 00:50:58 +0200 |
commit | 057fa65c5ddf915d73b69964f32fc854c914efd4 (patch) | |
tree | a8a756cfbf97cfc13d896efa7c49a6167b1bbfeb /audio/ossaudio.c | |
parent | alsa: poll mode handling (diff) | |
download | qemu-057fa65c5ddf915d73b69964f32fc854c914efd4.tar.gz qemu-057fa65c5ddf915d73b69964f32fc854c914efd4.tar.xz qemu-057fa65c5ddf915d73b69964f32fc854c914efd4.zip |
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 f2385df5f1..2cc3c6f5c8 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); |