Skip to content

Commit 0165c4e

Browse files
ideaktiwai
authored andcommitted
ALSA: hda: Fix hang during shutdown due to link reset
During system shutdown codecs may be still active, and resetting the controller->codec HW link in this state - based on the bug reporter's tests - leads to the shutdown sequence to get stuck. This happens at least on the reporter's KBL system with an ALC662 codec. For now fix the issue by skipping the link reset step. Fixes: 472e18f ("ALSA: hda: Release controller display power during shutdown/reboot") References: https://bugzilla.kernel.org/show_bug.cgi?id=214045 References: https://gitlab.freedesktop.org/drm/intel/-/issues/3618#note_1024665 Reported-and-tested-by: [email protected] Cc: [email protected] Signed-off-by: Imre Deak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent da94692 commit 0165c4e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

sound/pci/hda/hda_intel.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,10 +883,11 @@ static unsigned int azx_get_pos_skl(struct azx *chip, struct azx_dev *azx_dev)
883883
return azx_get_pos_posbuf(chip, azx_dev);
884884
}
885885

886-
static void azx_shutdown_chip(struct azx *chip)
886+
static void __azx_shutdown_chip(struct azx *chip, bool skip_link_reset)
887887
{
888888
azx_stop_chip(chip);
889-
azx_enter_link_reset(chip);
889+
if (!skip_link_reset)
890+
azx_enter_link_reset(chip);
890891
azx_clear_irq_pending(chip);
891892
display_power(chip, false);
892893
}
@@ -895,6 +896,11 @@ static void azx_shutdown_chip(struct azx *chip)
895896
static DEFINE_MUTEX(card_list_lock);
896897
static LIST_HEAD(card_list);
897898

899+
static void azx_shutdown_chip(struct azx *chip)
900+
{
901+
__azx_shutdown_chip(chip, false);
902+
}
903+
898904
static void azx_add_card_list(struct azx *chip)
899905
{
900906
struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
@@ -2385,7 +2391,7 @@ static void azx_shutdown(struct pci_dev *pci)
23852391
return;
23862392
chip = card->private_data;
23872393
if (chip && chip->running)
2388-
azx_shutdown_chip(chip);
2394+
__azx_shutdown_chip(chip, true);
23892395
}
23902396

23912397
/* PCI IDs */

0 commit comments

Comments
 (0)