Bug 2149919 - jack backend not supported
Summary: jack backend not supported
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-01 11:42 UTC by coachonko.com
Modified: 2023-01-04 18:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-04 18:18:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-141022 0 None None None 2022-12-01 11:44:01 UTC

Description coachonko.com 2022-12-01 11:42:55 UTC
Description of problem:

qemu-kvm seems to be compiled with disabled jack backend, despite rhel shipping pipewire by default which supports the jack protocol.

The missing support for jack audio backend causes the following error in libvirt when users attempt to setup audio passthrough on their virtual machines

audio: Unknown audio driver `jack' 

Expected results:

the qemu-kvm jack audio backend should be supported because pipewire, the default audio server on rhel 9, supports and relies on it. 

Shipping half-supports is confusing and bad for user experience.

Comment 1 John Ferlan 2022-12-07 16:57:36 UTC
Gerd - could you provide any thoughts on this bug?  Is this something missing we can/should add to a downstream RHEL/CentOS qemu-kvm build?

Comment 2 Gerd Hoffmann 2022-12-08 07:11:25 UTC
> Expected results:
> 
> the qemu-kvm jack audio backend should be supported because pipewire, the
> default audio server on rhel 9, supports and relies on it. 

pipewire supports both jack and pulseaudio protocols.

pulseaudio support is enabled in qemu-kvm builds and it has the
advantage that it works with both pulseaudio and pipewire audio
servers.

Any specific reasons why you want use jack instead?

Comment 3 coachonko.com 2022-12-08 15:59:18 UTC
(In reply to Gerd Hoffmann from comment #2)
> > Expected results:
> > 
> > the qemu-kvm jack audio backend should be supported because pipewire, the
> > default audio server on rhel 9, supports and relies on it. 
> 
> pipewire supports both jack and pulseaudio protocols.
> 
> pulseaudio support is enabled in qemu-kvm builds and it has the
> advantage that it works with both pulseaudio and pipewire audio
> servers.
> 
> Any specific reasons why you want use jack instead?

I want to use pipewire with the jack protocol.

The following configuration:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  [...]
  <devices>
    <audio id="1" type="jack">
      <input clientName="Windows10VM" connectPorts="HDA Intel PCH" />
      <output clientName="Windows10VM" connectPorts="HDA Intel PCH" />
    </audio>
    <sound model="ich9">
      <alias name="sound0"/>
    </sound>
  </devices>
  <qemu:commandline>
    <qemu:env name="PIPEWIRE_RUNTIME_DIR" value="/srv/windows10vm" />
    <qemu:env name="PIPEWIRE_LATENCY" value="512/48000" />
  </qemu:commandline>
</domain>

Results in:
audio: Unknown audio driver `jack' 

If qemu-kvm is compiled without jack support, users can't use the jack protocol with pipewire.

The VM is used for audio production, therefore Jack is (or used to be) the correct API for the job, as opposed to pa.

Comment 4 Gerd Hoffmann 2022-12-09 09:45:13 UTC
> > Any specific reasons why you want use jack instead?

> The VM is used for audio production, therefore Jack is (or used to be) the
> correct API for the job, as opposed to pa.

If you are doing audio production inside the guest it doesn't matter much how
the host handles audio.

If both guest and host are involved you probably get better results when
you let jack inside the guest and jack on the host talk directly to each
other over the network instead of sending your audio data though the qemu
sound emulation.  For starters you are not limited to the sample rates
and audio formats supported by the qemu hda emulation then.

Comment 5 coachonko.com 2022-12-09 10:37:02 UTC
(In reply to Gerd Hoffmann from comment #4)
> If both guest and host are involved you probably get better results when
> you let jack inside the guest and jack on the host talk directly to each
> other over the network instead of sending your audio data though the qemu
> sound emulation.

That is not a feasible solution when the guest does not have the ability to run jack as audio server, such is the case with win10 guests.

Utilizing network streams I believe introduces latency and lossy compression, which is not ideal.

Currently the only workaround I have found is to pass-through the audio device. This however cuts off the host audio, and the same device cannot be passed to multiple guests concurrently.

Allowing multiple guests to send audio data through qemu would be the solution.

Comment 6 Gerd Hoffmann 2022-12-09 11:36:30 UTC
> Utilizing network streams I believe introduces latency and lossy
> compression, which is not ideal.

Sound emulation introduces latency too.  It also runs with 16bit samples,
not sure this is what you want have for audio production purposes.

> Currently the only workaround I have found is to pass-through the audio
> device.

That surely is the best option when it comes to quality and latency ...

> This however cuts off the host audio, and the same device cannot be
> passed to multiple guests concurrently.

... but yes, there are drawbacks too.

Comment 9 Vivek Goyal 2023-01-04 18:18:53 UTC
Currently there is no plan to fix it. Hence closing this as WONTFIX.


Note You need to log in before you can comment on or make changes to this bug.