]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
ALSA: usb-audio: Add QUIRK_FLAG_SKIP_IFACE_SETUP
authorGeoffrey D. Bennett <g@b4.vu>
Fri, 20 Feb 2026 16:06:35 +0000 (02:36 +1030)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Feb 2026 08:57:10 +0000 (09:57 +0100)
Add a quirk flag to skip the usb_set_interface(),
snd_usb_init_pitch(), and snd_usb_init_sample_rate() calls in
__snd_usb_parse_audio_interface(). These are redundant with
snd_usb_endpoint_prepare() at stream-open time.

Enable the quirk for Focusrite devices, as init_sample_rate(rate_max)
sets 192kHz during probing, which disables the internal mixer and Air
and Safe modes.

Fixes: 16f1f838442d ("Revert "ALSA: usb-audio: Drop superfluous interface setup at parsing"")
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/65a7909b15f9feb76c2a6f4f8814c240ddc50737.1771594828.git.g@b4.vu
sound/usb/quirks.c
sound/usb/stream.c
sound/usb/usbaudio.h

index 3164c9431d293bfef1fd8806b19436919908e83c..b13d0f4d25ac00bd4d4426cee0d7514a4877e0f4 100644 (file)
@@ -2424,7 +2424,7 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
        VENDOR_FLG(0x07fd, /* MOTU */
                   QUIRK_FLAG_VALIDATE_RATES),
        VENDOR_FLG(0x1235, /* Focusrite Novation */
-                  0),
+                  QUIRK_FLAG_SKIP_IFACE_SETUP),
        VENDOR_FLG(0x1511, /* AURALiC */
                   QUIRK_FLAG_DSD_RAW),
        VENDOR_FLG(0x152a, /* Thesycon devices */
@@ -2506,6 +2506,7 @@ static const char *const snd_usb_audio_quirk_flag_names[] = {
        QUIRK_STRING_ENTRY(MIC_RES_384),
        QUIRK_STRING_ENTRY(MIXER_PLAYBACK_MIN_MUTE),
        QUIRK_STRING_ENTRY(MIXER_CAPTURE_MIN_MUTE),
+       QUIRK_STRING_ENTRY(SKIP_IFACE_SETUP),
        NULL
 };
 
index ac4d92065dd97bbc235bb8e2801072f2931decbc..d38c39e28f38fad37f031bbc1ed713c385367b40 100644 (file)
@@ -1259,6 +1259,9 @@ static int __snd_usb_parse_audio_interface(struct snd_usb_audio *chip,
                        set_iface_first = true;
 
                /* try to set the interface... */
+               if (chip->quirk_flags & QUIRK_FLAG_SKIP_IFACE_SETUP)
+                       continue;
+
                usb_set_interface(chip->dev, iface_no, 0);
                if (set_iface_first)
                        usb_set_interface(chip->dev, iface_no, altno);
index 79978cae9799cd14da2c7d2391df104df40fa672..085530cf62d92421f16dbec8f03f9f9db4fcc03d 100644 (file)
@@ -224,6 +224,10 @@ extern bool snd_usb_skip_validation;
  *  playback value represents muted state instead of minimum audible volume
  * QUIRK_FLAG_MIXER_CAPTURE_MIN_MUTE
  *  Similar to QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE, but for capture streams
+ * QUIRK_FLAG_SKIP_IFACE_SETUP
+ *  Skip the probe-time interface setup (usb_set_interface,
+ *  init_pitch, init_sample_rate); redundant with
+ *  snd_usb_endpoint_prepare() at stream-open time
  */
 
 enum {
@@ -253,6 +257,7 @@ enum {
        QUIRK_TYPE_MIC_RES_384                  = 23,
        QUIRK_TYPE_MIXER_PLAYBACK_MIN_MUTE      = 24,
        QUIRK_TYPE_MIXER_CAPTURE_MIN_MUTE       = 25,
+       QUIRK_TYPE_SKIP_IFACE_SETUP             = 26,
 /* Please also edit snd_usb_audio_quirk_flag_names */
 };
 
@@ -284,5 +289,6 @@ enum {
 #define QUIRK_FLAG_MIC_RES_384                 QUIRK_FLAG(MIC_RES_384)
 #define QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE     QUIRK_FLAG(MIXER_PLAYBACK_MIN_MUTE)
 #define QUIRK_FLAG_MIXER_CAPTURE_MIN_MUTE      QUIRK_FLAG(MIXER_CAPTURE_MIN_MUTE)
+#define QUIRK_FLAG_SKIP_IFACE_SETUP            QUIRK_FLAG(SKIP_IFACE_SETUP)
 
 #endif /* __USBAUDIO_H */