Re: [PATCH] ALSA: usb-audio: Add quirk for inverted sample rates on NUX NAI-24
From: Takashi Iwai
Date: Tue Sep 29 2026 - 05:52:21 EST
On Sun, 20 Sep 2026 14:26:53 +0200,
Darren Chang wrote:
>
> The NUX NAI-24 (USB 3703:2000) has a UAC2 clock source that reports
> bmAttributes = 0x01 (internal fixed clock) and bmControls = 0x07, so the
> driver treats its sample rate as programmable. When the driver sends
> SET_CUR(SAMPLING_FREQ_CONTROL), the firmware acknowledges the request and
> then runs the clock on the opposite base-rate family: asking for 44100 Hz
> makes the device run at 48000 Hz, and asking for 48000 Hz makes it run at
> 44100 Hz.
>
> The result is playback that is about 8.8% fast, or 8.4% slow with heavy
> static on the 48000 Hz family. macOS and Windows ignore bmControls, treat
> the clock as fixed and resample, so they are unaffected.
>
> Work around it by sending the partner rate in SET_CUR for this device, so
> the device runs at the requested rate. A new QUIRK_FLAG_SWAP_RATES flag
> controls this, applied through the quirk flags table.
>
> Only the 44.1/48 kHz pair has been verified on hardware; the 88.2/96 kHz
> and 176.4/192 kHz pairs are untested but follow the same pattern.
>
> Testing: the equivalent change ran on the device as a locally built
> module (44100 Hz PCM, device clock 44100 Hz, no xruns, correct tempo, no
> static). This upstream form compiles for sound/usb without warnings and
> passes checkpatch, but has not been built in a full kernel tree or
> load-tested.
>
> Assisted-by: LLM
> Signed-off-by: Darren Chang <darrenchangjr01@xxxxxxxxx>
Applied to for-next branch now. Thanks.
Takashi