]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda/hdmi: Register with vga_switcheroo on Dual GPU Macbooks
authorOrlando Chamberlain <orlandoch.dev@gmail.com>
Thu, 16 Feb 2023 10:34:51 +0000 (21:34 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:23 +0000 (09:33 +0100)
commitf92c09934ded0a8b0e27c511c68cdb7d57ccd5d4
tree96a671353342ef6a59eb4243b604ee09dfd10d89
parent7f5e7e4990fbcbf8fc4fe1ac6f6934f750697b63
ALSA: hda/hdmi: Register with vga_switcheroo on Dual GPU Macbooks

[ Upstream commit ae3d40444e323af75cf88d0dbbe6e0172b79fad9 ]

Commit d72e26f43982 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for
AMD") caused only AMD gpu's with PX to have their audio component register
with vga_switcheroo. This meant that Apple Macbooks with apple-gmux as the
gpu switcher no longer had the audio client registering, so when the gpu is
powered off by vga_switcheroo snd_hda_intel is unaware that it should have
suspended the device:

amdgpu: switched off
snd_hda_intel 0000:03:00.1:
    Unable to change power state from D3hot to D0, device inaccessible
snd_hda_intel 0000:03:00.1: CORB reset timeout#2, CORBRP = 65535

To resolve this, we use apple_gmux_detect() and register a
vga_switcheroo audio client when apple-gmux is detected.

Fixes: d72e26f43982 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD")
Link: https://lore.kernel.org/all/20230210044826.9834-9-orlandoch.dev@gmail.com/
Signed-off-by: Orlando Chamberlain <orlandoch.dev@gmail.com>
Link: https://lore.kernel.org/r/20230216103450.12925-1-orlandoch.dev@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/hda/hda_intel.c