Skip to content

Commit 78431ab

Browse files
committed
Merge tag 'sound-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "A few wrap-up small fixes for the usual HD-audio and USB-audio stuff: - A regression fix for S3 suspend on old Intel platforms - A fix for possible Oops in ASoC HD-audio binding - Trivial quirks for various devices" * tag 'sound-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Fixed HP right speaker no sound ALSA: hda: fix NULL pointer dereference during suspend ALSA: hda/hdmi: Fix keep_power assignment for non-component devices ALSA: hda: Workaround for spurious wakeups on some Intel platforms ALSA: hda/realtek: Fix add a "ultra_low_power" function for intel reference board (alc256) ALSA: hda/realtek: typo_fix: enable headset mic of ASUS ROG Zephyrus G14(GA401) series with ALC289 ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G15(GA502) series with ALC289 ALSA: usb-audio: Add implicit feedback quirk for SSL2
2 parents d8b9fae + 5649625 commit 78431ab

File tree

6 files changed

+56
-10
lines changed

6 files changed

+56
-10
lines changed

sound/pci/hda/hda_codec.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2935,6 +2935,10 @@ static int hda_codec_runtime_suspend(struct device *dev)
29352935
struct hda_codec *codec = dev_to_hda_codec(dev);
29362936
unsigned int state;
29372937

