Skip to content

Commit 5beb562

Browse files
Redecoratingtiwai
authored andcommitted
ALSA: hda/hdmi: Register with vga_switcheroo on Dual GPU Macbooks
Commit 586bc4a ("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: 586bc4a ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD") Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Orlando Chamberlain <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent ceaa837 commit 5beb562

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sound/pci/hda/hda_intel.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include <sound/intel-dsp-config.h>
5151
#include <linux/vgaarb.h>
5252
#include <linux/vga_switcheroo.h>
53+
#include <linux/apple-gmux.h>
5354
#include <linux/firmware.h>
5455
#include <sound/hda_codec.h>
5556
#include "hda_controller.h"
@@ -1463,7 +1464,7 @@ static struct pci_dev *get_bound_vga(struct pci_dev *pci)
14631464
* vgaswitcheroo.
14641465
*/
14651466
if (((p->class >> 16) == PCI_BASE_CLASS_DISPLAY) &&
1466-
atpx_present())
1467+
(atpx_present() || apple_gmux_detect(NULL, NULL)))
14671468
return p;
14681469
pci_dev_put(p);
14691470
}

0 commit comments

Comments
 (0)