qemu-discuss
[Top][All Lists]
Advanced

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

Re: Specifying specific ALSA device to use for sound output / ALSA loopb


From: datenwolf
Subject: Re: Specifying specific ALSA device to use for sound output / ALSA loopback / JACK
Date: Sun, 22 Nov 2020 13:27:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1

Hi,

unfortunately I didn't make any progress on this. And eventually I just gave up, for there were more pressing matters.

Cheers,
dw

On 22/11/2020 13.24, José Ramón Muñoz Pekkarinen wrote:


On Tue, 17 Mar 2020 at 20:10, datenwolf <foobar@datenwolf.net <mailto:foobar@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 <http://in.dev>=hw:3,out.dev
    <http://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 <http://in.dev>=jack,out.dev
    <http://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.



reply via email to

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