Comment 5 for bug 304649

Revision history for this message
Christian Roessner (christian-roessner-net) wrote :

I managed to get kvm to play over pulseaudio and it doing a real much better job than alsa oss and sdl.

apt-get source kvm

Change to the debian/patches folder

Edit: reenable_audio_drivers.patch

--- kvm-82+dfsg/configure.orig 2009-01-09 12:32:42.294604874 -0600
+++ kvm-82+dfsg/configure 2009-01-09 12:33:49.098787948 -0600
@@ -146,6 +146,8 @@ fi
     --extra-ldflags="-L $PWD/../libkvm $qemu_ldflags" \
     --kerneldir="$libkvm_kerneldir" \
     --prefix="$prefix" \
+ --audio-drv-list="pa oss alsa sdl" \
+ --audio-card-list="ac97 adlib cs4231a gus" \
     ${cross_prefix:+"--cross-prefix=$cross_prefix"} \
     ${cross_prefix:+"--cpu=$arch"} "${qemu_opts[@]}"
 ) || usage

Put the pa before oss alsa sdl.

Edit: debian/control and modify the file like this:

[...]
Build-Depends: debhelper (>= 7.0.17ubuntu2), pkg-config, quilt (>= 0.40), autotools-dev,
 bzip2, uuid-dev, zlib1g-dev, libsdl1.2-dev, libpulse-dev, libasound2-dev, libgnutls-dev,
 libncurses5-dev, nasm, texi2html, bcc, iasl, device-tree-compiler [powerpc],
 sysv-rc (>= 2.86.ds1-14.1ubuntu2), libx11-dev
[...]

I have put libpulse-dev in this block as shown above.

Simply rebuild the package. I have done this with pbuilder. Using pdebuild --use-pdebuild-internal

Install new package (Mine is amd64) with dpkg -i kvm_83+dfsg-0ubuntu1_amd64.deb

After this your kvm is doing fine with pulse. So please devs! compile kvm with pa, as it is really simple!

[...]
Available drivers:
Name: pa
Description: http://www.pulseaudio.org/
Theoretically supports many playback voices
Theoretically supports many capture voices
Options:
  QEMU_PA_SAMPLES: integer, default = 1024
    buffer size in samples
  QEMU_PA_DIVISOR: integer, default = 2
    threshold divisor
  QEMU_PA_SERVER: string, default = (not set)
    server address
  QEMU_PA_SINK: string, default = (not set)
    sink device name
  QEMU_PA_SOURCE: string, default = (not set)
    source device name
[...]

See the result here: http://www.roessner-net.com/bilder/Bildschirmfoto4.png

Thanks