Sound doesnt work on debian guest + debian host using Pipewire
<!--
This is the upstream QEMU issue tracker.
If you are able to, it will greatly facilitate bug triage if you attempt
to reproduce the problem with the latest qemu.git master built from
source. See https://www.qemu.org/download/#source for instructions on
how to do this.
QEMU generally supports the last two releases advertised on
https://www.qemu.org/. Problems with distro-packaged versions of QEMU
older than this should be reported to the distribution instead.
See https://www.qemu.org/contribute/report-a-bug/ for additional
guidance.
If this is a security issue, please consult
https://www.qemu.org/contribute/security-process/
-->
## Host environment
- Operating system: Debian trixie <!-- Windows 10 21H1, Fedora 37, etc. -->
- OS/kernel version: 6.10.6-amd64 <!-- For POSIX hosts, use `uname -a` -->
- Architecture: x86_64 <!-- x86, ARM, s390x, etc. -->
- QEMU flavor: qemu-system-x86_64 <!-- qemu-system-x86_64, qemu-aarch64, qemu-img, etc. -->
- QEMU version: 9.0.2 <!-- e.g. `qemu-system-x86_64 --version` -->
- QEMU command line: N/A
<!--
Give the smallest, complete command line that exhibits the problem.
If you are using libvirt, virsh, or vmm, you can likely find the QEMU
command line arguments in /var/log/libvirt/qemu/$GUEST.log.
```
./qemu-system-x86_64 -M q35 -m 4096 -enable-kvm -hda fedora32.qcow2
```
-->
## Emulated/Virtualized environment
- Operating system: Debian bookworm/12 <!-- Windows 10 21H1, Fedora 37, etc. -->
- OS/kernel version: 6.1.0-25 <!-- For POSIX guests, use `uname -a`. -->
- Architecture: x86_64 <!-- x86, ARM, s390x, etc. -->
## Description of problem
<!-- Describe the problem, including any error/crash messages seen. -->
There is no sound on Debian Stable VM. Im using SPICE for audio redirection.
## Steps to reproduce
1. Download debian stable ISO (12 atm)
2. Install it on your KVM
3. Make sure your host and your guest are using pipewire (check https://wiki.debian.org/PipeWire#Installation)
4. No sound is transmitted to the host.
## Additional information
- I have tried switching SPICE to something else like ALSA, but it will result in hanging of the video page similar to this video:
https://github.com/QubesOS/qubes-issues/issues/1698#issuecomment-1031376517
- Tried to use direct pipewire, but resulted into error:
```
Error starting domain: internal error: process exited while connecting to monitor: 2024-09-04T18:13:40.241754Z qemu-system-x86_64: Unknown audio driver pipewire'. Perhaps you want to install qemu-system-gui package?
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
ret = fn(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/virt-manager/virtManager/object/domain.py", line 1402, in startup
self._backend.create()
File "/usr/lib/python3/dist-packages/libvirt.py", line 1379, in create
raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: process exited while connecting to monitor: 2024-09-04T18:13:40.241754Z qemu-system-x86_64: Unknown audio driver pipewire'. Perhaps you want to install qemu-system-gui package?
```
Yes i have installed "qemu-system-gui" but still got the same message.
Debian XML with SPICE:
[Debian-XML.txt](/uploads/66e09b37f672b49f8f0a0a01d3c6a6b2/Debian-XML.txt)
<!--
Attach logs, stack traces, screenshots, etc. Compress the files if necessary.
If using libvirt, libvirt logs and XML domain information may be relevant.
-->
<!--
The line below ensures that proper tags are added to the issue.
Please do not remove it.
-->
issue