From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [alsa-devel] [PATCH v4 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics Date: Fri, 20 Apr 2018 14:10:54 +0200 Message-ID: References: <20180420094432.13133-1-kai.heng.feng@canonical.com> <20180420094432.13133-3-kai.heng.feng@canonical.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20180420094432.13133-3-kai.heng.feng@canonical.com> Sender: linux-kernel-owner@vger.kernel.org To: Kai-Heng Feng Cc: mjg59@srcf.ucam.org, pali.rohar@gmail.com, dvhart@infradead.org, andy@infradead.org, mario.limonciello@dell.com, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org List-Id: alsa-devel@alsa-project.org On Fri, 20 Apr 2018 11:44:32 +0200, Kai-Heng Feng wrote: > > Now it's a typical discrete-only system. HDMI audio comes from AMD audio > controller, others from Intel audio controller. > > When SG is enabled, the unused AMD audio contoller still exposes its > sysfs, so userspace still opens the control file and stream. If > userspace tries to output sound through the stream, it hangs the system. Hm, could you give more information about how it hangs? > @@ -1627,6 +1629,42 @@ static void check_msi(struct azx *chip) > } > } > > +#if IS_ENABLED(CONFIG_DELL_LAPTOP) This should be IS_REACHABLE(), as both dell-laptop and HD-audio are tristate. > +static bool check_dell_switchable_gfx(struct pci_dev *pdev) I'd remove "_dell" word here. Such a check would be likely needed for other vendors, and it's quite possible that the function will be extended to cover a wider DMI table. thanks, Takashi