diff options
| author | HiFiPHile <[email protected]> | 2026-08-25 09:27:36 +0200 |
|---|---|---|
| committer | HiFiPHile <[email protected]> | 2026-08-25 09:27:36 +0200 |
| commit | 350b4fe5ba4754fa606aabc447795d038c10a623 (patch) | |
| tree | 71cd4203f89b597f53463d59ae9ce511edb4e07a /src/class/audio/audio_host.h | |
| parent | edb883a0c017ebc6b96f617ab032ffebe9789525 (diff) | |
fix(audio): serialize Feature Unit requests
Keep Feature Unit request data in driver-owned storage until asynchronous completion and use the width defined for each control. This avoids overlapping request state and malformed one-byte controls.
Signed-off-by: HiFiPHile <[email protected]>
Diffstat (limited to 'src/class/audio/audio_host.h')
| -rw-r--r-- | src/class/audio/audio_host.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/class/audio/audio_host.h b/src/class/audio/audio_host.h index aaa65b671..0133c24f2 100644 --- a/src/class/audio/audio_host.h +++ b/src/class/audio/audio_host.h @@ -194,13 +194,15 @@ uint8_t tuh_audio_get_feature_unit_id(uint8_t idx); //--------------------------------------------------------------------+ // Set a Feature Unit control (mute, volume, ...) of the Audio device (UAC 1.0) -// The request length follows the control selector: mute/AGC/loudness are 1 byte, the rest are 2 bytes +// Mute/bass/mid/treble/AGC/bass boost/loudness use one byte; volume/delay use two. +// Graphic EQ and unknown selectors are unsupported. bool tuh_audio_feature_unit_set(uint8_t idx, uint8_t control_selector, uint8_t channel, uint16_t value, tuh_xfer_cb_t complete_cb, uintptr_t user_data); // Get a Feature Unit control (mute, volume, ...) of the Audio device (UAC 1.0) // The value is converted to host byte order before complete_cb is invoked. -// Only one feature unit GET may be in flight per device. +// Graphic EQ and unknown selectors are unsupported. +// Only one Feature Unit GET or SET request may be in flight per device. bool tuh_audio_feature_unit_get(uint8_t idx, uint8_t control_selector, uint8_t channel, uint16_t *value, tuh_xfer_cb_t complete_cb, uintptr_t user_data); |
