Skip to content

Commit 4a93505

Browse files
committed
Merge tag 'sound-fix-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/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
2 parents 7a53e17 + 636aa88 commit 4a93505

File tree

10 files changed

+157
-19
lines changed

10 files changed

+157
-19
lines changed

sound/pci/hda/hda_codec.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2940,15 +2940,19 @@ static int hda_codec_runtime_suspend(struct device *dev)
29402940
if (!codec->card)
29412941
return 0;
29422942

2943-
if (!codec->bus->jackpoll_in_suspend)
2944-
cancel_delayed_work_sync(&codec->jackpoll_work);
2943+
cancel_delayed_work_sync(&codec->jackpoll_work);
29452944

29462945
state = hda_call_codec_suspend(codec);
29472946
if (codec->link_down_at_suspend ||
29482947
(codec_has_clkstop(codec) && codec_has_epss(codec) &&
29492948
(state & AC_PWRST_CLK_STOP_OK)))
29502949
snd_hdac_codec_link_down(&codec->core);
29512950
snd_hda_codec_display_power(codec, false);
2951+
2952+
if (codec->bus->jackpoll_in_suspend &&
2953+
(dev->power.power_state.event != PM_EVENT_SUSPEND))
2954+
schedule_delayed_work(&codec->jackpoll_work,
2955+
codec->jackpoll_interval);
29522956
return 0;
29532957
}
29542958

@@ -2972,6 +2976,9 @@ static int hda_codec_runtime_resume(struct device *dev)
29722976
#ifdef CONFIG_PM_SLEEP
29732977
static int hda_codec_pm_prepare(struct device *dev)
29742978
{
2979+
struct hda_codec *codec = dev_to_hda_codec(dev);
2980+
2981+
cancel_delayed_work_sync(&codec->jackpoll_work);
29752982
dev->power.power_state = PMSG_SUSPEND;
29762983
return pm_runtime_suspended(dev);
29772984
}
@@ -2991,9 +2998,6 @@ static void hda_codec_pm_complete(struct device *dev)
29912998

29922999
static int hda_codec_pm_suspend(struct device *dev)
29933000
{
2994-
struct hda_codec *codec = dev_to_hda_codec(dev);
2995-
2996-
cancel_delayed_work_sync(&codec->jackpoll_work);
29973001
dev->power.power_state = PMSG_SUSPEND;
29983002
return pm_runtime_force_suspend(dev);
29993003
}

sound/pci/hda/patch_cirrus.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ static const struct snd_pci_quirk cs420x_fixup_tbl[] = {
395395

396396
/* codec SSID */
397397
SND_PCI_QUIRK(0x106b, 0x0600, "iMac 14,1", CS420X_IMAC27_122),
398+
SND_PCI_QUIRK(0x106b, 0x0900, "iMac 12,1", CS420X_IMAC27_122),
398399
SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81),
399400
SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122),
400401
SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101),

sound/pci/hda/patch_conexant.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ enum {
222222
CXT_PINCFG_LEMOTE_A1205,
223223
CXT_PINCFG_COMPAQ_CQ60,
224224
CXT_FIXUP_STEREO_DMIC,
225+
CXT_PINCFG_LENOVO_NOTEBOOK,
225226
CXT_FIXUP_INC_MIC_BOOST,
226227
CXT_FIXUP_HEADPHONE_MIC_PIN,
227228
CXT_FIXUP_HEADPHONE_MIC,
@@ -772,6 +773,14 @@ static const struct hda_fixup cxt_fixups[] = {
772773
.type = HDA_FIXUP_FUNC,
773774
.v.func = cxt_fixup_stereo_dmic,
774775
},
776+
[CXT_PINCFG_LENOVO_NOTEBOOK] = {
777+
.type = HDA_FIXUP_PINS,
778+
.v.pins = (const struct hda_pintbl[]) {
779+
{ 0x1a, 0x05d71030 },
780+
{ }
781+
},
782+
.chain_id = CXT_FIXUP_STEREO_DMIC,
783+
},
775784
[CXT_FIXUP_INC_MIC_BOOST] = {
776785
.type = HDA_FIXUP_FUNC,
777786
.v.func = cxt5066_increase_mic_boost,
@@ -971,7 +980,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
971980
SND_PCI_QUIRK(0x17aa, 0x3905, "Lenovo G50-30", CXT_FIXUP_STEREO_DMIC),
972981
SND_PCI_QUIRK(0x17aa, 0x390b, "Lenovo G50-80", CXT_FIXUP_STEREO_DMIC),
973982
SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC),
974-
SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC),
983+
SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_PINCFG_LENOVO_NOTEBOOK),
975984
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo G50-70", CXT_FIXUP_STEREO_DMIC),
976985
SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC),
977986
SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI),

