2026-01-22 12:06 AM
I have implemented a USB Audio 2.0 device that receives audio from the PC host (speaker endpoint) and loops it back (microphone endpoint). The PC correctly recognizes the device, and audio playback works, but I'm experiencing unexpected low-frequency noise.
Specific symptom: When playing a pure 350Hz sine wave from the PC, the device receives not only the sine wave but also significant noise content from 0Hz to 350Hz. This noise is audible in the loopback audio sent back to the host.
The audio data flows through a simple memory copy without any DSP processing:
ux_utility_memory_copy(write_buffer, read_buffer, copy_len);
ux_device_class_audio_write_frame_commit(g_mic_stream, copy_len);I also perform FFT analysis for visualization (TouchGFX), and the spectrum confirms the low-frequency noise is present in the received audio data itself, not introduced by my processing.
I have tried to disable the microphone endpoint and keep just the speaker endpoint but the issue persists.
Any guidance on diagnosing whether this is a configuration issue versus a hardware problem would be greatly appreciated. Should I focus on the USB descriptor settings first, or investigate potential hardware/cable quality issues?
My current USB descriptor is
#define USBD_AUDIO_PLAY_FREQ_MAX USBD_AUDIO_FREQ_48_K
#define USBD_AUDIO_PLAY_CHANNEL_COUNT 2U
#define USBD_AUDIO_PLAY_RES_BIT 16U
#define USBD_AUDIO_PLAY_EPOUT_HS_MPS 28U
#define USBD_AUDIO_PLAY_EPOUT_HS_BINTERVAL 1U