qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How am I supposed to use the -audiodev option?


From: _
Subject: Re: How am I supposed to use the -audiodev option?
Date: Tue, 29 Oct 2019 15:56:22 +0200

After scouring through sources and commit logs, I was able to figure it out.

To direct both the pc speaker and an ac97 device to the host's alsa:

qemu ... \
    -audiodev alsa,id=1 -global isa-pcspk.audiodev=1 -soundhw pcspk \
    -audiodev alsa,id=2 -device AC97,audiodev=2

Setting the same audiodev= for both the pcs speaker and the sound card
results in the last part of the beep being played again when the sound
card is opened.

Unlike the argument to -soundw which is a lowercase "ac97", the
argument to device should be an uppercase "AC97"

> No matter what I try, it keeps slapping me on the face with a
> "audiodev default parameter is deprecated, please specify
> audiodev=foo" warning:

Actually, though this is not documented anywhere, it's the -soundhw
option which is kind of deprecated, as mentioned in this commit:
https://git.qemu.org/?p=qemu.git;a=commit;h=af2041ed2d6

> Also, the documentation is as obtuse as humanly possible, and gives
> no hints whatsoever to how to emulate multiple sound cards and direct
> them to different backends.

With two soundcards, one of them redirected to a wav file:

qemu .. \
    -audiodev alsa,id=1 -global isa-pcspk.audiodev=1 -soundhw pcspk \
    -audiodev alsa,id=2 -device AC97,audiodev=2 \
    -audiodev wav,id=3,path=/tmp/qemu.wav -device AC97,audiodev=3



reply via email to

[Prev in Thread] Current Thread [Next in Thread]