Skip to content

mischa85/Ozzy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ›οΈ Ozzy - USB Audio & MIDI Driver for Non-Class Compliant Devices

Bringing legacy professional audio hardware back to life.

Modern operating systems dropped support for non-class compliant USB audio devicesβ€”hardware that doesn't follow the standard USB Audio Class specification. These devices require vendor-specific drivers, and when manufacturers abandon them, perfectly good professional equipment becomes unusable.

Ozzy fixes that.

This is an open-source, reverse-engineered driver supporting non-class compliant USB audio interfacesβ€”high-end DJ mixers and audio processors that were left behind when official driver support ended.

Currently Supported Devices:

  • Allen & Heath Xone:DB4, DB2, DX, 4D (Ploytec-based protocol)

More devices can be addedβ€”the architecture separates the audio engine from device protocols.


πŸš€ What Makes These Devices Non-Class Compliant?

Standard USB Audio Class devices work automatically with any modern OSβ€”they follow a universal protocol. But professional hardware often needs:

  • Custom audio routing beyond simple stereo in/out
  • Hardware-specific DSP control and mixer integration
  • Proprietary USB protocols for low-latency performance
  • Special MIDI implementations for controller integration

These devices never worked with generic OS drivers. They require vendor-specific drivers. When vendors stop supporting them, the hardware stops working on new OS versions.

Ozzy reverses the protocol and provides modern driversβ€”so your equipment keeps working.


🎚️ Supported Devices

Device Channels Sample Rates Status
Allen & Heath Xone:DB4 8Γ—8 44.1/48/88.2/96 kHz βœ… Perfect
Allen & Heath Xone:DB2 8Γ—8 44.1/48/88.2/96 kHz βœ… Perfect
Allen & Heath Xone:DX 8Γ—8 44.1/48/88.2/96 kHz βœ… Perfect
Allen & Heath Xone:4D 8Γ—8 44.1/48/88.2/96 kHz βœ… Perfect

πŸ–₯️ Platform Support

Ozzy provides native kernel-mode drivers for maximum performance and compatibility.

🍎 macOS (Multiple Backend Options)

Flexible architecture supporting three backend implementations:

Current: Kernel Extension (Kext) - Recommended

  • Audio: 8Γ—8 channels via CoreAudio HAL
  • MIDI: Full CoreMIDI support with lock-free ring buffers
  • Latency: Sub-millisecond performance via zero-copy ring buffers
  • Requirements: macOS 11+, SIP modified for kext loading (csrutil enable --without kext)
  • Status: βœ… Fully implemented and stable

Planned: DriverKit Extension (Dext)

  • Modern sandboxed system extension
  • Requires Apple entitlements for production use
  • Same performance as kext, future-proof architecture
  • Status: 🚧 In development (legacy prototype in legacy/mac-coreaudio/)

Planned: Userspace Daemon

  • No kernel extension required
  • Works with full SIP enabled
  • Slightly higher latency but maximum compatibility
  • Status: 🚧 Planned

All backends share the same CoreAudio HAL and CoreMIDI driversβ€”only the USB communication layer changes. Choose the backend that fits your security and performance requirements.

Location: macos/

🐧 Linux (ALSA Kernel Module)

Standard ALSA kernel module with automatic transfer mode detection.

  • Audio: 8Γ—8 channels (PCM)
  • MIDI: ALSA Sequencer In/Out
  • Modes: Automatic BULK/INTERRUPT transfer detection
  • Integration: Works seamlessly with JACK, PulseAudio, PipeWire
  • Location: linux/

πŸͺŸ Windows

Coming soon. WASAPI kernel-mode driver in development.

Why kernel mode?
Non-class compliant devices need direct USB pipe access and precise timing that's only possible in kernel space. User-space solutions add latency and complexityβ€”kernel drivers provide the clean, low-latency performance these professional devices were designed for.


πŸ’Ώ Installation

🍎 macOS

Quick Install:

  1. Open Terminal and navigate to the macos/ directory
  2. Run: ./install.command
  3. Enter your password when prompted
  4. Plug in your mixer

The installer automatically:

  • βœ… Checks SIP configuration
  • βœ… Compiles the kernel extension
  • βœ… Builds HAL and MIDI drivers
  • βœ… Installs to system directories
  • βœ… Configures auto-loading at boot
  • βœ… Starts drivers immediately

Requirements:

  • macOS 11+ (Big Sur or later)
  • SIP modification: Run csrutil enable --without kext in Recovery Mode
  • Apple Developer certificate in Keychain (free Apple ID works)

