Driver

Configuration

This page covers all configuration options for the Open Apollo driver, including kernel module parameters, PipeWire/WirePlumber integration, UCM2 profiles, and systemd service setup.


Module Parameters

The ua_apollo module accepts the following parameters, which can be set when loading the module with insmod or modprobe.

ParameterTypeDefaultDescription
play_chint-1 (auto)Override playback channel count
rec_chint-1 (auto)Override record channel count
no_connectboolfalseSkip the ACEFACE DSP connect handshake at probe (for debugging)
warm_bootboolfalseSkip firmware load and DSP connect; assume device is already initialized from a previous boot

Channel Count Override

By default, the driver auto-detects channel counts from the device model:

ModelPlaybackCapturePreampsHiZ
Apollo Solo3210
Arrow3210
Apollo Twin X8822
Apollo x4242242
Apollo x6242242
Apollo x8262642
Apollo x8p262682
Apollo x16343482

To override (e.g., to limit to stereo for testing):

sudo modprobe ua_apollo play_ch=2 rec_ch=2

If only play_ch is specified, rec_ch defaults to the same value. When overriding channel counts, preamp ALSA controls are disabled.

Warm Boot Mode

If the Apollo was previously initialized by another operating system in a dual-boot configuration, you can skip firmware loading:

sudo modprobe ua_apollo warm_boot=1

