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.
EqInfo—band_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.GainLocation—Eeprom(the persistent custom EQ) orRam(the currently active EQ).GainPersistence—Volatile(RAM only),VolatileAndNonVolatile(RAM + EEPROM), orNonVolatileOnly(EEPROM only).
Spec: Logitech HID++ 2.0 — x8310 equalizer. Used by: Typed wrapper in
openlogi-hidpp.
Function reference
The EqualizerFeature wrapper (0x8310) exposes:
Methods
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
get_eq_info | 0 | () | EqInfo |
get_frequencies | 1 | (band_count: u8) | Vec<u16> |
get_frequency_gains | 2 | (location: GainLocation, band_count: u8) | Vec<i8> |
set_frequency_gains | 3 | (persistence: GainPersistence, gains: &[i8]) | Vec<i8> |
get_mic_noise_reduction | 4 | () | bool |
set_mic_noise_reduction | 5 | (enabled: bool) | () |
All methods are async and return Result<…, Hidpp20Error>.
Types
EqInfo
EQ table information returned by get_eq_info.
| Field | Type | Description |
|---|---|---|
band_count | u8 | Number of frequency bands. |
db_range | u8 | Gain range in dB; used as ±db_range when db_min/db_max are both 0. |
capabilities | EqCapabilities | How EQ values are stored. |
db_min | i8 | Minimum gain in dB, or 0 to imply -db_range. |
db_max | i8 | Maximum 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.
| Flag | Bit/Value | Description |
|---|---|---|
STORED_AS_GAINS | 0x01 | EQ values are stored as gains. |
STORED_AS_COEFFICIENTS | 0x02 | EQ values are stored as coefficients. |
GainLocation
Selects which copy of the EQ gains get_frequency_gains reads from.
| Variant | Value | Description |
|---|---|---|
Eeprom | 0 | The custom EQ stored in EEPROM (the version-0 default). |
Ram | 1 | The active EQ in RAM. |
GainPersistence
Controls how set_frequency_gains persists the new gains.
| Variant | Value | Description |
|---|---|---|
Volatile | 0 | Applied to RAM only. |
VolatileAndNonVolatile | 1 | Applied to RAM and stored in EEPROM. |
NonVolatileOnly | 2 | Stored 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):
| Byte | Field | Notes |
|---|---|---|
| 0 | band_count | Number of frequency bands. |
| 1 | db_range | Symmetric gain range in dB when db_min/db_max are both 0. |
| 2 | capabilities | EqCapabilities bitflags: bit 0 = STORED_AS_GAINS, bit 1 = STORED_AS_COEFFICIENTS. |
| 3 | db_min | Minimum gain (signed i8), or 0 to imply -db_range. |
| 4 | db_max | Maximum 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]
| Byte | Field | Notes |
|---|---|---|
| 0 | start_index | Index of the first band on this page. |
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0 | echoed start_index | Validated by the wrapper; returns UnsupportedResponse on mismatch. |
| 1–2 | frequency[0] | Big-endian u16, Hz. |
| 3–4 | frequency[1] | Big-endian u16, Hz. |
| … | … | Up to 7 frequencies per page (bytes 1–14). |
get_frequency_gains (fn 2)
Request: [location, 0x00, 0x00]
| Byte | Field | Notes |
|---|---|---|
| 0 | location | GainLocation as u8: 0 = Eeprom, 1 = Ram. |
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0–N | gains | One 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]]
| Byte | Field | Notes |
|---|---|---|
| 0 | persistence | GainPersistence as u8: 0=Volatile, 1=VolatileAndNonVolatile, 2=NonVolatileOnly. |
| 1–15 | gains | Each gain cast from i8 to u8; up to 15 bands. |
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0 | echoed persistence | Skipped by the wrapper. |
| 1–N | echoed gains | Parsed as signed i8; returned as Vec<i8>. |
get_mic_noise_reduction (fn 4)
Request: [0x00, 0x00, 0x00]
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0 | enabled | Non-zero = enabled; zero = disabled. Returned as bool. |
set_mic_noise_reduction (fn 5)
Request: [enabled, 0x00, 0x00]
| Byte | Field | Notes |
|---|---|---|
| 0 | enabled | 1 = 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?;
}