# momochisoundpost/ds-orca-mk3-driver architecture

> Architecture diagram of the GitHub repository momochisoundpost/ds-orca-mk3-driver, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/momochisoundpost/ds-orca-mk3-driver
- Repository: https://github.com/momochisoundpost/ds-orca-mk3-driver

## Overview

This repository provides a Windows USB audio driver, native ASIO interface, and tray control panel for the DS-ORCA MK3. The main workflow is a DAW opening the ASIO driver, which communicates with the kernel driver to stream audio over USB; the WaveRT path also enables Windows audio clients to share the device. The panel reports device and client state and applies buffer, safe-mode, and volume settings. Edges follow shown calls, shared interfaces, or README descriptions; unsampled implementation details are left unconnected where evidence is limited.

Main entry points: [`asio/ds_orca_asio.cpp`](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/asio/ds_orca_asio.cpp) (ASIO interface), [`driver/wavert.cpp`](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/wavert.cpp) (WaveRT streams and mixer), [`driver/usb_uac2.c`](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/usb_uac2.c) (Control interface), [`driver/usb_isoch.c`](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/usb_isoch.c) (USB isochronous I/O)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Audio clients"]
  node_daw(("DAW"))
  node_windows(("Windows audio clients"))
  node_asio["ASIO interface<br/>[ds_orca_asio.cpp]"]
  node_asio_setup["ASIO setup dialog<br/>[control_panel.cpp]"]
end

subgraph group_driver["Kernel audio driver"]
  node_driver_adapter["Device adapter<br/>[adapter.cpp]"]
  node_driver_ioctl["Control interface<br/>[usb_uac2.c]"]
  node_driver_topology["Audio topology<br/>[topology.cpp]"]
  node_driver_asio["ASIO stream interface<br/>[asio_iface.cpp]"]
  node_driver_wavert["WaveRT streams and mixer<br/>[wavert.cpp]"]
  node_driver_isoch["USB isochronous I/O<br/>[usb_isoch.c]"]
end

subgraph group_core["Audio processing"]
  node_uac2["UAC2 descriptor parser<br/>[uac2_desc.c]"]
  node_cadence["USB cadence<br/>[cadence.c]"]
  node_pcm["PCM 24-bit conversion<br/>[pcm24.c]"]
  node_mixer["Mixer and resampling<br/>[mixer_src.c]"]
end

subgraph group_panel["Control panel"]
  node_panel_app["Tray app<br/>[ds_orca_panel.cpp]"]
  node_panel_backend["Device settings backend<br/>[panel_backend.cpp]"]
  node_panel_ui["Five-tab UI<br/>[panel_ui.cpp]"]
  node_volume["Windows volume controls"]
end

node_usb_device{{"DS-ORCA MK3"}}
node_ioctl_abi["Driver IOCTL ABI<br/>[dsorca_ioctl.h]"]
node_panel_ipc["Panel IPC definitions<br/>[dsorca_panel_ipc.h]"]

node_daw -->|"opens device"| node_asio
node_asio -->|"sends control requests"| node_driver_ioctl
node_asio -.->|"shares stream buffers"| node_driver_asio
node_windows -->|"uses WaveRT"| node_driver_wavert
node_driver_wavert -.->|"mixes clients"| node_mixer
node_driver_adapter -.->|"configures topology"| node_driver_topology
node_driver_ioctl -.->|"controls streaming"| node_driver_isoch
node_driver_isoch -->|"transfers audio"| node_usb_device
node_driver_adapter -.->|"uses parser"| node_uac2
node_driver_isoch -.->|"uses cadence"| node_cadence
node_driver_wavert -.->|"converts samples"| node_pcm
node_driver_wavert -.->|"uses processing"| node_mixer
node_panel_app -->|"queries and applies"| node_panel_backend
node_panel_app -->|"updates display"| node_panel_ui
node_panel_ui -->|"sets volume"| node_volume
node_panel_backend -->|"queries device"| node_driver_ioctl
node_asio_setup -->|"configures buffer"| node_asio
node_asio -.->|"requests panel"| node_panel_app
node_asio -->|"uses interface"| node_ioctl_abi
node_driver_ioctl -.->|"implements interface"| node_ioctl_abi
node_panel_backend -->|"uses settings protocol"| node_panel_ipc
node_asio -->|"uses settings protocol"| node_panel_ipc

