Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760149Ab2FGIsA (ORCPT ); Thu, 7 Jun 2012 04:48:00 -0400 Received: from cantor2.suse.de ([195.135.220.15]:46330 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754513Ab2FGIr5 (ORCPT ); Thu, 7 Jun 2012 04:47:57 -0400 Date: Thu, 07 Jun 2012 10:47:55 +0200 Message-ID: From: Takashi Iwai To: Steven Newbury Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH] ALSA: hda - HDMI Audio init all connectors In-Reply-To: <1339048379.2910.9.camel@Nokia-N900> References: <1339048379.2910.9.camel@Nokia-N900> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2800 Lines: 76 At the next time you submit a patch, please add Cc to maintainer and subsystem ML. Otherwise it'd be easily overlooked. At Thu, 07 Jun 2012 06:52:59 +0100, Steven Newbury wrote: > > 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. > > Signed-off-by: Steven Newbury OK, it must be fixed indeed. The bug was introduced due to the change in VGA-switcheroo side -- originally check_hdmi_disabled() really checked the VGA-switcheroo state, so it returned the correct value in the earlier version. In anyway, your patch looks almost OK, but it'd be better to move ifdef and simplify like below. Could you check whether it works for you? Also, please give a patch that is applicable directly via git-am. Apparently you created it via git show. Instead, use git-format-patch or use --pretty=email for git-show. Or, send the patch directly via git-send-email. thanks, Takashi --- diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 2b6392b..2eb1b47 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -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_probe_continue(struct azx *chip); +#ifdef SUPPORT_VGA_SWITCHEROO 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, enum vga_switcheroo_state state) { @@ -2578,6 +2578,7 @@ static int __devinit register_vga_switcheroo(struct azx *chip) #else #define init_vga_switcheroo(chip) /* NOP */ #define register_vga_switcheroo(chip) 0 +#define check_hdmi_disabled(pci) false #endif /* SUPPORT_VGA_SWITCHER */ /* @@ -2638,6 +2639,7 @@ static int azx_dev_free(struct snd_device *device) return azx_free(device->device_data); } +#ifdef SUPPORT_VGA_SWITCHEROO /* * Check of disabled HDMI controller by vga-switcheroo */ @@ -2676,6 +2678,7 @@ static bool __devinit check_hdmi_disabled(struct pci_dev *pci) } return vga_inactive; } +#endif /* SUPPORT_VGA_SWITCHEROO */ /* * white/black-listing for position_fix -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/