I use 

-audiodev pa,id=pa1,server=`pactl info | grep 'Server String' | awk '{print 
$3}'`

On a gentoo system without systemd. The arch wiki has more information under 
PCI pass through. 


> On 27 Oct 2019, at 7:23 PM, Lukas Straub <[email protected]> wrote:
> 
> On Sun, 27 Oct 2019 07:35:23 +0200
> _ <[email protected]> wrote:
> 
>> No matter what I try, it keeps slapping me on the face with a
>> "audiodev default parameter is deprecated, please specify
>> audiodev=foo" warning:
>> 
>> $ qemu -soundhw ac97 -audiodev alsa,id=alsa
>> audio: Device ac97: audiodev default parameter is deprecated, please
>> specify audiodev=alsa
>> $ qemu -audiodev alsa,id=alsa -soundhw ac97
>> audio: Device ac97: audiodev default parameter is deprecated, please
>> specify audiodev=alsa
>> 
>> Of course, trying to specify anything like "audiodev=alsa" anywhere
>> results in an error. And omitting either the -audiodev or the -soundhw
>> option results in no sound in the guest.
>> 
>> I'll have to either grit my teeth or use the "deprecated"
>> 
>> QEMU_AUDIO_DRV=alsa qemu -soundhw ac97
>> 
>> and try to forget about it.
>> 
>> 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.
>> 
> 
> From qemu's manpage:
> 
>       -audio-help
>           Will show the -audiodev equivalent of the currently specified
>           (deprecated) environment variables.
> 
> $ qemu-system-x86_64 -audio-help
> Environment variable based configuration deprecated.
> Please use the new -audiodev option.
> 
> Equivalent -audiodev to your current environment variables:
> (Since you didn't specify QEMU_AUDIO_DRV, I'll list all possibilities)
> -audiodev id=pa,driver=pa
> -audiodev id=alsa,driver=alsa
> -audiodev id=oss,driver=oss
> -audiodev id=none,driver=none
> 

Reply via email to