click node_asio "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/asio/ds_orca_asio.cpp"
click node_asio_setup "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/asio/control_panel.cpp"
click node_driver_adapter "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/adapter.cpp"
click node_driver_ioctl "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/usb_uac2.c"
click node_driver_topology "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/topology.cpp"
click node_driver_asio "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/asio_iface.cpp"
click node_driver_wavert "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/wavert.cpp"
click node_driver_isoch "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/usb_isoch.c"
click node_uac2 "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/core/uac2_desc.c"
click node_cadence "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/core/cadence.c"
click node_pcm "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/core/pcm24.c"
click node_mixer "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/core/mixer_src.c"
click node_panel_app "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/panel/ds_orca_panel.cpp"
click node_panel_backend "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/panel/panel_backend.cpp"
click node_panel_ui "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/panel/panel_ui.cpp"
click node_volume "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/panel/volume_endpoint.cpp"
click node_ioctl_abi "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/shared/dsorca_ioctl.h"
click node_panel_ipc "https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/shared/dsorca_panel_ipc.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_daw,node_windows,node_asio,node_asio_setup toneBlue
class node_driver_adapter,node_driver_ioctl,node_driver_topology,node_driver_asio,node_driver_wavert,node_driver_isoch toneAmber
class node_uac2,node_cadence,node_pcm,node_mixer toneMint
class node_panel_app,node_panel_backend,node_panel_ui,node_volume toneRose
class node_usb_device toneIndigo
class node_ioctl_abi,node_panel_ipc toneTeal
```

## Components

### Audio clients

- **DAW**
- **Windows audio clients**
- [ASIO interface](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/asio/ds_orca_asio.cpp): `asio/ds_orca_asio.cpp`
- [ASIO setup dialog](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/asio/control_panel.cpp): `asio/control_panel.cpp`

### Kernel audio driver

- [Device adapter](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/adapter.cpp): `driver/adapter.cpp`
- [Control interface](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/usb_uac2.c): `driver/usb_uac2.c`
- [Audio topology](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/topology.cpp): `driver/topology.cpp`
- [ASIO stream interface](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/asio_iface.cpp): `driver/asio_iface.cpp`
- [WaveRT streams and mixer](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/wavert.cpp): `driver/wavert.cpp`
- [USB isochronous I/O](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/driver/usb_isoch.c): `driver/usb_isoch.c`

### Audio processing

- [UAC2 descriptor parser](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/core/uac2_desc.c): `core/uac2_desc.c`
- [USB cadence](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/core/cadence.c): `core/cadence.c`
- [PCM 24-bit conversion](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/core/pcm24.c): `core/pcm24.c`
- [Mixer and resampling](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/core/mixer_src.c): `core/mixer_src.c`

### Control panel

- [Tray app](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/panel/ds_orca_panel.cpp): `panel/ds_orca_panel.cpp`
- [Device settings backend](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/panel/panel_backend.cpp): `panel/panel_backend.cpp`
- [Five-tab UI](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/panel/panel_ui.cpp): `panel/panel_ui.cpp`
- [Windows volume controls](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/panel/volume_endpoint.cpp): `panel/volume_endpoint.cpp`

### Other components

- **DS-ORCA MK3**
- [Driver IOCTL ABI](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/shared/dsorca_ioctl.h): `shared/dsorca_ioctl.h`
- [Panel IPC definitions](https://github.com/momochisoundpost/ds-orca-mk3-driver/blob/main/shared/dsorca_panel_ipc.h): `shared/dsorca_panel_ipc.h`

## Connections

- DAW → ASIO interface: opens device (evidence: `README.md`)
- ASIO interface → Control interface: sends control requests (evidence: `asio/ds_orca_asio.cpp`)
- ASIO interface → ASIO stream interface: shares stream buffers
- Windows audio clients → WaveRT streams and mixer: uses WaveRT (evidence: `README.md`)
- WaveRT streams and mixer → Mixer and resampling: mixes clients
- Device adapter → Audio topology: configures topology
- Control interface → USB isochronous I/O: controls streaming
- USB isochronous I/O → DS-ORCA MK3: transfers audio (evidence: `README.md`)
- Device adapter → UAC2 descriptor parser: uses parser
- USB isochronous I/O → USB cadence: uses cadence
- WaveRT streams and mixer → PCM 24-bit conversion: converts samples
- WaveRT streams and mixer → Mixer and resampling: uses processing
- Tray app → Device settings backend: queries and applies (evidence: `panel/ds_orca_panel.cpp`)
- Tray app → Five-tab UI: updates display (evidence: `panel/ds_orca_panel.cpp`)
- Five-tab UI → Windows volume controls: sets volume (evidence: `panel/panel_ui.cpp`)
- Device settings backend → Control interface: queries device
- ASIO setup dialog → ASIO interface: configures buffer (evidence: `asio/control_panel.cpp`)
- ASIO interface → Tray app: requests panel
- ASIO interface → Driver IOCTL ABI: uses interface (evidence: `asio/ds_orca_asio.cpp`)
- Control interface → Driver IOCTL ABI: implements interface
- Device settings backend → Panel IPC definitions: uses settings protocol
- ASIO interface → Panel IPC definitions: uses settings protocol (evidence: `asio/ds_orca_asio.cpp`)
