Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-16 15:16:16 +0200
committerTakashi Iwai <tiwai@suse.de>2019-07-16 15:16:16 +0200
commit2fff3db70e495be199c8bb83657fccc051a606f1 (patch)
tree5837ab97e9f32ec9136561fa88eb6a7c4e99d34d
parentd819b43002d64420beabc8b1e2826188c73091df (diff)
ALSA: usb-audio: Add quirk for Focusrite Scarlett Solo
(bsc#1051510).
-rw-r--r--patches.drivers/ALSA-usb-audio-Add-quirk-for-Focusrite-Scarlett-Solo.patch131
-rw-r--r--series.conf1
2 files changed, 132 insertions, 0 deletions
diff --git a/patches.drivers/ALSA-usb-audio-Add-quirk-for-Focusrite-Scarlett-Solo.patch b/patches.drivers/ALSA-usb-audio-Add-quirk-for-Focusrite-Scarlett-Solo.patch
new file mode 100644
index 0000000000..668e2bc4a5
--- /dev/null
+++ b/patches.drivers/ALSA-usb-audio-Add-quirk-for-Focusrite-Scarlett-Solo.patch
@@ -0,0 +1,131 @@
+From 46f5710f0b8829882faea735149d86250db5d0e5 Mon Sep 17 00:00:00 2001
+From: Roope Salmi <rpsalmi@gmail.com>
+Date: Sun, 14 Apr 2019 14:13:06 +0300
+Subject: [PATCH] ALSA: usb-audio: Add quirk for Focusrite Scarlett Solo
+Git-commit: 46f5710f0b8829882faea735149d86250db5d0e5
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+The device reports Synch: Synchronous on the playback interface.
+This causes regular audible napping on sample rates that are not multiples
+of 1 kHz. Fix to Synch: Asynchronous.
+
+Specifically observed on Focusrite Scarlett Solo 2nd generation. I assume
+the first generation model has a different device ID. A first generation
+Scarlett 2i2 I was able to test advertised Synch: Asynchronous by default.
+
+For example, with a sample rate of 44100 Hz, a silent sample is played
+every 40.96 seconds (likely 44.0 samples instead of 44.1 transmitted per
+USB frame on average, 4096 being the size of some internal buffer).
+There may be some other bug at play here since this doesn't happen
+on other platforms. However, a feedback endpoint is listed and using it
+fixes the issue. That is the only change in the quirk,
+but I didn't find a way to declare only it.
+
+Tested on two units and on two different computers.
+
+Signed-off-by: Roope Salmi <rpsalmi@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ sound/usb/quirks-table.h | 84 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 84 insertions(+)
+
+diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
+index 86e80916a029..629b84532648 100644
+--- a/sound/usb/quirks-table.h
++++ b/sound/usb/quirks-table.h
+@@ -2770,6 +2770,90 @@ YAMAHA_DEVICE(0x7010, "UB99"),
+ .type = QUIRK_MIDI_NOVATION
+ }
+ },
++{
++ /*
++ * Focusrite Scarlett Solo 2nd generation
++ * Reports that playback should use Synch: Synchronous
++ * while still providing a feedback endpoint. Synchronous causes
++ * snapping on some sample rates.
++ * Force it to use Synch: Asynchronous.
++ */
++ USB_DEVICE(0x1235, 0x8205),
++ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
++ .ifnum = QUIRK_ANY_INTERFACE,
++ .type = QUIRK_COMPOSITE,
++ .data = (const struct snd_usb_audio_quirk[]) {
++ {
++ .ifnum = 1,
++ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
++ .data = & (const struct audioformat) {
++ .formats = SNDRV_PCM_FMTBIT_S32_LE,
++ .channels = 2,
++ .iface = 1,
++ .altsetting = 1,
++ .altset_idx = 1,
++ .attributes = 0,
++ .endpoint = 0x01,
++ .ep_attr = USB_ENDPOINT_XFER_ISOC |
++ USB_ENDPOINT_SYNC_ASYNC,
++ .protocol = UAC_VERSION_2,
++ .rates = SNDRV_PCM_RATE_44100 |
++ SNDRV_PCM_RATE_48000 |
++ SNDRV_PCM_RATE_88200 |
++ SNDRV_PCM_RATE_96000 |
++ SNDRV_PCM_RATE_176400 |
++ SNDRV_PCM_RATE_192000,
++ .rate_min = 44100,
++ .rate_max = 192000,
++ .nr_rates = 6,
++ .rate_table = (unsigned int[]) {
++ 44100, 48000, 88200,
++ 96000, 176400, 192000
++ },
++ .clock = 41
++ }
++ },
++ {
++ .ifnum = 2,
++ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
++ .data = & (const struct audioformat) {
++ .formats = SNDRV_PCM_FMTBIT_S32_LE,
++ .channels = 2,
++ .iface = 2,
++ .altsetting = 1,
++ .altset_idx = 1,
++ .attributes = 0,
++ .endpoint = 0x82,
++ .ep_attr = USB_ENDPOINT_XFER_ISOC |
++ USB_ENDPOINT_SYNC_ASYNC |
++ USB_ENDPOINT_USAGE_IMPLICIT_FB,
++ .protocol = UAC_VERSION_2,
++ .rates = SNDRV_PCM_RATE_44100 |
++ SNDRV_PCM_RATE_48000 |
++ SNDRV_PCM_RATE_88200 |
++ SNDRV_PCM_RATE_96000 |
++ SNDRV_PCM_RATE_176400 |
++ SNDRV_PCM_RATE_192000,
++ .rate_min = 44100,
++ .rate_max = 192000,
++ .nr_rates = 6,
++ .rate_table = (unsigned int[]) {
++ 44100, 48000, 88200,
++ 96000, 176400, 192000
++ },
++ .clock = 41
++ }
++ },
++ {
++ .ifnum = 3,
++ .type = QUIRK_IGNORE_INTERFACE
++ },
++ {
++ .ifnum = -1
++ }
++ }
++ }
++},
+
+ /* Access Music devices */
+ {
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 7bbdb0d52d..a0a2cf70ff 100644
--- a/series.conf
+++ b/series.conf
@@ -22448,6 +22448,7 @@
patches.drivers/ALSA-seq-Cover-unsubscribe_port-in-list_mutex.patch
patches.drivers/ALSA-seq-Simplify-snd_seq_kernel_client_enqueue-help.patch
patches.drivers/ALSA-seq-Protect-racy-pool-manipulation-from-OSS-seq.patch
+ patches.drivers/ALSA-usb-audio-Add-quirk-for-Focusrite-Scarlett-Solo.patch
patches.drivers/ALSA-seq-Correct-unlock-sequence-at-snd_seq_client_i.patch
patches.drivers/ALSA-emu10k1-Drop-superfluous-id-uniquification-beha.patch
patches.drivers/ALSA-core-Don-t-refer-to-snd_cards-array-directly.patch