Framework architecture

Updated: April 19, 2023

The Shared Audio framework enables guests running in virtual machines (VMs) to access audio drivers and services running in the hypervisor host.

Note:

This chapter assumes that you are already familiar with the concepts presented in the following documentation:

We also recommend that you become familiar with the basic concepts presented in the Audio Developer's Guide.

The audio framework provides a virtual device (vdev), virtio-snd, that enables guests to access the audio functionality provided by one or more audio hardware drivers in the host. This vdev is based on the unofficial draft version 1.2 of the VirtIO standard.

Audio sharing

The host manages all interactions between guests and physical audio devices:
  • The hypervisor host owns the physical devices and runs drivers (deva-*) for those devices.
  • If the guest in a VM requires access to the physical devices, the VM presents the audio vdev (virtio-snd) to the guest and the guest runs a VirtIO sound driver to interact with the vdev. This sound driver is loaded by the native audio service for the OS; for example, for a QNX Neutrino guest, io-audio is the audio service.
  • To communicate with each other, the guest driver and the vdev use virtqueues, which are the standard mechanism for bulk data transport on VirtIO devices.
  • Applications on the host can use the QNX audio service of io-audio to access audio devices (e.g., speakers)
The diagram below illustrates the interactions between guests and audio hardware, managed by the hypervisor host through virtio-snd vdevs.

Architectural diagram showing how guest, host, and hardware components interact to allow guest and host applications to share audio devices
Figure 1. Shared Audio framework architecture
Note: For more information on device sharing in the QNX Hypervisor, see the section on “Devices” in the “Understanding QNX Virtual Environments” chapter of the QNX Hypervisor User's Guide.