Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3474

Sound from Debian 12.6 (armhf) under QEMU on Debian 12.6 (x86_64)

$
0
0
I'm running 'qemu-system-arm' under a brand new Debian 12.6 ARM installation. QEMU is running in 'system' emulation mode in which the guest OS is booted into a virtual machine environment.

For the most part, the system is working great! But the one thing disappointing me is I can't seem to get the guest OS to use the virtual sound device provided in the QEMU environment!

qemu-system-arm [QEMU for 32-bit ARM], as included in the Debian 'bookworm' repository, provides for a simulated audio card in the guest OS for only these three device models only (all PCI devices):
  • es1370: ENSONIQ AudioPCI ES1370 sound card
  • ac97: Intel 82801AA AC97 Audio compatible sound card
  • hda: Intel HD Audio Controller and HDA codec
I tried using all three models, but no matter what, it seems like the kernel drivers do not like the virtual sound card device and refuse to load. Hence, while the PCI card is present in the guest system, it cannot be used and no sound devices are available in Linux.

Here's my invocation command line:
user@debian:~$ qemu-system-arm -machine virt -cpu max -m 512M -smp 1 -drive if=none,file=DebianARM.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 -device virtio-net-pci,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22 -kernel vmlinuz -initrd initrd.img -append "root=/dev/vda2 rootwait console=ttyAMA0" -nographic -audio driver=pa,model=ac97,server=/run/user/1000/pulse/native
Inside the guest OS once it finished booting and I login, the sound card appears under 'lspci' like this:
   arm@debian:~$ sudo lspci -s 0:1.0 -vvv   00:01.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)Subsystem: Red Hat, Inc. QEMU Virtual MachineControl: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-Interrupt: pin A routed to IRQ 0

The substantial thing that is missing there is the driver! In the host Debian OS, the 'lspci' of the sound device looks like this:
   user@debian:~$ sudo lspci -s 0:14.2 -vvv   00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)Subsystem: Hewlett-Packard Company SBx00 Azalia (Intel HDA)Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-Latency: 32, Cache Line Size: 64 bytesInterrupt: pin A routed to IRQ 16NUMA node: 0Region 0: Memory at f0300000 (64-bit, non-prefetchable) [size=16K]Capabilities: [50] Power Management version 2Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-Kernel driver in use: snd_hda_intelKernel modules: snd_hda_intel

Accordingly, with no kernel driver loaded for the sound card in the guest OS, there is no /proc/asound directory, no /dev/snd directory, etc. And sound card is not available:
   arm@debian:~$ aplay -l   aplay: device_list:274: no soundcards found...

Again, I tried all three sound card models available in QEMU, with pretty much the same result! I've also tried using the ALSA driver for QEMU on the host instead of PulseAudio (pa). Quite simply, nothing seems to work to bring the audio alive in the guest OS!

I suppose this could just be a QEMU issue with the ARM virtual machines that these virtual sounds cards just don't work and the kernel driver refuses to load. However, there are a lot of options with QEMU, as well as tons of configurations in Debian as well, so I'm just sure if I should dismiss the functionality. I'm using a base Debian 12.6 ARM system just produced by the installer, so it has very few packages and there could just be something missing that prevents the kernel driver from loading? Any other thoughts, ideas, on something that might get sound to work from the ARM guest OS?

Statistics: Posted by cparke — 2024-08-29 05:23 — Replies 0 — Views 28



Viewing all articles
Browse latest Browse all 3474

Trending Articles