sound/pci/hda/patch_realtek.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6909,6 +6909,7 @@ enum {
69096909
ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
69106910
ALC269VB_FIXUP_ASUS_ZENBOOK,
69116911
ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A,
6912+
ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE,
69126913
ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED,
69136914
ALC269VB_FIXUP_ORDISSIMO_EVE2,
69146915
ALC283_FIXUP_CHROME_BOOK,
@@ -7497,6 +7498,15 @@ static const struct hda_fixup alc269_fixups[] = {
74977498
.chained = true,
74987499
.chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK,
74997500
},
7501+
[ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = {
7502+
.type = HDA_FIXUP_PINS,
7503+
.v.pins = (const struct hda_pintbl[]) {
7504+
{ 0x18, 0x01a110f0 }, /* use as headset mic */
7505+
{ }
7506+
},
7507+
.chained = true,
7508+
.chain_id = ALC269_FIXUP_HEADSET_MIC
7509+
},
75007510
[ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = {
75017511
.type = HDA_FIXUP_FUNC,
75027512
.v.func = alc269_fixup_limit_int_mic_boost,
@@ -9203,6 +9213,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
92039213
ALC285_FIXUP_HP_GPIO_AMP_INIT),
92049214
SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation",
92059215
ALC285_FIXUP_HP_GPIO_AMP_INIT),
9216+
SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
92069217
SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
92079218
SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
92089219
SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
@@ -9274,6 +9285,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
92749285
SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
92759286
SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC),
92769287
SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC),
9288+
SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
92779289
SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC),
92789290
SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
92799291
SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),

sound/pci/ice1712/quartet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ static int qtet_ain12_sw_put(struct snd_kcontrol *kcontrol,
566566
{
567567
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
568568
unsigned int old, new, tmp, masked_old;
569-
old = new = get_scr(ice);
569+
old = get_scr(ice);
570570
masked_old = old & (SCR_AIN12_SEL1 | SCR_AIN12_SEL0);
571571
tmp = ucontrol->value.integer.value[0];
572572
if (tmp == 2)

sound/usb/card.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,14 @@ static const struct usb_audio_device_name usb_audio_names[] = {
387387
DEVICE_NAME(0x05e1, 0x0408, "Syntek", "STK1160"),
388388
DEVICE_NAME(0x05e1, 0x0480, "Hauppauge", "Woodbury"),
389389

390+
/* ASUS ROG Zenith II: this machine has also two devices, one for
391+
* the front headphone and another for the rest
392+
*/
393+
PROFILE_NAME(0x0b05, 0x1915, "ASUS", "Zenith II Front Headphone",
394+
"Zenith-II-Front-Headphone"),
395+
PROFILE_NAME(0x0b05, 0x1916, "ASUS", "Zenith II Main Audio",
396+
"Zenith-II-Main-Audio"),
397+
390398
/* ASUS ROG Strix */
391399
PROFILE_NAME(0x0b05, 0x1917,
392400
"Realtek", "ALC1220-VB-DT", "Realtek-ALC1220-VB-Desktop"),

sound/usb/mixer_maps.c

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,28 @@ static const struct usbmix_name_map corsair_virtuoso_map[] = {
374374
{ 0 }
375375
};
376376

377-
/* Some mobos shipped with a dummy HD-audio show the invalid GET_MIN/GET_MAX
378-
* response for Input Gain Pad (id=19, control=12) and the connector status
379-
* for SPDIF terminal (id=18). Skip them.
380-
*/
381-
static const struct usbmix_name_map asus_rog_map[] = {
382-
{ 18, NULL }, /* OT, connector control */
383-
{ 19, NULL, 12 }, /* FU, Input Gain Pad */
377+
/* ASUS ROG Zenith II with Realtek ALC1220-VB */
378+
static const struct usbmix_name_map asus_zenith_ii_map[] = {
379+
{ 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */
380+
{ 16, "Speaker" }, /* OT */
381+
{ 22, "Speaker Playback" }, /* FU */
382+
{ 7, "Line" }, /* IT */
383+
{ 19, "Line Capture" }, /* FU */
384+
{ 8, "Mic" }, /* IT */
385+
{ 20, "Mic Capture" }, /* FU */
386+
{ 9, "Front Mic" }, /* IT */
387+
{ 21, "Front Mic Capture" }, /* FU */
388+
{ 17, "IEC958" }, /* OT */
389+
{ 23, "IEC958 Playback" }, /* FU */
390+
{}
391+
};
392+
393+
static const struct usbmix_connector_map asus_zenith_ii_connector_map[] = {
394+
{ 10, 16 }, /* (Back) Speaker */
395+
{ 11, 17 }, /* SPDIF */
396+
{ 13, 7 }, /* Line */
397+
{ 14, 8 }, /* Mic */
398+
{ 15, 9 }, /* Front Mic */
384399
{}
385400
};
386401

@@ -611,9 +626,10 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
611626
.map = gigabyte_b450_map,
612627
.connector_map = gigabyte_b450_connector_map,
613628
},
614-
{ /* ASUS ROG Zenith II */
629+
{ /* ASUS ROG Zenith II (main audio) */
615630
.id = USB_ID(0x0b05, 0x1916),
616-
.map = asus_rog_map,
631+
.map = asus_zenith_ii_map,
632+
.connector_map = asus_zenith_ii_connector_map,
617633
},
618634
{ /* ASUS ROG Strix */
619635
.id = USB_ID(0x0b05, 0x1917),

sound/usb/mixer_quirks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3420,6 +3420,7 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
34203420
case USB_ID(0x1235, 0x8213): /* Focusrite Scarlett 8i6 3rd Gen */
34213421
case USB_ID(0x1235, 0x8214): /* Focusrite Scarlett 18i8 3rd Gen */
34223422
case USB_ID(0x1235, 0x8215): /* Focusrite Scarlett 18i20 3rd Gen */
3423+
case USB_ID(0x1235, 0x820c): /* Focusrite Clarett+ 8Pre */
34233424
err = snd_scarlett_gen2_init(mixer);
34243425
break;
34253426

sound/usb/mixer_scarlett_gen2.c

Lines changed: 89 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/*
3-
* Focusrite Scarlett Gen 2/3 Driver for ALSA
3+
* Focusrite Scarlett Gen 2/3 and Clarett+ Driver for ALSA
44
*
55
* Supported models:
66
* - 6i6/18i8/18i20 Gen 2
77
* - Solo/2i2/4i4/8i6/18i8/18i20 Gen 3
8+
* - Clarett+ 8Pre
89
*
910
* Copyright (c) 2018-2022 by Geoffrey D. Bennett <g at b4.vu>
1011
* Copyright (c) 2020-2021 by Vladimir Sadovnikov <[email protected]>
12+
* Copyright (c) 2022 by Christian Colglazier <[email protected]>
1113
*
1214
* Based on the Scarlett (Gen 1) Driver for ALSA:
1315
*
@@ -51,6 +53,9 @@
5153
* Support for phantom power, direct monitoring, speaker switching,
5254
* and talkback added in May-June 2021.
5355
*
56+
* Support for Clarett+ 8Pre added in Aug 2022 by Christian
57+
* Colglazier.
58+
*
5459
* This ALSA mixer gives access to (model-dependent):
5560
* - input, output, mixer-matrix muxes
5661
* - mixer-matrix gain stages
@@ -203,7 +208,8 @@ enum {
203208
SCARLETT2_CONFIG_SET_NO_MIXER = 0,
204209
SCARLETT2_CONFIG_SET_GEN_2 = 1,
205210
SCARLETT2_CONFIG_SET_GEN_3 = 2,
206-
SCARLETT2_CONFIG_SET_COUNT = 3
211+
SCARLETT2_CONFIG_SET_CLARETT = 3,
212+
SCARLETT2_CONFIG_SET_COUNT = 4
207213
};
208214

209215
/* Hardware port types:
@@ -841,6 +847,61 @@ static const struct scarlett2_device_info s18i20_gen3_info = {
841847
} },
842848
};
843849

850+
static const struct scarlett2_device_info clarett_8pre_info = {
851+
.usb_id = USB_ID(0x1235, 0x820c),
852+
853+
.config_set = SCARLETT2_CONFIG_SET_CLARETT,
854+
.line_out_hw_vol = 1,
855+
.level_input_count = 2,
856+
.air_input_count = 8,
857+
858+
.line_out_descrs = {
859+
"Monitor L",
860+
"Monitor R",
861+
NULL,
862+
NULL,
863+
NULL,
864+
NULL,
865+
"Headphones 1 L",
866+
"Headphones 1 R",
867+
"Headphones 2 L",
868+
"Headphones 2 R",
869+
},
870+
871+
.port_count = {
872+
[SCARLETT2_PORT_TYPE_NONE] = { 1, 0 },
873+
[SCARLETT2_PORT_TYPE_ANALOGUE] = { 8, 10 },
874+
[SCARLETT2_PORT_TYPE_SPDIF] = { 2, 2 },
875+
[SCARLETT2_PORT_TYPE_ADAT] = { 8, 8 },
876+
[SCARLETT2_PORT_TYPE_MIX] = { 10, 18 },
877+
[SCARLETT2_PORT_TYPE_PCM] = { 20, 18 },
878+
},
879+
880+
.mux_assignment = { {
881+
{ SCARLETT2_PORT_TYPE_PCM, 0, 18 },
882+
{ SCARLETT2_PORT_TYPE_ANALOGUE, 0, 10 },
883+
{ SCARLETT2_PORT_TYPE_SPDIF, 0, 2 },
884+
{ SCARLETT2_PORT_TYPE_ADAT, 0, 8 },
885+
{ SCARLETT2_PORT_TYPE_MIX, 0, 18 },
886+
{ SCARLETT2_PORT_TYPE_NONE, 0, 8 },
887+
{ 0, 0, 0 },
888+
}, {
889+
{ SCARLETT2_PORT_TYPE_PCM, 0, 14 },
890+
{ SCARLETT2_PORT_TYPE_ANALOGUE, 0, 10 },
891+
{ SCARLETT2_PORT_TYPE_SPDIF, 0, 2 },
892+
{ SCARLETT2_PORT_TYPE_ADAT, 0, 4 },
893+
{ SCARLETT2_PORT_TYPE_MIX, 0, 18 },
894+
{ SCARLETT2_PORT_TYPE_NONE, 0, 8 },
895+
{ 0, 0, 0 },
896+
}, {
897+
{ SCARLETT2_PORT_TYPE_PCM, 0, 12 },
898+
{ SCARLETT2_PORT_TYPE_ANALOGUE, 0, 10 },
899+
{ SCARLETT2_PORT_TYPE_SPDIF, 0, 2 },
900+
{ SCARLETT2_PORT_TYPE_NONE, 0, 22 },
901+
{ 0, 0, 0 },
902+
} },
903+
};
904+
844905
static const struct scarlett2_device_info *scarlett2_devices[] = {
845906
/* Supported Gen 2 devices */
846907
&s6i6_gen2_info,
@@ -855,6 +916,9 @@ static const struct scarlett2_device_info *scarlett2_devices[] = {
855916
&s18i8_gen3_info,
856917
&s18i20_gen3_info,
857918

919+
/* Supported Clarett+ devices */
920+
&clarett_8pre_info,
921+
858922
/* End of list */
859923
NULL
860924
};
@@ -1047,6 +1111,29 @@ static const struct scarlett2_config
10471111

10481112
[SCARLETT2_CONFIG_TALKBACK_MAP] = {
10491113
.offset = 0xb0, .size = 16, .activate = 10 },
1114+
1115+
/* Clarett+ 8Pre */
1116+
}, {
1117+
[SCARLETT2_CONFIG_DIM_MUTE] = {
1118+
.offset = 0x31, .size = 8, .activate = 2 },
1119+
1120+
[SCARLETT2_CONFIG_LINE_OUT_VOLUME] = {
1121+
.offset = 0x34, .size = 16, .activate = 1 },
1122+
1123+
[SCARLETT2_CONFIG_MUTE_SWITCH] = {
1124+
.offset = 0x5c, .size = 8, .activate = 1 },
1125+
1126+
[SCARLETT2_CONFIG_SW_HW_SWITCH] = {
1127+
.offset = 0x66, .size = 8, .activate = 3 },
1128+
1129+
[SCARLETT2_CONFIG_LEVEL_SWITCH] = {
1130+
.offset = 0x7c, .size = 8, .activate = 7 },
1131+
1132+
[SCARLETT2_CONFIG_AIR_SWITCH] = {
1133+
.offset = 0x95, .size = 8, .activate = 8 },
1134+
1135+
[SCARLETT2_CONFIG_STANDALONE_SWITCH] = {
1136+
.offset = 0x8d, .size = 8, .activate = 6 },
10501137
} };
10511138

10521139
/* proprietary request/response format */

sound/usb/pcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ static inline void fill_playback_urb_dsd_dop(struct snd_usb_substream *subs,
12691269
unsigned int wrap = subs->buffer_bytes;
12701270
u8 *dst = urb->transfer_buffer;
12711271
u8 *src = runtime->dma_area;
1272-
u8 marker[] = { 0x05, 0xfa };
1272+
static const u8 marker[] = { 0x05, 0xfa };
12731273
unsigned int queued = 0;
12741274

12751275
/*

0 commit comments

Comments
 (0)