Received: by 10.192.165.156 with SMTP id m28csp1690397imm; Sat, 14 Apr 2018 04:21:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/yq5HHF2GwS3QA9JxK0xdTBh9lWRQCg2tlDo8t5e9Kn9s7JtivqmYiWMmPdQF+vPd/uz1Q X-Received: by 2002:a17:902:bc4b:: with SMTP id t11-v6mr8552859plz.343.1523704917867; Sat, 14 Apr 2018 04:21:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523704917; cv=none; d=google.com; s=arc-20160816; b=YVMdovzxWhVqMYSwndgeNElUdjt5dySLF0Ax0hSfD23+a+rNH/y13CK7UxKoqgNj3A nqw2SdUuF5vPPSNWb5JEV8ASX4EJ2LfiUqOHCI/X9nEQ+4a6T87pS1kY68uluVo7tKF9 2KGlhpz/zAbSxLCk6PdnOwKx5BzTjmhqOSa3kAXKLqt8tgBNIyyk63rD7pvTSruUfP3c xOF1lunumMT71jBcUBoSbZNWI+L4LmLcLR9nNn2rLV/UpfBcmCgo/Wf01tQYgKqP/4AL Gr1GQn0Z/kIbwfqaj/J8xqZM1GaFKsp7fG9GZLxKDL89VF8NlFLEnN0uQn7Wzn8t3JOe 05+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=DB4/+hnjHIERVy6lUywOO/JZTnoS4UEY3o3DQbC1P8Q=; b=HuE2NfQvSySFjD74ngX4MkWv2TTBxludyAD83iWbso1B9tx//xghjbs6myjxDdnJQ0 R4WpMwznbaXXHNiQHUJ1ERjwXbGTMzcVWgGwzu5nDkdaxxbkEDPF6o5Fg7+oG5ywm84Z LQ9CNyjLBonHw0vK5N9YA9aqd+UK/b5KKCi3ElES6QjUMfN2F473b6c85tLqRFnrWjYi /7PleiaOhdUgB0/x36CZdTNMFTMOouYhpnoOepmmv3+PptgP+Fm4NU8yztNGsz2ktKL+ JcTG4bPeTRVueRtZBYCiUEe9qSKzSObAL+EAjfH6HUdZ9co8QVwGZVafzuD3i9jQE+SE J9jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o128si5756874pga.653.2018.04.14.04.21.09; Sat, 14 Apr 2018 04:21:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750993AbeDNLRP (ORCPT + 99 others); Sat, 14 Apr 2018 07:17:15 -0400 Received: from bmailout3.hostsharing.net ([176.9.242.62]:50429 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750880AbeDNLRN (ORCPT ); Sat, 14 Apr 2018 07:17:13 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 004FB100FBE10; Sat, 14 Apr 2018 13:17:12 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 970A5195F7; Sat, 14 Apr 2018 13:17:11 +0200 (CEST) Date: Sat, 14 Apr 2018 13:17:11 +0200 From: Lukas Wunner To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Kai-Heng Feng , Takashi Iwai , mario.limonciello@dell.com, andy@infradead.org, dvhart@infradead.org, mjg59@srcf.ucam.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: Re: [PATCH v3 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics Message-ID: <20180414111711.GA4245@wunner.de> References: <20180412104239.25584-1-kai.heng.feng@canonical.com> <20180412104239.25584-3-kai.heng.feng@canonical.com> <20180412105909.tbyfcjm55sb47hiq@pali> <93DC0F40-81A5-49C6-A470-0D1B6AA85725@canonical.com> <20180414104512.GA27158@wunner.de> <20180414104950.ngomyjy5l5cwhb5i@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180414104950.ngomyjy5l5cwhb5i@pali> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 14, 2018 at 12:49:50PM +0200, Pali Roh?r wrote: > 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: > > > 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? I don't know of a bullet-proof way to recognize those. In theory one could check if the PCIe port above the GPU is a non-hotplug root port, but I think there are machines with hotplug capable root ports with GPUs below them that aren't actually removable. However I think ExpressCard-attached GPUs were rare, much less ones with integrated HDA controller, so in reality that's probably a non-issue. Thanks, Lukas