Commit 8393ec4a authored by Steven Newbury's avatar Steven Newbury Committed by Takashi Iwai

ALSA: hda - HDMI Audio init all connectors when VGA-switcheroo is off

When VGA_SWITCHEROO support is enabled hda_intel initialises the HDMI
audio device on the current VGA device.  When it's not enabled it only
initialises the HDMI device on the default VGA adaptor, this means
secondary cards get no audio support which is very unhelpful for
multi-seat!

With this patch, when SUPPORT_VGA_SWITCHEROO is disabled hda_intel
initialises all HDMI audio devices, not just the default VGA.

[minor optimizations by tiwai]
Signed-off-by: default avatarSteven Newbury <steve@snewbury.org.uk>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 505cff00
...@@ -2484,9 +2484,9 @@ static void azx_notifier_unregister(struct azx *chip) ...@@ -2484,9 +2484,9 @@ static void azx_notifier_unregister(struct azx *chip)
static int DELAYED_INIT_MARK azx_first_init(struct azx *chip); static int DELAYED_INIT_MARK azx_first_init(struct azx *chip);
static int DELAYED_INIT_MARK azx_probe_continue(struct azx *chip); static int DELAYED_INIT_MARK azx_probe_continue(struct azx *chip);
#ifdef SUPPORT_VGA_SWITCHEROO
static struct pci_dev __devinit *get_bound_vga(struct pci_dev *pci); static struct pci_dev __devinit *get_bound_vga(struct pci_dev *pci);
#ifdef SUPPORT_VGA_SWITCHEROO
static void azx_vs_set_state(struct pci_dev *pci, static void azx_vs_set_state(struct pci_dev *pci,
enum vga_switcheroo_state state) enum vga_switcheroo_state state)
{ {
...@@ -2578,6 +2578,7 @@ static int __devinit register_vga_switcheroo(struct azx *chip) ...@@ -2578,6 +2578,7 @@ static int __devinit register_vga_switcheroo(struct azx *chip)
#else #else
#define init_vga_switcheroo(chip) /* NOP */ #define init_vga_switcheroo(chip) /* NOP */
#define register_vga_switcheroo(chip) 0 #define register_vga_switcheroo(chip) 0
#define check_hdmi_disabled(pci) false
#endif /* SUPPORT_VGA_SWITCHER */ #endif /* SUPPORT_VGA_SWITCHER */
/* /*
...@@ -2638,6 +2639,7 @@ static int azx_dev_free(struct snd_device *device) ...@@ -2638,6 +2639,7 @@ static int azx_dev_free(struct snd_device *device)
return azx_free(device->device_data); return azx_free(device->device_data);
} }
#ifdef SUPPORT_VGA_SWITCHEROO
/* /*
* Check of disabled HDMI controller by vga-switcheroo * Check of disabled HDMI controller by vga-switcheroo
*/ */
...@@ -2676,6 +2678,7 @@ static bool __devinit check_hdmi_disabled(struct pci_dev *pci) ...@@ -2676,6 +2678,7 @@ static bool __devinit check_hdmi_disabled(struct pci_dev *pci)
} }
return vga_inactive; return vga_inactive;
} }
#endif /* SUPPORT_VGA_SWITCHEROO */
/* /*
* white/black-listing for position_fix * white/black-listing for position_fix
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment