Can't find any ALSA soundcard #3729
-
Hello everyone, I'm developing a small application that requires access to a sound card. From what I see in the experimental features, there's an option to add an audio device: audio:
# EXPERIMENTAL
# QEMU audiodev, e.g., "none", "coreaudio", "pa", "alsa", "oss".
# VZ driver, use "vz" as device name
# Choosing "none" will mute the audio output, and not play any sound.
# Choosing "default" will pick a suitable choice of: coreaudio, pa, dsound, oss.
# As of QEMU v6.2 the default is to create a disconnected sound device
# that is still visible in the guest but not connected to the host.
# 🟢 Builtin default: ""
device: null I'm using a MacBook M3, and I've tested with both vz and qemu, trying the different options available for device without ever getting a sound card in my VM (running Ubuntu and Debian). I'm using a basic template: images:
- location: https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2
arch: x86_64
- location: https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-arm64.qcow2
arch: aarch64
vmType: qemu
cpus: 4
memory: 4GiB
disk: 32GiB
networks:
- lima: bridged
containerd:
system: false
user: false
audio:
device: coreaudio aplay -L
null
Discard all samples (playback) or generate zero samples (capture) Am I missing a configuration step? Or is the feature simply unavailable? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
The "device" is what it will use on the host, so it will probably always be "coreaudio" (unless you are running Lima on Linux) That adds the sound hardware*, then you need to add the sound software inside your distribution of choice - like Ubuntu. * For now it is hardcoded to "Intel HD Audio", There is a more complete example in I don't really know what sound hardware that VZ is emulating, but that should probably be added too ( https://github.com/lima-vm/lima/blob/master/templates/experimental/alsa.yaml There is one kernel module, and one system package. EDIT: VZ uses
|
Beta Was this translation helpful? Give feedback.
Hmm, didn't think that through. There is no sound over a SSH connection! It did work in the macOS GUI.
Only in mono (-c 1) and not in stereo (-c 2), but I haven't looked at the VZ config - maybe that is normal.
Certain things are only created in macOS when you log in through the GUI, and doesn't work headless.
So I can't even do a package installation (with
installer
) on the Mac Mini, without creating a session...