aboutsummaryrefslogtreecommitdiff
path: root/audio/ossaudio.c
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2009-09-12 02:39:29 +0400
committermalc <av1474@comtv.ru>2009-09-12 02:50:58 +0400
commit057fa65c5ddf915d73b69964f32fc854c914efd4 (patch)
treea8a756cfbf97cfc13d896efa7c49a6167b1bbfeb /audio/ossaudio.c
parent8b438ba3f567a5d3ebd61a4e9b36971877e87671 (diff)
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.c3
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);