Introduction
Ahsoka.Extensions.AudioManager is an OpenPV Extension that adds audio configuration and control to applications running on Enovation Controls OpenView Displays. It owns everything related to audio on the display — routing inputs and outputs, volume and EQ, subwoofer crossover, playing short audio prompts (.wav files), tuning an AM/FM/DAB radio, and driving an A2B (Automotive Audio Bus) peripheral network for external amplifiers and DSP nodes.
Like other OpenPV Extensions, it follows the standard Ahsoka Service Framework pattern: functionality is exposed as one or more independent Client/Service pairs that your application talks to, rather than as a library you link directly against hardware.
Table of Contents
Services
The extension registers three independent Ahsoka Services:
- AudioManagerService — Input/output routing, volume, EQ, subwoofer, and audio prompt playback
- A2BService — A2B bus control — enable/disable/reset the bus, and read/write peripheral nodes (amplifiers, DSPs)
- TunerService — AM/FM/DAB tuner control — enable/disable, seek, frequency/station selection, background scanning
Because these services are registered with AutoStart behavior in the extension's .extensioninfo.json, they start automatically alongside your application — you do not need to start them yourself. Your application only needs to construct the relevant *ServiceClient to talk to them. See Getting Started for examples.
Each service follows the same client/service split used throughout OpenPV:
- AudioManagerService / AudioManagerServiceClient — the primary service most applications will use. Exposes configuration get/set, input switching (including a "ducked" alternate input for things like navigation prompts), output enable/disable, volume, EQ bands, and audio prompt playback. It also raises notifications (
AudioSystemReady,VolumeChanged,PromptFinished,SourcePortChanged) so UI can stay in sync without polling. - A2BService / A2BServiceClient — lower-level bus control (
Enable,Disable,Reset,SendCommChMessage,PeripheralWrite,PeripheralRead), plus a higher-levelA2BAmpPluginlayered on top for common amplifier operations (master/zone volume, mute, balance) without needing to speak the peripheral's native protocol directly. - TunerService / TunerServiceClient — tuner enable/disable, active/inactive state, frequency selection, seek/search, DAB program selection, and background scanning for station data.
Hardware Abstraction
Above the services sits a Hardware/ layer that talks to the actual audio hardware:
- AudioController — top-level composition object that wires together the input and output controllers and holds shared platform constants (I2C channel, GPIO expansion chip, default sink).
- AudioInputController — wraps PulseAudio to manage sinks, sink-inputs, and input ducking/crossfade behavior.
- AudioOutputController — wraps the on-board codec/DSP output path: enabling the audio system, enabling outputs, and configuring EQ bands, subwoofer crossover, and output volume.
- A2BAudioController — wraps the A2B master controller (enable/disable/reset, peripheral read/write, and async callbacks for message/status/discovery events).
These hardware classes P/Invoke into native .so libraries (Ahsoka.AudioInput, Ahsoka.AudioOutput, Ahsoka.A2B, Ahsoka.Tuner) that are built separately and packaged for linux-arm64 targets. When running on a target device, SystemInfo.CurrentPlatform selects the real Linux implementation; when running on a desktop platform for development, a Desktop* stub implementation is used instead so your application code runs without a physical audio card attached.
Configuration Model
Audio hardware topology is described declaratively rather than through hardware-specific classes:
AudioManagerConfigurationholds one or moreCardConfigurationentries. Each card lists itsInputsandOutputsasPortInfoentries (each tagged with aKnownPortstype — tuner, Bluetooth, USB/media library, application audio, analog/digital output, etc.), plus aSubwooferSetupand feature flags (SupportsTuner,SupportsA2BOutput,SupportsBluetoothAudio, and so on).A2BConfigurationholds a list ofNodeConfigurationentries, each typed as aGenericNode,HertzAmplifier, orXMLNode(a generically scriptable peripheral), plus a set ofZonesfor multi-zone amplifier setups.
This configuration is authored once and serialized to .pbuff/.json pairs that ship with your application package.