[Spice-devel] Manual: add info about QEMU_AUDIO_DRV

Submitted by Jonathon Jongsma on Nov. 29, 2016, 4:54 p.m.

Details

Message ID 1480438454-26388-1-git-send-email-jjongsma@redhat.com
State Accepted
Headers show
Series "Manual: add info about QEMU_AUDIO_DRV" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Jonathon Jongsma Nov. 29, 2016, 4:54 p.m.
hramrach on IRC had an issue with audio not working. He was using
suse and his qemu defaulted to using the pulseaudio audio driver instead
of spice.  Explicitly setting the audio driver to spice using the
QEMU_AUDIO_DRV environment variable solved the problem. Add this tip to
the manual for others having the same issue in the future.
---
 docs/manual/manual.txt | 7 +++++++
 1 file changed, 7 insertions(+)

Patch hide | download patch | download mbox

diff --git a/docs/manual/manual.txt b/docs/manual/manual.txt
index 9d394b6..3b097ba 100644
--- a/docs/manual/manual.txt
+++ b/docs/manual/manual.txt
@@ -257,6 +257,13 @@  communication with the client. The Spice option `disable-ticketing` is
 specifying that ticketing (simple authentication method) is not
 used. The virtio and chardev devices are required by the guest agent.
 
+The `-soundhw ac97` option provides a sound device for the guest to use for
+audio playback and recording. In order for spice audio to work to properly,
+qemu must use the 'spice' audio driver. Depending on how qemu was built,
+however, this might not be the default audio driver. To ensure qemu uses the
+spice audio driver, you can set the environment variable
+`QEMU_AUDIO_DRV=spice`.
+
 Basic configuration
 -------------------
 

Comments

On 11/29/2016 06:54 PM, Jonathon Jongsma wrote:
> hramrach on IRC had an issue with audio not working. He was using
> suse and his qemu defaulted to using the pulseaudio audio driver instead
> of spice.  Explicitly setting the audio driver to spice using the
> QEMU_AUDIO_DRV environment variable solved the problem. Add this tip to
> the manual for others having the same issue in the future.
> ---
>  docs/manual/manual.txt | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/docs/manual/manual.txt b/docs/manual/manual.txt
> index 9d394b6..3b097ba 100644
> --- a/docs/manual/manual.txt
> +++ b/docs/manual/manual.txt
> @@ -257,6 +257,13 @@ communication with the client. The Spice option `disable-ticketing` is
>  specifying that ticketing (simple authentication method) is not
>  used. The virtio and chardev devices are required by the guest agent.
>
> +The `-soundhw ac97` option provides a sound device for the guest to use for

Hi Jonathon,

I think for VMs with newer Operating Systems (not sure which ones)
it's better to use '-soundhw hda' (Intel HD Audio).

Looks good otherwise.

Uri.

> +audio playback and recording. In order for spice audio to work to properly,
> +qemu must use the 'spice' audio driver. Depending on how qemu was built,
> +however, this might not be the default audio driver. To ensure qemu uses the
> +spice audio driver, you can set the environment variable
> +`QEMU_AUDIO_DRV=spice`.
> +
>  Basic configuration
>  -------------------
Hi,

On Tue, Nov 29, 2016 at 11:10:40PM +0200, Uri Lublin wrote:
> On 11/29/2016 06:54 PM, Jonathon Jongsma wrote:
> > hramrach on IRC had an issue with audio not working. He was using
> > suse and his qemu defaulted to using the pulseaudio audio driver instead
> > of spice.  Explicitly setting the audio driver to spice using the
> > QEMU_AUDIO_DRV environment variable solved the problem. Add this tip to
> > the manual for others having the same issue in the future.
> > ---
> >  docs/manual/manual.txt | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/docs/manual/manual.txt b/docs/manual/manual.txt
> > index 9d394b6..3b097ba 100644
> > --- a/docs/manual/manual.txt
> > +++ b/docs/manual/manual.txt
> > @@ -257,6 +257,13 @@ communication with the client. The Spice option `disable-ticketing` is
> >  specifying that ticketing (simple authentication method) is not
> >  used. The virtio and chardev devices are required by the guest agent.
> >
> > +The `-soundhw ac97` option provides a sound device for the guest to use for
>
> Hi Jonathon,
>
> I think for VMs with newer Operating Systems (not sure which ones)
> it's better to use '-soundhw hda' (Intel HD Audio).
>
> Looks good otherwise.

AFAIK, Intel HD Audio is always preferred unless you are on Windows 7 as
we have a long standing bug in QEMU that makes a small sound artifact
very often, you can find more about it at [0]

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1203507#c23

QEMU_AUDIO_DRV is also interesting to debug audio issues. By setting
QEMU_AUDIO_DRV=pa for instance it will redirect the audio to the host's
PulseAudio.

>
> Uri.
>
> > +audio playback and recording. In order for spice audio to work to properly,

Not sure but I think the second 'to' is extra in 'audio to work to'

> > +qemu must use the 'spice' audio driver. Depending on how qemu was built,
> > +however, this might not be the default audio driver. To ensure qemu uses the
> > +spice audio driver, you can set the environment variable
> > +`QEMU_AUDIO_DRV=spice`.
> > +
> >  Basic configuration
> >  -------------------

My comments above were just to share some tips on this. Beside the
second 'to', looks good to me too!

Acked-by: Victor Toso <victortoso@redhat.com>
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel