Expand description

This crate provides a high level API for accessing and configuring a MiniDSP device. To get started, start by instantiating the right transport. If the device is locally connected via USB, use transport::hid::HidTransport. If using the WI-DG or connecting to an instance of this program running the server component, see transport::net::StreamTransport.

use anyhow::Result;
use futures::StreamExt;
use minidsp::{
    transport::{hid, Multiplexer},
    Builder, Channel, Gain, MiniDSP,

async fn main() -> Result<()> {
    // Get a list of local devices
    let mut builder = Builder::new();

    let mut devices: Vec<_> = builder
        // Probe each candidate device for its hardware id and serial number
        // Filter the list to keep the working devices
        .filter_map(|x| async move { x.ok() })

    // Use the first device for further commands
    let dsp = devices
        .expect("no devices found")
        .expect("unable to open device");

    let status = dsp.get_master_status().await?;
    println!("Master volume: {:.1}", status.volume.unwrap().0);

    // Activate a different configuration

    // Set the input gain for both input channels
    for i in 0..2 {

    // Mute the last output channel



pub use transport::MiniDSPError;
pub use biquad::Biquad;
pub use builder::Builder;


Basic biquad definition

Device discovery integrated as the builder pattern

Commands sent to the device and their responses

Static device definitions

EEPROM Addresses

Functions for framing and unframing packets, and computing their checksums

Utilities to get a mapping from the source name to the source id Most of this logic was translated from the cordova app

TCP server compatible with the official mobile and desktop application

Transport base traits for talking to devices Wraps a Stream + Sink backend into a transport


Helper object for controlling an on-device biquad filter

Hardware id and dsp version

Dialect represents the different encodings between devices

A gain between the minimum and maximum allowed values

Reference to a control having both a mute and gain setting

Input channel control

Settings applying to all outputs

High-level MiniDSP Control API

Output channel control



Types that can be read from a contiguous memory representation

Type Definitions