Skip to content

Enable VirtIO sound in Linux guest - #782

Merged
jserv merged 1 commit into
sysprog21:masterfrom
Charlie-Tsai1123:guest/virtio-snd
Sep 23, 2026
Merged

jserv merged 1 commit into
sysprog21:masterfrom
Charlie-Tsai1123:guest/virtio-snd

Conversation

@Charlie-Tsai1123

@Charlie-Tsai1123 Charlie-Tsai1123 commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Prepare the rv32emu Linux guest image for the VirtIO sound device implementation in #761.

This PR only adds the guest-side Linux and Buildroot configuration required for VirtIO sound support. The emulator-side VirtIO sound device implementation remains in #761.

Why this is separated from #761

The emulator-side VirtIO sound implementation is being developed in #761, but its CI test requires a Linux image that already contains the virtio_snd driver and ALSA userspace tools.

The regular rv32emu CI does not rebuild the Linux kernel and Buildroot root filesystem for every pull request. Instead, github workflow normally fetch the published Linux-Image artifact from:

https://github.com/sysprog21/rv32emu-prebuilt/releases

Linux image generation is handled separately by .github/workflows/build-linux-artifacts.yml.
It runs after relevant changes reach master, rebuilds the guest with make build-linux-image, and publishes a new Linux-Image to rv32emu-prebuilt.

Therefore, this small PR prepares the guest-side VirtIO sound support separately from #761. After it is merged and the Build Linux artifact workflow completes successfully, the published Linux image is expected to contain the virtio_snd driver and ALSA utilities required by the CI test.


Summary by cubic

Prepares the prebuilt Linux guest image for the upcoming VirtIO sound device implementation by enabling the Linux sound subsystem and VirtIO sound driver, and adding ALSA command-line utilities to the Buildroot root filesystem.

  • The kernel config now enables CONFIG_SOUND, CONFIG_SND, CONFIG_SND_PCM, CONFIG_SND_TIMER, and CONFIG_SND_VIRTIO.
  • Buildroot now ships alsa-utils with aplay and speaker-test.

This is guest-side configuration only; the emulator-side VirtIO sound device implementation stays in #761. After merge, the Build Linux artifact workflow rebuilds the image, so the published Linux-Image will include the driver and tools the CI test needs.

Written for commit a60e342. Summary will update on new commits.

Review in cubic

Prepare the prebuilt Linux guest image for the VirtIO sound device
implementation.

Enable the Linux sound subsystem and VirtIO sound driver:
- CONFIG_SOUND provides the top-level sound subsystem support.
- CONFIG_SND enables ALSA support.
- CONFIG_SND_PCM provides PCM playback support used by virtio-snd.
- CONFIG_SND_TIMER provides the ALSA timer infrastructure.
- CONFIG_SND_VIRTIO enables the Linux VirtIO sound driver.

Also enable the ALSA command-line utilities in Buildroot:
- BR2_PACKAGE_ALSA_UTILS provides the ALSA userspace utility package.
- BR2_PACKAGE_ALSA_UTILS_APLAY provides aplay, which is used by the
  virtio-snd smoke test to verify PCM device enumeration.
- BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST provides speaker-test for manual
  PCM playback verification.
cubic-dev-ai[bot]

This comment was marked as resolved.

@jserv
jserv merged commit 19f5a79 into sysprog21:master Sep 23, 2026
17 checks passed
@jserv jserv added this to the release-2026.2 milestone Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants