On 04/22/2018 02:03 AM, Xi Ruoyao wrote:
My QEMU installation tried to use ALSA while PulseAudio server is
running.  Then it could not output audio signal, and got stuck -
the client hanged for a while.  So I think maybe we should mention
ALSA & PulseAudio interaction issues in the book (just some
immature idea):

1. In "PulseAudio", add

Configuring PulseAudio

   Config ALSA to use PulseAudio sink

     If PulseAudio is running, programs using ALSA may not work
     because PulseAudio server is holding ALSA.  You can solve
     this by telling ALSA to use PulseAudio sink.  See
     alsa-plugins-<version> page for detail.

2. In "alsa-plugins", add

Configuring ALSA PulseAudio plugin

   If you want ALSA programs to use PulseAudio sink (so they
   can output while PulseAudio is holding your sound device),
   modify ALSA default sink:

     install -vm644 pulse/99-pulseaudio-default.conf.example \
         /etc/asound.conf

3. In "qemu", add

If you want to use qemu with PulseAudio, modify the configure
option to "--audio-drv-list=pa".

I think that a change to qemu would be sufficient. You do not need /etc/asound.conf because ~/.asoundrc should be sufficient.

Just add the contents of that file to the qemu configuration:

# Default to PulseAudio
pcm.!default {
    type pulse
    hint {
        show on
description "Default ALSA Output (currently PulseAudio Sound Server)"
    }
}

ctl.!default {
    type pulse
}

I suspect the hint is not strictly needed.

Does anyone want to test this and write a patch to the qemu xml page?

  -- Bruce



--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to