[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180414104950.ngomyjy5l5cwhb5i@pali>
Date: Sat, 14 Apr 2018 12:49:50 +0200
From: Pali Rohár <pali.rohar@...il.com>
To: Lukas Wunner <lukas@...ner.de>
Cc: Kai-Heng Feng <kai.heng.feng@...onical.com>,
Takashi Iwai <tiwai@...e.de>, mario.limonciello@...l.com,
andy@...radead.org, dvhart@...radead.org, mjg59@...f.ucam.org,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH v3 3/3] ALSA: hda: Disabled unused audio controller for
Dell platforms with Switchable Graphics
On Saturday 14 April 2018 12:45:12 Lukas Wunner wrote:
> On Thu, Apr 12, 2018 at 10:15:41PM +0800, Kai-Heng Feng wrote:
> > > >>@@ -1711,6 +1745,11 @@ static int azx_create(struct snd_card *card,
> > > >>struct pci_dev *pci,
> > > >> if (err < 0)
> > > >> return err;
> > > >>
> > > >>+ if (check_dell_switchable_gfx(pci)) {
> > > >>+ pci_disable_device(pci);
> > >
> > > Now looking at it again... This code disables all ATI and NVIDIA sound
> > > cards available in any Dell System (laptop or AIO) if system says that
> > > SG is enabled, right?
> > >
> > > It means that also any external ATI or NVIDIA PCI card with audio device
> > > connected to Thunderbolt (e.g. via PCI <--> TB bridge) is always
> > > unconditionally disabled too?
> >
> > I never thought of this case, thanks for bringing this up.
> > Do you have any suggestion to check if it connects to the system via
> > Thunderbolt?
>
> Just use pci_is_thunderbolt_attached(), introduced by 8531e283bee6,
> like this:
>
> if (check_dell_switchable_gfx(pci) && !pci_is_thunderbolt_attached(pci))
And what about PCI-e device attached to ExpressCard slot?
> > >>>+ /* Only need to check for Dell laptops and AIOs */
> > >>>+ if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) ||
> > >>>+ !(dmi_match(DMI_CHASSIS_TYPE, "10") ||
> > >>>+ dmi_match(DMI_CHASSIS_TYPE, "13")) ||
> > >>>+ !(pdev->vendor == PCI_VENDOR_ID_ATI ||
> > >>>+ pdev->vendor == PCI_VENDOR_ID_NVIDIA))
> > >>>+ return false;
>
> It sure would be nice if someone could add macros for the chassis type
> to include/linux/dmi.h so that we don't have to use these magic numbers
> everywhere:
>
> $ git grep -l DMI_CHASSIS_TYPE
> drivers/firmware/dmi-id.c
> drivers/firmware/dmi_scan.c
> drivers/input/keyboard/atkbd.c
> drivers/input/serio/i8042-x86ia64io.h
> drivers/platform/x86/asus-wmi.c
> drivers/platform/x86/dell-laptop.c
> drivers/platform/x86/samsung-laptop.c
> include/linux/mod_devicetable.h
> scripts/mod/file2alias.c
>
> Thanks,
>
> Lukas
--
Pali Rohár
pali.rohar@...il.com
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists