Skip to content

Commit 64bf8de

Browse files
committed
Merge branch 'topic/scarlett2' into for-next
Pull Scarlett2 USB audio mixer extensions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 parents 3abf66a + 4a2c8cc commit 64bf8de

4 files changed

Lines changed: 4085 additions & 824 deletions

File tree

MAINTAINERS

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8272,11 +8272,14 @@ L: linux-input@vger.kernel.org
82728272
S: Maintained
82738273
F: drivers/input/joystick/fsia6b.c
82748274

8275-
FOCUSRITE SCARLETT GEN 2/3 MIXER DRIVER
8275+
FOCUSRITE SCARLETT2 MIXER DRIVER (Scarlett Gen 2+ and Clarett)
82768276
M: Geoffrey D. Bennett <g@b4.vu>
82778277
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
82788278
S: Maintained
8279-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
8279+
W: https://github.com/geoffreybennett/scarlett-gen2
8280+
B: https://github.com/geoffreybennett/scarlett-gen2/issues
8281+
T: git https://github.com/geoffreybennett/scarlett-gen2.git
8282+
F: include/uapi/sound/scarlett2.h
82808283
F: sound/usb/mixer_scarlett2.c
82818284

82828285
FORCEDETH GIGABIT ETHERNET DRIVER

include/uapi/sound/scarlett2.h

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+
/*
3+
* Focusrite Scarlett 2 Protocol Driver for ALSA
4+
* (including Scarlett 2nd Gen, 3rd Gen, 4th Gen, Clarett USB, and
5+
* Clarett+ series products)
6+
*
7+
* Copyright (c) 2023 by Geoffrey D. Bennett <g at b4.vu>
8+
*/
9+
#ifndef __UAPI_SOUND_SCARLETT2_H
10+
#define __UAPI_SOUND_SCARLETT2_H
11+
12+
#include <linux/types.h>
13+
#include <linux/ioctl.h>
14+
15+
#define SCARLETT2_HWDEP_MAJOR 1
16+
#define SCARLETT2_HWDEP_MINOR 0
17+
#define SCARLETT2_HWDEP_SUBMINOR 0
18+
19+
#define SCARLETT2_HWDEP_VERSION \
20+
((SCARLETT2_HWDEP_MAJOR << 16) | \
21+
(SCARLETT2_HWDEP_MINOR << 8) | \
22+
SCARLETT2_HWDEP_SUBMINOR)
23+
24+
#define SCARLETT2_HWDEP_VERSION_MAJOR(v) (((v) >> 16) & 0xFF)
25+
#define SCARLETT2_HWDEP_VERSION_MINOR(v) (((v) >> 8) & 0xFF)
26+
#define SCARLETT2_HWDEP_VERSION_SUBMINOR(v) ((v) & 0xFF)
27+
28+
/* Get protocol version */
29+
#define SCARLETT2_IOCTL_PVERSION _IOR('S', 0x60, int)
30+
31+
/* Reboot */
32+
#define SCARLETT2_IOCTL_REBOOT _IO('S', 0x61)
33+
34+
/* Select flash segment */
35+
#define SCARLETT2_SEGMENT_ID_SETTINGS 0
36+
#define SCARLETT2_SEGMENT_ID_FIRMWARE 1
37+
#define SCARLETT2_SEGMENT_ID_COUNT 2
38+
39+
#define SCARLETT2_IOCTL_SELECT_FLASH_SEGMENT _IOW('S', 0x62, int)
40+
41+
/* Erase selected flash segment */
42+
#define SCARLETT2_IOCTL_ERASE_FLASH_SEGMENT _IO('S', 0x63)
43+
44+
/* Get selected flash segment erase progress
45+
* 1 through to num_blocks, or 255 for complete
46+
*/
47+
struct scarlett2_flash_segment_erase_progress {
48+
unsigned char progress;
49+
unsigned char num_blocks;
50+
};
51+
#define SCARLETT2_IOCTL_GET_ERASE_PROGRESS \
52+
_IOR('S', 0x64, struct scarlett2_flash_segment_erase_progress)
53+
54+
#endif /* __UAPI_SOUND_SCARLETT2_H */

sound/usb/mixer_quirks.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3447,6 +3447,9 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
34473447
case USB_ID(0x1235, 0x8213): /* Focusrite Scarlett 8i6 3rd Gen */
34483448
case USB_ID(0x1235, 0x8214): /* Focusrite Scarlett 18i8 3rd Gen */
34493449
case USB_ID(0x1235, 0x8215): /* Focusrite Scarlett 18i20 3rd Gen */
3450+
case USB_ID(0x1235, 0x8218): /* Focusrite Scarlett Solo 4th Gen */
3451+
case USB_ID(0x1235, 0x8219): /* Focusrite Scarlett 2i2 4th Gen */
3452+
case USB_ID(0x1235, 0x821a): /* Focusrite Scarlett 4i4 4th Gen */
34503453
case USB_ID(0x1235, 0x8206): /* Focusrite Clarett 2Pre USB */
34513454
case USB_ID(0x1235, 0x8207): /* Focusrite Clarett 4Pre USB */
34523455
case USB_ID(0x1235, 0x8208): /* Focusrite Clarett 8Pre USB */

0 commit comments

Comments
 (0)