Uninstall: Run macos/uninstall.command

Troubleshooting: Run macos/debuglogs.command to collect diagnostic logs

For detailed information, see macos/README.md

🐧 Linux

  1. Clone and build:
    git clone https://github.com/mischa85/snd-xonedb4
    cd snd-xonedb4
    sudo ./install_linux.sh
  2. That's it. We even reload the module for you.

πŸ—οΈ Building from Source (The "Signing" Pain)

If you are a developer or want to build the latest code, you must code-sign the binaries.

cd linux
make
sudo make install
sudo modprobe snd-xonedb4

Uninstall: Run linux/uninstall.sh


πŸ—οΈ Architecture

macOS Shared Memory Model

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Audio Apps     β”‚
β”‚  (Logic, etc)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ CoreAudio
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”      Shared Memory       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   OzzyHAL       │◄────────────────────────►│  OzzyKext   β”‚
β”‚  (HAL Driver)   β”‚      Ring Buffers        β”‚   (Kernel)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                          β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                                                    β”‚ USB
                                             β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
                                             β”‚  Hardware   β”‚
                                             β”‚  (Xone:DB4) β”‚
                                             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Components:

  • OzzyKext - Kernel extension handling USB communication
  • OzzyHAL - CoreAudio HAL driver for audio I/O
  • OzzyMIDI - CoreMIDI driver for MIDI I/O

Zero-copy architecture with lock-free ring buffers in shared memory for minimal latency.


πŸ› οΈ For Developers

Ozzy is designed as a reference implementation for supporting non-class compliant USB audio devices.

Why This Matters

Most USB audio driver examples you'll find online are either:

  • Class-compliant only - They work with standard UAC devices but can't handle vendor protocols
  • User-space hacks - They add latency and complexity to work around kernel restrictions
  • Closed source - Manufacturers don't share how their protocols work

Ozzy provides a clean, open-source example of how to:

  • Reverse engineer vendor-specific USB audio protocols
  • Implement kernel drivers for direct USB pipe access
  • Build zero-copy architectures with shared memory ring buffers
  • Support multiple platforms with a shared protocol layer

Architecture Highlights

  • Device-agnostic core: The audio engine (OzzyCore) is separated from device protocol implementations, making it easy to support additional vendors
  • Platform-portable: Linux and macOS implementations share the USB protocol code
  • Performance-first: No unnecessary data copies, context switches, or latency-inducing abstractions
  • Lock-free design: Ring buffers use atomic operations for thread-safe, real-time audio

Repository Structure

Ozzy/
β”œβ”€β”€ linux/          # Linux ALSA kernel module
β”œβ”€β”€ macos/          # macOS kext + HAL/MIDI drivers
β”‚   β”œβ”€β”€ OzzyCore/   # Device-agnostic audio engine
β”‚   β”œβ”€β”€ Devices/    # Device-specific protocol implementations
β”‚   └── Backends/   # Platform backends (Kext, future Dext)
β”œβ”€β”€ windows/        # Windows WASAPI driver (WIP)
└── legacy/         # Archived experiments and old implementations

Whether you need to support your own legacy hardware or understand how professional audio drivers work, this codebase provides a solid foundation.


πŸ› Troubleshooting & Bug Reports

macOS driver won't load?

  • Check SIP status: csrutil status (should show "Kext Signing: disabled")
  • View kernel logs: sudo dmesg | grep Ozzy
  • Collect debug logs: Run macos/debuglogs.command

No audio device appearing?

  • Ensure hardware is connected
  • Restart CoreAudio: sudo killall coreaudiod
  • Check Audio MIDI Setup app

Linux module issues?

  • Check kernel logs: dmesg | grep xonedb4
  • Verify module loaded: lsmod | grep snd_xonedb4

Reporting Issues: When filing a bug report, please include:

  1. Platform and OS version
  2. Device model
  3. Debug logs (use macos/debuglogs.command on macOS)
  4. Steps to reproduce

πŸ“œ Legacy Implementations

The legacy/ directory contains archived driver implementations:

  • mac-coreaudio/ - DriverKit-based system extension (requires SIP disabled)
  • mac-hal/ - Early user-space HAL plugin experiments
  • Old installation scripts and utilities

These are kept for reference but are not actively maintained.


β˜• Support the Project

If this driver saved your mixer from the e-waste bin, consider supporting the development.

Buy Me A Coffee

πŸ“„ License

MIT License. Do whatever you want with it.

See LICENSE for details.

About

Driver for several Ploytec interfaces

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published