This skips both firmware upload and the ACEFACE connection handshake, assuming the DSP is already running. The driver will still re-program the DMA scatter-gather table (since the previous OS's physical addresses are invalid) and create the ALSA card.

Debug Mode (no_connect)

For crash debugging, you can load the driver without attempting the DSP connection:

sudo modprobe ua_apollo no_connect=1

The driver will probe the device, map registers, and create the chardev, but will not start audio transport. Audio will not work in this mode.

Making Parameters Persistent

Create a modprobe configuration file:

sudo tee /etc/modprobe.d/ua-apollo.conf <<EOF
options ua_apollo play_ch=24 rec_ch=22
EOF

PipeWire Configuration

WirePlumber Rules

The project includes a WirePlumber configuration file that sets optimal defaults for Apollo interfaces. Deploy it to /etc/wireplumber/main.lua.d/51-ua-apollo.lua:

sudo cp configs/wireplumber/51-ua-apollo.lua /etc/wireplumber/main.lua.d/

This configuration applies the following properties to all Apollo ALSA nodes:

PropertyValueReason
api.alsa.disable-mmaptrueDriver uses copy callbacks (no mmap support)
session.suspend-timeout-seconds0Keeps device open; avoids repeated transport resets
audio.formatS32LENative Apollo sample format (32-bit signed, little-endian)
audio.rate48000Default sample rate
api.alsa.soft-mixertrueUse software volume; don't touch hardware monitor level
node.nickApolloFriendly name in desktop audio settings

Pro-Audio Profile

WirePlumber does not auto-select the pro-audio profile. After PipeWire starts, set it manually:

# Find the Apollo device ID
wpctl status

# Set pro-audio profile (replace <id> with the device ID)
wpctl set-profile <id> pro-audio

To make this automatic, you can create a WirePlumber script or a systemd user service that runs after wireplumber.service.


UCM2 Profiles

UCM2 (Use Case Manager 2) profiles tell ALSA and PipeWire about the device's channel layout and capabilities.

Deployment

sudo mkdir -p /usr/share/alsa/ucm2/ua_apollo
sudo mkdir -p /usr/share/alsa/ucm2/conf.d/ua_apollo
sudo cp configs/ucm2/ua_apollo/ua_apollo.conf /usr/share/alsa/ucm2/ua_apollo/
sudo cp configs/ucm2/ua_apollo/HiFi.conf /usr/share/alsa/ucm2/ua_apollo/
sudo ln -sf ../../ua_apollo/ua_apollo.conf \
    /usr/share/alsa/ucm2/conf.d/ua_apollo/ua_apollo.conf

Or use the included deployment script:

sudo bash configs/deploy.sh

Channel Layout (Apollo x4)

The HiFi profile exposes all DMA channels:

Playback (24 channels):

DMAAssignmentDMAAssignment
0-1Monitor L/R2-5Line 1-4
6-7S/PDIF L/R8-15Virtual 1-8
16-17CUE1 L/R18-19CUE2 L/R
20-21CUE3 L/R22-23CUE4 L/R

Capture (22 channels):

DMAAssignmentDMAAssignment
0-1Mic 1-22-3Line 3-4
4-5S/PDIF L/R6-13Virtual 1-8
14-15Monitor L/R16-17Aux1 L/R
18-19Aux2 L/R20-21Talkback 1-2

ALSA Controls

The driver registers ALSA mixer controls dynamically based on the detected model. Use amixer or alsamixer to view and modify them.

List All Controls

amixer -c Apollo contents

Per-Preamp Controls

For each preamp channel (e.g., 4 channels on Apollo x4), the following controls are created:

Control NameTypeRangeDescription
Line N Capture VolumeInteger10-65 (dB)Preamp gain
Mic N 48V Phantom Power SwitchBoolean0/1Phantom power
Line N Pad SwitchBoolean0/1Input pad
Line N Phase Invert SwitchBoolean0/1Phase inversion
Line N LowCut SwitchBoolean0/1High-pass filter
Line N Input SelectEnumMic/LineInput source

Monitor Controls

Control NameTypeRangeDescription
Monitor Playback VolumeInteger0-192Monitor output level
Monitor Playback SwitchBoolean0/1Monitor mute
Monitor Dim SwitchBoolean0/1Dim mode
Monitor Dim LevelInteger1-7Dim attenuation
Monitor Mono SwitchBoolean0/1Mono fold-down
Monitor SourceEnumMix/CUE1/CUE2Monitor source select
Monitor Talkback SwitchBoolean0/1Talkback on/off

Routing Controls

Control NameTypeOptionsDescription
Headphone 1 SourceEnumCUE1/CUE2HP1 output source
Headphone 2 SourceEnumCUE1/CUE2HP2 output source
CUE 1 Mono SwitchBoolean0/1CUE1 mono fold-down
CUE 2 Mono SwitchBoolean0/1CUE2 mono fold-down
CUE 1 Mix SwitchBoolean0/1CUE1 mix enable
CUE 2 Mix SwitchBoolean0/1CUE2 mix enable
CUE 1 Mirror SourceEnumCUE1 mirror output pair
CUE 2 Mirror SourceEnumCUE2 mirror output pair
CUE 1 Mirror SwitchBoolean0/1CUE1 mirror enable
CUE 2 Mirror SwitchBoolean0/1CUE2 mirror enable
Digital Mirror SwitchBoolean0/1Digital output mirroring

Device Controls

Control NameTypeOptionsDescription
Digital Output ModeEnumS/PDIF/ADATDigital output format
Output Reference LevelEnum+4dBu/-10dBVLine output reference
Identify SwitchBoolean0/1Identify/locate blink
S/PDIF SRC SwitchBoolean0/1Sample rate converter
DSP Spanning SwitchBoolean0/1DSP pairing mode
Clock ModeEnumInternal/ExternalClock mode
Sample RateEnum44100-192000Device sample rate
Clock SourceEnumInternal/S/PDIF/ADAT/Word ClockClock source

Example: Set Gain and Enable Phantom Power

# Set preamp 1 gain to 40 dB
amixer -c Apollo cset name='Line 1 Capture Volume' 40

# Enable 48V phantom power on channel 1
amixer -c Apollo cset name='Mic 1 48V Phantom Power Switch' 1

# Set monitor volume to -10 dB (raw value = 192 + (-10 * 2) = 172)
amixer -c Apollo cset name='Monitor Playback Volume' 172

Systemd Service for the Mixer Daemon

The mixer daemon (ua_mixer_daemon.py) bridges the hardware driver with network control protocols (TCP:4710 and WS:4720). To run it as a system service:

Create the Service File

sudo tee /etc/systemd/system/ua-mixer-daemon.service <<EOF
[Unit]
Description=Universal Audio Apollo Mixer Daemon
After=sound.target
Wants=sound.target
ConditionPathExists=/dev/ua_apollo0

[Service]
Type=simple
ExecStart=/usr/bin/python3 /opt/open-apollo/mixer-engine/ua_mixer_daemon.py -v
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

Enable and Start

sudo systemctl daemon-reload
sudo systemctl enable ua-mixer-daemon.service
sudo systemctl start ua-mixer-daemon.service

Check Status

sudo systemctl status ua-mixer-daemon.service
journalctl -u ua-mixer-daemon.service -f

Running Without Hardware

For development or testing without the Apollo connected:

python3 mixer-engine/ua_mixer_daemon.py --no-hardware --no-bonjour -v

Audio Routing Basics

The Apollo's internal mixer operates independently from the ALSA PCM streams. Audio routing is controlled through the mixer daemon, which translates high-level mix commands into hardware register writes.

Signal Flow

Physical Inputs → DSP Mixer → Monitor Outputs
                            → Headphone Outputs
                            → S/PDIF / ADAT Outputs

DAW Playback (Virtual Inputs) → DSP Mixer → Outputs

Physical Inputs → DMA Capture → DAW Recording

Key Concepts

  • Monitor outputs are the main line outputs, controlled by the Monitor Volume/Mute/Dim controls
  • CUE mixes are independent headphone/aux mixes that can be assigned to headphone outputs
  • Virtual inputs are DAW playback channels routed through the DSP mixer before reaching outputs
  • The hardware monitor knob controls the analog output level independently from PipeWire's software volume
Previous
Building from Source