public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] ALSA: usb-audio: Add quirks for linear volume devices and deconflict VID
@ 2026-03-02 18:58 Rong Zhang
  2026-03-02 18:58 ` [PATCH v2 1/8] Revert "ALSA: usb: Increase volume range that triggers a warning" Rong Zhang
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Rong Zhang @ 2026-03-02 18:58 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: Rong Zhang, Jonathan Corbet, Shuah Khan, Cryolitia PukNgae,
	Arun Raghavan, linux-sound, linux-doc, linux-kernel,
	Icenowy Zheng

Some quirky devices tune their volume by linearly tuning the voltage
level (linear volume). In other words, such devices has a linear TLV
mapping of DECLARE_TLV_DB_LINEAR(scale, TLV_DB_GAIN_MUTE, 0).

The series mainly adds quirk flags MIXER_PLAYBACK_LINEAR_VOL and
MIXER_CAPTURE_LINEAR_VOL to represent this case respectively for
playback and capture mixers. Afterward, apply these quirk flags on them.

Some MV-SILICON devices with these quirks also have another quirk: VID
conflicts with Focusrite Novation (0x1235). Hence, add support for
string-descriptor-based quirk table entries and define an entry for MV-
SILICON to deconflict them.

Some improvements to the logic of volume range checks is also included
in the series to help identify quirky devices with linear volume.

Changes in v2:
- Separate [PATCH v1 6/9] into https://lore.kernel.org/r/20260302173300.322673-1-i@rong.moe/
- Alloc string buffers with kmalloc() instead of on stack (thanks
  Takashi Iwai)
- Get string descriptors in a neater way (ditto)
- Tiny differences compared to Takashi's sugeestion:
  - Use `IS_ERR_OR_NULL() || strcmp()' instead of `!IS_ERR_OR_NULL() &&
    strcmp()', so failure in getting the string descriptor won't
    resulting in quirk flags being applied to irrelevant devices
  - Use trivial goto cleanup patterns instead of `__free(kfree)' as the
    latter can't handle ERR_PTR()
- Tiny differences compared to my previous reply:
  - Use usb_string() as Takashi suggested instead of usb_cache_string(),
    so that we can retrieve the errno and print it out on failure
- Link to v1: https://lore.kernel.org/r/20260301213726.428505-1-i@rong.moe/

Rong Zhang (8):
  Revert "ALSA: usb: Increase volume range that triggers a warning"
  ALSA: usb-audio: Add helper function for volume range checks
  ALSA: usb-audio: Improve volume range checks
  ALSA: usb-audio: Support string-descriptor-based quirk table entry
  ALSA: usb-audio: Deconflict VID between Focusrite Novation &
    MV-SILICON
  ALSA: usb-audio: Add QUIRK_FLAG_MIXER_{PLAYBACK,CAPTURE}_LINEAR_VOL
  ALSA: usb-audio: Add linear volume quirk for Hotone Audio Pulze Mini
  ALSA: usb-audio: Apply linear volume quirk on MV-SILICON devices

 Documentation/sound/alsa-configuration.rst |   7 ++
 sound/usb/mixer.c                          |  84 ++++++++++++++---
 sound/usb/mixer_quirks.c                   |  56 ++++++++++++
 sound/usb/quirks.c                         | 101 ++++++++++++++++++++-
 sound/usb/usbaudio.h                       |  12 +++
 5 files changed, 242 insertions(+), 18 deletions(-)


base-commit: 11439c4635edd669ae435eec308f4ab8a0804808
-- 
2.51.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-03-03  6:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-02 18:58 [PATCH v2 0/8] ALSA: usb-audio: Add quirks for linear volume devices and deconflict VID Rong Zhang
2026-03-02 18:58 ` [PATCH v2 1/8] Revert "ALSA: usb: Increase volume range that triggers a warning" Rong Zhang
2026-03-02 20:53   ` [External Mail] " Arun Raghavan
2026-03-02 18:58 ` [PATCH v2 2/8] ALSA: usb-audio: Add helper function for volume range checks Rong Zhang
2026-03-02 18:58 ` [PATCH v2 3/8] ALSA: usb-audio: Improve " Rong Zhang
2026-03-02 18:58 ` [PATCH v2 4/8] ALSA: usb-audio: Support string-descriptor-based quirk table entry Rong Zhang
2026-03-03  6:37   ` Takashi Iwai
2026-03-02 18:58 ` [PATCH v2 5/8] ALSA: usb-audio: Deconflict VID between Focusrite Novation & MV-SILICON Rong Zhang
2026-03-02 18:58 ` [PATCH v2 6/8] ALSA: usb-audio: Add QUIRK_FLAG_MIXER_{PLAYBACK,CAPTURE}_LINEAR_VOL Rong Zhang
2026-03-02 18:58 ` [PATCH v2 7/8] ALSA: usb-audio: Add linear volume quirk for Hotone Audio Pulze Mini Rong Zhang
2026-03-02 18:58 ` [PATCH v2 8/8] ALSA: usb-audio: Apply linear volume quirk on MV-SILICON devices Rong Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox