[PATCH 0/9] ALSA: usb-audio: Add quirks for linear volume devices and deconflict VID

Rong Zhang posted 9 patches 1 month, 2 weeks ago
There is a newer version of this series
Documentation/sound/alsa-configuration.rst | 11 +++
sound/usb/mixer.c                          | 84 ++++++++++++++++----
sound/usb/mixer_quirks.c                   | 56 ++++++++++++++
sound/usb/quirks.c                         | 89 ++++++++++++++++++++++
sound/usb/usbaudio.h                       | 12 +++
5 files changed, 237 insertions(+), 15 deletions(-)
[PATCH 0/9] ALSA: usb-audio: Add quirks for linear volume devices and deconflict VID
Posted by Rong Zhang 1 month, 2 weeks ago
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.

Rong Zhang (9):
  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: doc: Add doc for QUIRK_FLAG_SKIP_IFACE_SETUP of snd-usb-audio
  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 | 11 +++
 sound/usb/mixer.c                          | 84 ++++++++++++++++----
 sound/usb/mixer_quirks.c                   | 56 ++++++++++++++
 sound/usb/quirks.c                         | 89 ++++++++++++++++++++++
 sound/usb/usbaudio.h                       | 12 +++
 5 files changed, 237 insertions(+), 15 deletions(-)


base-commit: 39c633261414f12cb533a8b802ee57e2d2e3c482
-- 
2.51.0
Re: [PATCH 0/9] ALSA: usb-audio: Add quirks for linear volume devices and deconflict VID
Posted by Takashi Iwai 1 month, 2 weeks ago
On Sun, 01 Mar 2026 22:37:16 +0100,
Rong Zhang wrote:
> 
> 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.
> 
> Rong Zhang (9):
>   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: doc: Add doc for QUIRK_FLAG_SKIP_IFACE_SETUP of snd-usb-audio
>   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

Thanks for patches!  The logic looks good and the implementation
seems reasonable.  One slight concern was about the string matching
patch (I explained in another mail), but others look fine.

Maybe the patch to add the missing documentation for
QUIRK_FLAG_SKIP_IFACE_SETUP should be applied individually beforehand.
Could you send it a fix for 7.0?

The revert of volume range check makes sense, but maybe that should be
combined with your rest changes.


Takashi
Re: [PATCH 0/9] ALSA: usb-audio: Add quirks for linear volume devices and deconflict VID
Posted by Rong Zhang 1 month, 2 weeks ago
Hi Takashi,

Thanks for your review.

On Mon, 2026-03-02 at 10:59 +0100, Takashi Iwai wrote:
> On Sun, 01 Mar 2026 22:37:16 +0100,
> Rong Zhang wrote:
> > 
> > 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.
> > 
> > Rong Zhang (9):
> >   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: doc: Add doc for QUIRK_FLAG_SKIP_IFACE_SETUP of snd-usb-audio
> >   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
> 
> Thanks for patches!  The logic looks good and the implementation
> seems reasonable.  One slight concern was about the string matching
> patch (I explained in another mail), but others look fine.
> 

Thanks. I will send a v2 addressing that.

> Maybe the patch to add the missing documentation for
> QUIRK_FLAG_SKIP_IFACE_SETUP should be applied individually beforehand.
> Could you send it a fix for 7.0?
> 

Sure.

> The revert of volume range check makes sense, but maybe that should be
> combined with your rest changes.
> 

Yeah. Patch 1-3 as a whole targets 7.1, where patch 1 is also for
backporting (so that potential insane volume ranges can still trigger a
warning in LTS, which is better than nothing).

Thanks,
Rong

> 
> Takashi