diff options
author | Gregor Pintar <grpintar@gmail.com> | 2020-04-20 23:40:30 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-04-21 07:58:54 +0200 |
commit | 6f4ea2074ddf689ac6f892afa58515032dabf2e4 (patch) | |
tree | b78e7deaffe846a8a078b45001aed7f54d6601c1 /sound/usb/quirks.c | |
parent | a43c1c41bc5145971d06edc42a6b1e8faa0e2bc3 (diff) | |
download | linux-6f4ea2074ddf689ac6f892afa58515032dabf2e4.tar.bz2 |
ALSA: usb-audio: Add quirk for Focusrite Scarlett 2i2
Force it to use asynchronous playback.
Same quirk has already been added for Focusrite Scarlett Solo (2nd gen)
with a commit 46f5710f0b88 ("ALSA: usb-audio: Add quirk for Focusrite
Scarlett Solo").
This also seems to prevent regular clicks when playing at 44100Hz
on Scarlett 2i2 (2nd gen). I did not notice any side effects.
Moved both quirks to snd_usb_audioformat_attributes_quirk() as suggested.
Signed-off-by: Gregor Pintar <grpintar@gmail.com>
Reviewed-by: Alexander Tsoy <alexander@tsoy.me>
Link: https://lore.kernel.org/r/20200420214030.2361-1-grpintar@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/quirks.c')
-rw-r--r-- | sound/usb/quirks.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index a8ece1701068..6c2dfd3bfcbf 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1806,6 +1806,19 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip, */ fp->attributes &= ~UAC_EP_CS_ATTR_FILL_MAX; break; + case USB_ID(0x1235, 0x8202): /* Focusrite Scarlett 2i2 2nd gen */ + case USB_ID(0x1235, 0x8205): /* Focusrite Scarlett Solo 2nd gen */ + /* + * 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. + */ + if (stream == SNDRV_PCM_STREAM_PLAYBACK) { + fp->ep_attr &= ~USB_ENDPOINT_SYNCTYPE; + fp->ep_attr |= USB_ENDPOINT_SYNC_ASYNC; + } + break; } } |