2938+
/* Nothing to do if card registration fails and the component driver never probes */
2939+
if (!codec->card)
2940+
return 0;
2941+
29382942
cancel_delayed_work_sync(&codec->jackpoll_work);
29392943
state = hda_call_codec_suspend(codec);
29402944
if (codec->link_down_at_suspend ||
@@ -2949,6 +2953,10 @@ static int hda_codec_runtime_resume(struct device *dev)
29492953
{
29502954
struct hda_codec *codec = dev_to_hda_codec(dev);
29512955

2956+
/* Nothing to do if card registration fails and the component driver never probes */
2957+
if (!codec->card)
2958+
return 0;
2959+
29522960
codec_display_power(codec, true);
29532961
snd_hdac_codec_link_up(&codec->core);
29542962
hda_call_codec_resume(codec);

sound/pci/hda/hda_controller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
/* 24 unused */
4242
#define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */
4343
#define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */
44-
/* 27 unused */
44+
#define AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP (1 << 27) /* Workaround for spurious wakeups after suspend */
4545
#define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */
4646
#define AZX_DCAPS_NO_MSI64 (1 << 29) /* Stick to 32-bit MSIs */
4747
#define AZX_DCAPS_SEPARATE_STREAM_TAG (1 << 30) /* capture and playback use separate stream tag */

sound/pci/hda/hda_intel.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@ enum {
298298
/* PCH for HSW/BDW; with runtime PM */
299299
/* no i915 binding for this as HSW/BDW has another controller for HDMI */
300300
#define AZX_DCAPS_INTEL_PCH \
301-
(AZX_DCAPS_INTEL_PCH_BASE | AZX_DCAPS_PM_RUNTIME)
301+
(AZX_DCAPS_INTEL_PCH_BASE | AZX_DCAPS_PM_RUNTIME |\
302+
AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP)
302303

303304
/* HSW HDMI */
304305
#define AZX_DCAPS_INTEL_HASWELL \
@@ -1028,7 +1029,14 @@ static int azx_suspend(struct device *dev)
10281029
chip = card->private_data;
10291030
bus = azx_bus(chip);
10301031
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
1031-
pm_runtime_force_suspend(dev);
1032+
/* An ugly workaround: direct call of __azx_runtime_suspend() and
1033+
* __azx_runtime_resume() for old Intel platforms that suffer from
1034+
* spurious wakeups after S3 suspend
1035+
*/
1036+
if (chip->driver_caps & AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP)
1037+
__azx_runtime_suspend(chip);
1038+
else
1039+
pm_runtime_force_suspend(dev);
10321040
if (bus->irq >= 0) {
10331041
free_irq(bus->irq, chip);
10341042
bus->irq = -1;
@@ -1057,7 +1065,10 @@ static int azx_resume(struct device *dev)
10571065
if (azx_acquire_irq(chip, 1) < 0)
10581066
return -EIO;
10591067

1060-
pm_runtime_force_resume(dev);
1068+
if (chip->driver_caps & AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP)
1069+
__azx_runtime_resume(chip, false);
1070+
else
1071+
pm_runtime_force_resume(dev);
10611072
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
10621073

10631074
trace_azx_resume(chip);

sound/pci/hda/patch_hdmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2440,6 +2440,7 @@ static void generic_acomp_notifier_set(struct drm_audio_component *acomp,
24402440
mutex_lock(&spec->bind_lock);
24412441
spec->use_acomp_notifier = use_acomp;
24422442
spec->codec->relaxed_resume = use_acomp;
2443+
spec->codec->bus->keep_power = 0;
24432444
/* reprogram each jack detection logic depending on the notifier */
24442445
for (i = 0; i < spec->num_pins; i++)
24452446
reprogram_jack_detect(spec->codec,
@@ -2534,7 +2535,6 @@ static void generic_acomp_init(struct hda_codec *codec,
25342535
if (!snd_hdac_acomp_init(&codec->bus->core, &spec->drm_audio_ops,
25352536
match_bound_vga, 0)) {
25362537
spec->acomp_registered = true;
2537-
codec->bus->keep_power = 0;
25382538
}
25392539
}
25402540

sound/pci/hda/patch_realtek.c

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5975,6 +5975,16 @@ static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
59755975
snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
59765976
}
59775977

5978+
static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec,
5979+
const struct hda_fixup *fix, int action)
5980+
{
5981+
if (action != HDA_FIXUP_ACT_INIT)
5982+
return;
5983+
5984+
msleep(100);
5985+
alc_write_coef_idx(codec, 0x65, 0x0);
5986+
}
5987+
59785988
/* for hda_fixup_thinkpad_acpi() */
59795989
#include "thinkpad_helper.c"
59805990

@@ -6152,8 +6162,10 @@ enum {
61526162
ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS,
61536163
ALC269VC_FIXUP_ACER_HEADSET_MIC,
61546164
ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE,
6155-
ALC289_FIXUP_ASUS_G401,
6165+
ALC289_FIXUP_ASUS_GA401,
6166+
ALC289_FIXUP_ASUS_GA502,
61566167
ALC256_FIXUP_ACER_MIC_NO_PRESENCE,
6168+
ALC285_FIXUP_HP_GPIO_AMP_INIT,
61576169
};
61586170

61596171
static const struct hda_fixup alc269_fixups[] = {
@@ -7363,7 +7375,14 @@ static const struct hda_fixup alc269_fixups[] = {
73637375
.chained = true,
73647376
.chain_id = ALC269_FIXUP_HEADSET_MIC
73657377
},
7366-
[ALC289_FIXUP_ASUS_G401] = {
7378+
[ALC289_FIXUP_ASUS_GA401] = {
7379+
.type = HDA_FIXUP_PINS,
7380+
.v.pins = (const struct hda_pintbl[]) {
7381+
{ 0x19, 0x03a11020 }, /* headset mic with jack detect */
7382+
{ }
7383+
},
7384+
},
7385+
[ALC289_FIXUP_ASUS_GA502] = {
73677386
.type = HDA_FIXUP_PINS,
73687387
.v.pins = (const struct hda_pintbl[]) {
73697388
{ 0x19, 0x03a11020 }, /* headset mic with jack detect */
@@ -7379,6 +7398,12 @@ static const struct hda_fixup alc269_fixups[] = {
73797398
.chained = true,
73807399
.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
73817400
},
7401+
[ALC285_FIXUP_HP_GPIO_AMP_INIT] = {
7402+
.type = HDA_FIXUP_FUNC,
7403+
.v.func = alc285_fixup_hp_gpio_amp_init,
7404+
.chained = true,
7405+
.chain_id = ALC285_FIXUP_HP_GPIO_LED
7406+
},
73827407
};
73837408

73847409
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -7529,7 +7554,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
75297554
SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
75307555
SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
75317556
SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED),
7532-
SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_LED),
7557+
SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
75337558
SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
75347559
SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
75357560
SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
@@ -7561,7 +7586,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
75617586
SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
75627587
SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
75637588
SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC),
7564-
SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_G401),
7589+
SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
7590+
SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401),
75657591
SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
75667592
SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
75677593
SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
@@ -7581,7 +7607,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
75817607
SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
75827608
SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
75837609
SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
7584-
SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC225_FIXUP_HEADSET_JACK),
7610+
SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
75857611
SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
75867612
SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
75877613
SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),

sound/usb/pcm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs,
367367
ifnum = 0;
368368
goto add_sync_ep_from_ifnum;
369369
case USB_ID(0x07fd, 0x0008): /* MOTU M Series */
370+
case USB_ID(0x31e9, 0x0001): /* Solid State Logic SSL2 */
370371
case USB_ID(0x31e9, 0x0002): /* Solid State Logic SSL2+ */
371372
case USB_ID(0x0d9a, 0x00df): /* RTX6001 */
372373
ep = 0x81;

0 commit comments

Comments
 (0)