forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'sound-fix-6.0-rc1' of git://git.kernel.org/pub/scm/linux/k…
…ernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Includes a few usual updates for HD- and USB-audio and a trivial cleanup patch" * tag 'sound-fix-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda: Fix crash due to jack poll in suspend ALSA: hda/cirrus - support for iMac 12,1 model ALSA: usb-audio: make read-only array marker static const ALSA: hda/realtek: Add a quirk for HP OMEN 15 (8786) mute LED ALSA: usb-audio: More comprehensive mixer map for ASUS ROG Zenith II ALSA: scarlett2: Add Focusrite Clarett+ 8Pre support ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model ALSA: ice1712: remove redundant assignment to new ALSA: hda/realtek: Add quirk for another Asus K42JZ model
- Loading branch information
Showing
10 changed files
with
157 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* Focusrite Scarlett Gen 2/3 Driver for ALSA | ||
* Focusrite Scarlett Gen 2/3 and Clarett+ Driver for ALSA | ||
* | ||
* Supported models: | ||
* - 6i6/18i8/18i20 Gen 2 | ||
* - Solo/2i2/4i4/8i6/18i8/18i20 Gen 3 | ||
* - Clarett+ 8Pre | ||
* | ||
* Copyright (c) 2018-2022 by Geoffrey D. Bennett <g at b4.vu> | ||
* Copyright (c) 2020-2021 by Vladimir Sadovnikov <[email protected]> | ||
* Copyright (c) 2022 by Christian Colglazier <[email protected]> | ||
* | ||
* Based on the Scarlett (Gen 1) Driver for ALSA: | ||
* | ||
|
@@ -51,6 +53,9 @@ | |
* Support for phantom power, direct monitoring, speaker switching, | ||
* and talkback added in May-June 2021. | ||
* | ||
* Support for Clarett+ 8Pre added in Aug 2022 by Christian | ||
* Colglazier. | ||
* | ||
* This ALSA mixer gives access to (model-dependent): | ||
* - input, output, mixer-matrix muxes | ||
* - mixer-matrix gain stages | ||
|
@@ -203,7 +208,8 @@ enum { | |
SCARLETT2_CONFIG_SET_NO_MIXER = 0, | ||
SCARLETT2_CONFIG_SET_GEN_2 = 1, | ||
SCARLETT2_CONFIG_SET_GEN_3 = 2, | ||
SCARLETT2_CONFIG_SET_COUNT = 3 | ||
SCARLETT2_CONFIG_SET_CLARETT = 3, | ||
SCARLETT2_CONFIG_SET_COUNT = 4 | ||
}; | ||
|
||
/* Hardware port types: | ||
|
@@ -841,6 +847,61 @@ static const struct scarlett2_device_info s18i20_gen3_info = { | |
} }, | ||
}; | ||
|
||
static const struct scarlett2_device_info clarett_8pre_info = { | ||
.usb_id = USB_ID(0x1235, 0x820c), | ||
|
||
.config_set = SCARLETT2_CONFIG_SET_CLARETT, | ||
.line_out_hw_vol = 1, | ||
.level_input_count = 2, | ||
.air_input_count = 8, | ||
|
||
.line_out_descrs = { | ||
"Monitor L", | ||
"Monitor R", | ||
NULL, | ||
NULL, | ||
NULL, | ||
NULL, | ||
"Headphones 1 L", | ||
"Headphones 1 R", | ||
"Headphones 2 L", | ||
"Headphones 2 R", | ||
}, | ||
|
||
.port_count = { | ||
[SCARLETT2_PORT_TYPE_NONE] = { 1, 0 }, | ||
[SCARLETT2_PORT_TYPE_ANALOGUE] = { 8, 10 }, | ||
[SCARLETT2_PORT_TYPE_SPDIF] = { 2, 2 }, | ||
[SCARLETT2_PORT_TYPE_ADAT] = { 8, 8 }, | ||
[SCARLETT2_PORT_TYPE_MIX] = { 10, 18 }, | ||
[SCARLETT2_PORT_TYPE_PCM] = { 20, 18 }, | ||
}, | ||
|
||
.mux_assignment = { { | ||
{ SCARLETT2_PORT_TYPE_PCM, 0, 18 }, | ||
{ SCARLETT2_PORT_TYPE_ANALOGUE, 0, 10 }, | ||
{ SCARLETT2_PORT_TYPE_SPDIF, 0, 2 }, | ||
{ SCARLETT2_PORT_TYPE_ADAT, 0, 8 }, | ||
{ SCARLETT2_PORT_TYPE_MIX, 0, 18 }, | ||
{ SCARLETT2_PORT_TYPE_NONE, 0, 8 }, | ||
{ 0, 0, 0 }, | ||
}, { | ||
{ SCARLETT2_PORT_TYPE_PCM, 0, 14 }, | ||
{ SCARLETT2_PORT_TYPE_ANALOGUE, 0, 10 }, | ||
{ SCARLETT2_PORT_TYPE_SPDIF, 0, 2 }, | ||
{ SCARLETT2_PORT_TYPE_ADAT, 0, 4 }, | ||
{ SCARLETT2_PORT_TYPE_MIX, 0, 18 }, | ||
{ SCARLETT2_PORT_TYPE_NONE, 0, 8 }, | ||
{ 0, 0, 0 }, | ||
}, { | ||
{ SCARLETT2_PORT_TYPE_PCM, 0, 12 }, | ||
{ SCARLETT2_PORT_TYPE_ANALOGUE, 0, 10 }, | ||
{ SCARLETT2_PORT_TYPE_SPDIF, 0, 2 }, | ||
{ SCARLETT2_PORT_TYPE_NONE, 0, 22 }, | ||
{ 0, 0, 0 }, | ||
} }, | ||
}; | ||
|
||
static const struct scarlett2_device_info *scarlett2_devices[] = { | ||
/* Supported Gen 2 devices */ | ||
&s6i6_gen2_info, | ||
|
@@ -855,6 +916,9 @@ static const struct scarlett2_device_info *scarlett2_devices[] = { | |
&s18i8_gen3_info, | ||
&s18i20_gen3_info, | ||
|
||
/* Supported Clarett+ devices */ | ||
&clarett_8pre_info, | ||
|
||
/* End of list */ | ||
NULL | ||
}; | ||
|
@@ -1047,6 +1111,29 @@ static const struct scarlett2_config | |
|
||
[SCARLETT2_CONFIG_TALKBACK_MAP] = { | ||
.offset = 0xb0, .size = 16, .activate = 10 }, | ||
|
||
/* Clarett+ 8Pre */ | ||
}, { | ||
[SCARLETT2_CONFIG_DIM_MUTE] = { | ||
.offset = 0x31, .size = 8, .activate = 2 }, | ||
|
||
[SCARLETT2_CONFIG_LINE_OUT_VOLUME] = { | ||
.offset = 0x34, .size = 16, .activate = 1 }, | ||
|
||
[SCARLETT2_CONFIG_MUTE_SWITCH] = { | ||
.offset = 0x5c, .size = 8, .activate = 1 }, | ||
|
||
[SCARLETT2_CONFIG_SW_HW_SWITCH] = { | ||
.offset = 0x66, .size = 8, .activate = 3 }, | ||
|
||
[SCARLETT2_CONFIG_LEVEL_SWITCH] = { | ||
.offset = 0x7c, .size = 8, .activate = 7 }, | ||
|
||
[SCARLETT2_CONFIG_AIR_SWITCH] = { | ||
.offset = 0x95, .size = 8, .activate = 8 }, | ||
|
||
[SCARLETT2_CONFIG_STANDALONE_SWITCH] = { | ||
.offset = 0x8d, .size = 8, .activate = 6 }, | ||
} }; | ||
|
||
/* proprietary request/response format */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters