]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ALSA: usb-audio: Set up (implicit) sync for Saffire 6
authorTakashi Iwai <tiwai@suse.de>
Mon, 6 Jun 2022 16:09:10 +0000 (18:09 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 6 Jun 2022 16:11:23 +0000 (18:11 +0200)
Focusrite Saffire 6 has fixed audioformat quirks with multiple
endpoints assigned to a single altsetting.  Unfortunately the generic
parser couldn't detect the sync endpoint correctly as the implicit
sync due to the missing EP attribute bits.  In the former kernels, it
used to work somehow casually, but it's been broken for a while after
the large code change in 5.11.

This patch cures the regression by the following:
- Allow the static quirk table to provide the sync EP information;
  we just need to fill the fields and let the generic parser skipping
  parsing if sync_ep is already set.
- Add the sync endpoint information to the entry for Saffire 6.

Fixes: 06c75d4c5373 ("ALSA: usb-audio: Add missing ep_idx in fixed EP quirks")
Reported-and-tested-by: André Kapelrud <a.kapelrud@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220606160910.6926-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/pcm.c
sound/usb/quirks-table.h

index b0369df53910acee85c8997e6d6d6fe514b15230..e692ae04436a5adc09b4fe65cbe5dea99e129f14 100644 (file)
@@ -291,6 +291,9 @@ int snd_usb_audioformat_set_sync_ep(struct snd_usb_audio *chip,
        bool is_playback;
        int err;
 
+       if (fmt->sync_ep)
+               return 0; /* already set up */
+
        alts = snd_usb_get_host_interface(chip, fmt->iface, fmt->altsetting);
        if (!alts)
                return 0;
index 78eb41b621d63fab9fd7381fabaae33e2ce79964..4f56e1784932a29e21d92ee6508b6b54030d7164 100644 (file)
@@ -2658,7 +2658,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
                                        .nr_rates = 2,
                                        .rate_table = (unsigned int[]) {
                                                44100, 48000
-                                       }
+                                       },
+                                       .sync_ep = 0x82,
+                                       .sync_iface = 0,
+                                       .sync_altsetting = 1,
+                                       .sync_ep_idx = 1,
+                                       .implicit_fb = 1,
                                }
                        },
                        {