OpenLogi

0x8310 · equalizer

Per-band audio equalizer and microphone noise reduction for HID++ headsets — query band count and gain limits, read or write per-band gains with configurable persistence, and toggle noise reduction.

Per-band audio equalizer and microphone noise reduction for HID++ headsets. getEqInfo (function 0) returns the table dimensions: band_count, the gain range in dB, and an EqCapabilities flag indicating whether values are stored as gains or as DSP coefficients. getFrequencies (function 1) pages through the fixed centre frequency (Hz) of every band, up to seven per response. getFrequencyGains / setFrequencyGains (functions 2–3) read and write the signed per-band gains (dB), with setFrequencyGains accepting a GainPersistence selector that controls whether the new values land in RAM only, EEPROM only, or both simultaneously. A separate pair of functions (4–5) reads and writes hardware microphone noise reduction as a single boolean.

  • EqInfoband_count (up to 15 bands), db_range / db_min / db_max (gain limits in dB; effective_range() resolves the "both-zero implies ±db_range" shorthand), capabilities.
  • GainLocationEeprom (the persistent custom EQ) or Ram (the currently active EQ).
  • GainPersistenceVolatile (RAM only), VolatileAndNonVolatile (RAM + EEPROM), or NonVolatileOnly (EEPROM only).

Spec: Logitech HID++ 2.0 — x8310 equalizer. Used by: Typed wrapper in openlogi-hidpp.

Function reference

The EqualizerFeature wrapper (0x8310) exposes:

Methods

FunctionHID++ fnSignatureReturns
get_eq_info0()EqInfo
get_frequencies1(band_count: u8)Vec<u16>
get_frequency_gains2(location: GainLocation, band_count: u8)Vec<i8>
set_frequency_gains3(persistence: GainPersistence, gains: &[i8])Vec<i8>
get_mic_noise_reduction4()bool
set_mic_noise_reduction5(enabled: bool)()

All methods are async and return Result<…, Hidpp20Error>.

Types

EqInfo

EQ table information returned by get_eq_info.

FieldTypeDescription
band_countu8Number of frequency bands.
db_rangeu8Gain range in dB; used as ±db_range when db_min/db_max are both 0.
capabilitiesEqCapabilitiesHow EQ values are stored.
db_mini8Minimum gain in dB, or 0 to imply -db_range.
db_maxi8Maximum gain in dB, or 0 to imply +db_range.

Method: effective_range(&self) -> (i8, i8) — resolves the "both-zero implies ±db_range" shorthand into concrete (min, max) bounds.

EqCapabilities

Bitflags indicating how a device stores its EQ values, from get_eq_info.

FlagBit/ValueDescription
STORED_AS_GAINS0x01EQ values are stored as gains.
STORED_AS_COEFFICIENTS0x02EQ values are stored as coefficients.

GainLocation

Selects which copy of the EQ gains get_frequency_gains reads from.

VariantValueDescription
Eeprom0The custom EQ stored in EEPROM (the version-0 default).
Ram1The active EQ in RAM.

GainPersistence

Controls how set_frequency_gains persists the new gains.

VariantValueDescription
Volatile0Applied to RAM only.
VolatileAndNonVolatile1Applied to RAM and stored in EEPROM.
NonVolatileOnly2Stored in EEPROM only.

Wire format

Simple getters carry a 3-byte request payload (all zeroes except where noted); set_frequency_gains uses a 16-byte long request. All responses are read from the 16-byte extended payload.

get_eq_info (fn 0)

Request: [0x00, 0x00, 0x00]

Response (byte → field):

ByteFieldNotes
0band_countNumber of frequency bands.
1db_rangeSymmetric gain range in dB when db_min/db_max are both 0.
2capabilitiesEqCapabilities bitflags: bit 0 = STORED_AS_GAINS, bit 1 = STORED_AS_COEFFICIENTS.
3db_minMinimum gain (signed i8), or 0 to imply -db_range.
4db_maxMaximum gain (signed i8), or 0 to imply +db_range.

get_frequencies (fn 1)

Paged: the wrapper issues one request per page of up to 7 bands until all band_count frequencies are collected.

Request: [start_index, 0x00, 0x00]

ByteFieldNotes
0start_indexIndex of the first band on this page.

Response (byte → field):

ByteFieldNotes
0echoed start_indexValidated by the wrapper; returns UnsupportedResponse on mismatch.
1–2frequency[0]Big-endian u16, Hz.
3–4frequency[1]Big-endian u16, Hz.
Up to 7 frequencies per page (bytes 1–14).

get_frequency_gains (fn 2)

Request: [location, 0x00, 0x00]

ByteFieldNotes
0locationGainLocation as u8: 0 = Eeprom, 1 = Ram.

Response (byte → field):

ByteFieldNotes
0–NgainsOne signed i8 per band (cast from raw byte), up to band_count bytes.

set_frequency_gains (fn 3)

Uses call_long, a 16-byte request payload.

Request: [persistence, gain[0], gain[1], …, gain[14]]

ByteFieldNotes
0persistenceGainPersistence as u8: 0=Volatile, 1=VolatileAndNonVolatile, 2=NonVolatileOnly.
1–15gainsEach gain cast from i8 to u8; up to 15 bands.

Response (byte → field):

ByteFieldNotes
0echoed persistenceSkipped by the wrapper.
1–Nechoed gainsParsed as signed i8; returned as Vec<i8>.

get_mic_noise_reduction (fn 4)

Request: [0x00, 0x00, 0x00]

Response (byte → field):

ByteFieldNotes
0enabledNon-zero = enabled; zero = disabled. Returned as bool.

set_mic_noise_reduction (fn 5)

Request: [enabled, 0x00, 0x00]

ByteFieldNotes
0enabled1 = enable, 0 = disable.

Response is ignored.

Usage (Rust)

use hidpp::{device::Device, feature::equalizer::{EqualizerFeature, GainLocation, GainPersistence}};

// device: &mut Device, already created via Device::new(channel, index)
device.enumerate_features().await?;
if let Some(feat) = device.get_feature::<EqualizerFeature>() {
    // Query EQ table dimensions.
    let info = feat.get_eq_info().await?;
    let (min_db, max_db) = info.effective_range();

    // Read centre frequencies of all bands.
    let freqs = feat.get_frequencies(info.band_count).await?;

    // Read the currently active gains from RAM.
    let gains = feat.get_frequency_gains(GainLocation::Ram, info.band_count).await?;

    // Apply a flat EQ to RAM (volatile, no EEPROM write).
    let flat: Vec<i8> = vec![0i8; usize::from(info.band_count)];
    let echoed = feat.set_frequency_gains(GainPersistence::Volatile, &flat).await?;

    // Toggle microphone noise reduction.
    let nr_on = feat.get_mic_noise_reduction().await?;
    feat.set_mic_noise_reduction(!nr_on).await?;
}

On this page