* [PATCH] ALSA: usb-audio: Add quirk for VF0790
@ 2026-11-15 18:13 Vytautas Liuolia
2026-11-16 12:17 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Vytautas Liuolia @ 2026-11-15 18:13 UTC (permalink / raw)
To: Takashi Iwai
Cc: Jaroslav Kysela, linux-sound, linux-kernel, Vytautas Liuolia,
stable
The Creative Live! Cam Chat HD VF0790 (041e:4097) has the same audio
interface layout as the VF0770: interface 3 offers S16_LE and S24_3LE
capture altsettings at 8, 16, 44.1 and 48 kHz. The 24-bit altsettings
advertise the same wMaxPacketSize as their 16-bit counterparts, e.g.
216 bytes at 48 kHz, which holds 54 frames of S16_LE but only 36 frames
of S24_3LE instead of the 48 needed per 1 ms packet. The device then
delivers only 36 frames per packet.
PipeWire picks S24_3LE by default, so 1/4 of the samples are lost: the
captured audio sounds chopped and carries a constant 1333 Hz buzz, one
discontinuity every 0.75 ms. Timed raw captures at 48 kHz with arecord
deliver about 36000 frames/s with S24_3LE and 48000 frames/s with
S16_LE.
As done for the VF0770, only report the 16-bit 48 kHz altsetting. The
other 16-bit rates have not been verified, so leave them out as well.
Tested with this patch applied to snd-usb-audio from v7.0: the capture
stream now only lists the S16_LE 48 kHz altsetting, PipeWire uses it
without any local configuration, and recordings no longer show the
1333 Hz artifact.
The problem was diagnosed, and this patch written, with the help of an
AI coding assistant (Claude Code).
Cc: stable@vger.kernel.org
Signed-off-by: Vytautas Liuolia <vytautas@liuolia.eu>
---
sound/usb/quirks-table.h | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index b6da5bcb15e4..56f32b3f873f 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -187,6 +187,40 @@
},
},
+/*
+ * Creative Technology, Ltd Live! Cam Chat HD [VF0790]
+ * Same audio interface layout as the VF0770 above. The 24-bit altsettings
+ * advertise the same wMaxPacketSize as their 16-bit counterparts, so only
+ * 3/4 of the frames fit into each packet and the audio is chopped. Only
+ * report the 16-bit 48kHz altsetting.
+ */
+{
+ USB_AUDIO_DEVICE(0x041e, 0x4097),
+ QUIRK_DRIVER_INFO {
+ QUIRK_DATA_COMPOSITE {
+ { QUIRK_DATA_STANDARD_MIXER(2) },
+ {
+ QUIRK_DATA_AUDIOFORMAT(3) {
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ .channels = 2,
+ .fmt_bits = 16,
+ .iface = 3,
+ .altsetting = 4,
+ .altset_idx = 4,
+ .endpoint = 0x82,
+ .ep_attr = 0x05,
+ .rates = SNDRV_PCM_RATE_48000,
+ .rate_min = 48000,
+ .rate_max = 48000,
+ .nr_rates = 1,
+ .rate_table = (unsigned int[]) { 48000 },
+ },
+ },
+ QUIRK_COMPOSITE_END
+ },
+ },
+},
+
/*
* HP Wireless Audio
* When not ignored, causes instability issues for some users, forcing them to
base-commit: 6db55dc5b1272e8fe63328a3bca610fe1fb5d382
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ALSA: usb-audio: Add quirk for VF0790
2026-11-15 18:13 [PATCH] ALSA: usb-audio: Add quirk for VF0790 Vytautas Liuolia
@ 2026-11-16 12:17 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-11-16 12:17 UTC (permalink / raw)
To: Vytautas Liuolia
Cc: Takashi Iwai, Jaroslav Kysela, linux-sound, linux-kernel, stable
On Sun, 15 Nov 2026 19:13:24 +0100,
Vytautas Liuolia wrote:
>
> The Creative Live! Cam Chat HD VF0790 (041e:4097) has the same audio
> interface layout as the VF0770: interface 3 offers S16_LE and S24_3LE
> capture altsettings at 8, 16, 44.1 and 48 kHz. The 24-bit altsettings
> advertise the same wMaxPacketSize as their 16-bit counterparts, e.g.
> 216 bytes at 48 kHz, which holds 54 frames of S16_LE but only 36 frames
> of S24_3LE instead of the 48 needed per 1 ms packet. The device then
> delivers only 36 frames per packet.
>
> PipeWire picks S24_3LE by default, so 1/4 of the samples are lost: the
> captured audio sounds chopped and carries a constant 1333 Hz buzz, one
> discontinuity every 0.75 ms. Timed raw captures at 48 kHz with arecord
> deliver about 36000 frames/s with S24_3LE and 48000 frames/s with
> S16_LE.
>
> As done for the VF0770, only report the 16-bit 48 kHz altsetting. The
> other 16-bit rates have not been verified, so leave them out as well.
>
> Tested with this patch applied to snd-usb-audio from v7.0: the capture
> stream now only lists the S16_LE 48 kHz altsetting, PipeWire uses it
> without any local configuration, and recordings no longer show the
> 1333 Hz artifact.
>
> The problem was diagnosed, and this patch written, with the help of an
> AI coding assistant (Claude Code).
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Vytautas Liuolia <vytautas@liuolia.eu>
Applied to for-next branch now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-16 12:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-15 18:13 [PATCH] ALSA: usb-audio: Add quirk for VF0790 Vytautas Liuolia
2026-11-16 12:17 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox