linux/Documentation/sound
Darren Chang d842c03f89 ALSA: usb-audio: Add quirk for inverted sample rates on NUX NAI-24
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@gmail.com>
Link: https://patch.msgid.link/20260920122653.41993-1-darrenchangjr01@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-09-29 11:40:06 +02:00
..
cards docs: sound: hdspm: clean up driver doc. 2026-09-17 14:36:56 +02:00
codecs Documentation: sound: tas675x: Fix temperature range and impedance documentation 2026-07-01 19:52:38 +01:00
designs ALSA: docs: Fix module paths in /sys 2025-02-05 13:05:00 +01:00
hd-audio ALSA: docs: fix dead link to Intel HD-audio spec 2026-08-17 16:20:41 +02:00
kernel-api Documentation: adopt new coding style of type-aware kmalloc-family 2026-05-03 08:54:21 -06:00
soc ASoC: docs: Fix stale and misspelled references 2026-05-10 22:46:04 +09:00
alsa-configuration.rst ALSA: usb-audio: Add quirk for inverted sample rates on NUX NAI-24 2026-09-29 11:40:06 +02:00
index.rst Documentation: use a source-read extension for the index link boilerplate 2026-01-23 11:59:34 -07:00
utimers.rst Docs/sound: Add documentation for userspace-driven ALSA timers 2024-08-18 09:55:54 +02:00