Skip to content

Assertion failure in virtio_snd_get_qemu_format()

Host environment

  • Operating system: Ubuntu 22.04.4 LTS
  • OS/kernel version: Linux 6.5.0-25-generic
  • Architecture: x86_64
  • QEMU flavor: 9.0.1
  • QEMU version: commit 3665dd6b

Description of problem

The following log reveals it:

ERROR:hw/audio/virtio-snd.c:356:virtio_snd_get_qemu_format: code should not be reached
Bail out! ERROR:hw/audio/virtio-snd.c:356:virtio_snd_get_qemu_format: code should not be reached
Aborted

Steps to reproduce

cat << EOF | qemu-system-x86_64 -display none \
-machine accel=qtest, -m 512M -machine q35 -device \
virtio-sound,audiodev=my_audiodev,streams=2 -audiodev \
alsa,id=my_audiodev -qtest stdio
outl 0xcf8 0x80001804
outw 0xcfc 0x06
outl 0xcf8 0x80001820
outl 0xcfc 0xe0008000
write 0xe0008020 0x4 0x00001000
write 0xe0008028 0x4 0x00101000
write 0xe000801c 0x1 0x01
write 0x10c000 0x1 0x01
write 0x10c001 0x1 0x01
write 0x10c014 0x1 0x01
write 0x10c015 0x1 0x51
write 0x100001 0x1 0xc0
write 0x100002 0x1 0x10
write 0x100008 0x1 0x18
write 0x10f000 0x1 0x02
write 0x10f001 0x1 0x01
write 0x100021 0x1 0xf0
write 0x100022 0x1 0x10
write 0x100028 0x1 0x08
write 0x101006 0x1 0x02
write 0x101002 0x1 0x02
write 0xe000b001 0x1 0x00
EOF
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information