From 70113a39a3ffac7b310ff7d661fe744c35364c50 Mon Sep 17 00:00:00 2001 From: "Zhang, Zhenjiang" Date: Fri, 17 Jul 2026 13:47:18 +0800 Subject: fix(class/audio): fix control request byte order and buffer usage in audio host - Fix missing tu_htole16() conversions for wValue and wIndex in tuh_audio_set_sampling_freq, tuh_audio_get_sampling_freq, tuh_audio_feature_unit_set, and tuh_audio_feature_unit_get - Fix incorrect wIndex parameter order in feature unit requests (unit_id and itf_num were swapped) - Replace static freq_buf with per-endpoint ctrl buffer in tuh_audio_set_sampling_freq to avoid concurrency issues - Update audio_host README to match actual example behavior --- examples/host/audio_host/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/host/audio_host/README.md b/examples/host/audio_host/README.md index 4d8f66b71..072adbbf9 100644 --- a/examples/host/audio_host/README.md +++ b/examples/host/audio_host/README.md @@ -54,9 +54,9 @@ make BOARD= flash 3. Open a serial terminal to view output 4. The example will: - Print device information when mounted - - Set sampling frequency to 48kHz + - Set sampling frequency based on the device's advertised capabilities - Receive audio samples from the device (IN endpoint) - - Send test sine wave audio to the device (OUT endpoint) + - Loop back received audio to the device (OUT endpoint) for testing ## Serial Output Example -- cgit v1.3.1