On Tue, 17 Mar 2020 at 20:10, datenwolf <foo...@datenwolf.net> wrote:
> Hi, > > I'm currently struggling with the "new" (I guess it's been a few years, > but so far I've never needed them) way to specify audio device emulation. > > The TL;DR of the task at hand I want to solve is: I want to make qemu > use a snd-aloop device (let this be card 3) in a duplex configuration. > In my case that would be card 3, device 0, subdevice 0, so in ALSA terms > hw:3,0,0 – however this uses commas, which are already a separator for > the suboptions of the -audiodev options. > > Even after reading the documentation for the 7th time or so, I still > struggle to understand how some of the parameters fit together. When > using the following command line > > qemu-system-x86_64 \ > -enable-kvm \ > -smp 2 \ > -m 2G \ > -usbdevice tablet \ > -audiodev alsa,id=alsa,in.dev=hw:3,out.dev=hw:3 \ > -soundhw hda \ > ... > > I'm told on stderr that > > > audio: Device hda: audiodev default parameter is deprecated, > > please specify audiodev=alsa > > If I then try `-audiodev=alsa` this is taken as an invalid option. > > The slightly longer version of my problem statement is, that I'd like to > connect qemu to a running JACK audio instance. > > Unfortunately when used with qemu that ALSA plugin fails to connect to > the JACK server, using the following command line > > qemu-system-x86_64 \ > -enable-kvm \ > -smp 2 \ > -m 2G \ > -usbdevice tablet \ > -audiodev alsa,id=alsa,in.dev=jack,out.dev=jack \ > -soundhw hda \ > ... > > it fails with the following diagnostic output. > > > cannot connect system:capture_1 to alsa-jack.jackC.24006.70:in_000 > > alsa: Could not initialize ADC > > alsa: Failed to apply audio parameters > > alsa: Reason: Input/output error > > alsa: Could not initialize ADC > > alsa: Failed to set format 2 > > alsa: Reason: Invalid argument > > So this is somewhat a XY question: I want to connect it to JACK and > think that I might be able to make this work though snd-aloop, but so > far without success. > Hi, Did you get any solution to this? I hit a similar thing as reportedly use jack directly, if I spin a vm with an ich9-hda I see the following output: jack: JACK output configured for 48000Hz (1024 samples) jack: JACK input configured for 48000Hz (1024 samples) However, the vm doesn't produce any sound in the host, so if I run, for instance the speaker test in a plasma desktop I hear nothing. My audio bits from qemu: -device ich9-intel-hda -device hda-duplex The machine is a q35 one. Thanks! Jose.