[Bug 1908832] Re: jack audio dev produces no sound

José Pekkarinen posted 1 patch 3 years, 2 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/161415330721.7209.10377443778673632209.malone@gac.canonical.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>
[Bug 1908832] Re: jack audio dev produces no sound
Posted by José Pekkarinen 3 years, 2 months ago
Hi,

I spend some time debugging this during the morning, I found that there is a check
while connecting the ports that always exits the function without connecting the
jack ports, simplifying it as in the following diff lets me build and use the
audio outputs correctly in the vm:

diff --git a/audio/jackaudio.c b/audio/jackaudio.c
index 3b7c18443d..f417e4db8a 100644
--- a/audio/jackaudio.c
+++ b/audio/jackaudio.c
@@ -369,7 +369,7 @@ static size_t qjack_read(HWVoiceIn *hw, void *buf, size_t len)
 
 static void qjack_client_connect_ports(QJackClient *c)
 {
-    if (!c->connect_ports || !c->opt->connect_ports) {
+   if (!c->connect_ports) {
         return;
     }

So, I wonder, what is this c->opt->connect_ports all about, is it needed, or just
wrongly initialized so that it caps the port connection?

Thanks!

Jose.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1908832

Title:
  jack audio dev produces no sound

Status in QEMU:
  New

Bug description:
  Hi,

  I'm testing the new jack audiodev backend in my
  laptop. The host system is gentoo, using the
  ebuild for qemu 5.1.0-r2, and I'm using jack
  use flag globally in the system so any ebuild
  that have support for jack should be build with
  it. The jack setup reportedly works as I use it
  with firefox, and mumble with no trouble. When
  I launch the following script, I see the vm
  connects to jack:

  /usr/bin/qemu-system-x86_64 -enable-kvm -M q35 -vga virtio -display gtk,gl=on \
          -cpu host -smp 2,cores=2,threads=1 \
          -m 4G -L /usr/share/qemu \
          -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 \
          -drive file=/usr/share/edk2-ovmf/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on \
          -drive file=debian_VARS.fd,if=pflash,format=raw,unit=1 \
          -audiodev id=jack,driver=jack -device ich9-intel-hda -device hda-duplex,audiodev=jack \
          -device virtio-serial-pci \
          -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
          -chardev spicevmc,id=spicechannel0,name=vdagent \
          -device nec-usb-xhci,id=usb \
          -device usb-host,vendorid=0x04ca,productid=0x708e \
          -device usb-host,vendorid=0x1050,productid=0x0407 \
          -chardev spicevmc,name=usbredir,id=usbredirchardev1 \
          -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1 \
          -chardev spicevmc,name=usbredir,id=usbredirchardev2 \
          -device usb-redir,chardev=usbredirchardev2,id=usbredirdev2 \
          -chardev spicevmc,name=usbredir,id=usbredirchardev3 \
          -device usb-redir,chardev=usbredirchardev3,id=usbredirdev3 \
          -netdev user,id=user.0 -device virtio-net-pci,netdev=user.0 \
          -drive file=debian.qcow2,cache=none,aio=io_uring,if=virtio

  Output of vm initialization:

  jack: JACK output configured for 48000Hz (1024 samples)
  jack: JACK input configured for 48000Hz (1024 samples)
  gl_version 46 - core profile enabled
  GLSL feature level 430

  Though executing any application that uses sound,
  for instance, any youtube video through browser,
  I listen nothing. By executing pkill jackd, and
  launching the same script replacing the audiodev
  line for the following:

          -audiodev id=alsa,driver=alsa -device ich9-intel-hda -device
  hda-duplex,audiodev=alsa \

  The audio works, and I can listen to music, or
  any other kind of application, though I cannot
  listen anything else in the host.

  The guest is a simple debian testing(bullseye)
  system with plasma desktop, using pulseaudio,
  nothing fancy.

  Thanks!

  José

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1908832/+subscriptions

Re: [Bug 1908832] Re: jack audio dev produces no sound
Posted by no-reply@patchew.org 3 years, 2 months ago
Patchew URL: https://patchew.org/QEMU/161415330721.7209.10377443778673632209.malone@gac.canonical.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 161415330721.7209.10377443778673632209.malone@gac.canonical.com
Subject: [Bug 1908832] Re: jack audio dev produces no sound

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/161415330721.7209.10377443778673632209.malone@gac.canonical.com -> patchew/161415330721.7209.10377443778673632209.malone@gac.canonical.com
Switched to a new branch 'test'
ee0b5e3 jack audio dev produces no sound

=== OUTPUT BEGIN ===
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 8 lines checked

Commit ee0b5e3dbaff (jack audio dev produces no sound) has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/161415330721.7209.10377443778673632209.malone@gac.canonical.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com