Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2149919

Summary: jack backend not supported
Product: Red Hat Enterprise Linux 9 Reporter: coachonko.com <info>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
qemu-kvm sub component: Audio QA Contact: Lili Zhu <lizhu>
Status: CLOSED WONTFIX Docs Contact:
Severity: unspecified    
Priority: unspecified CC: coli, jinzhao, juzhang, kraxel, vgoyal, virt-maint
Version: 9.1Flags: pm-rhel: mirror+
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-04 18:18:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.