Received: by 10.192.165.156 with SMTP id m28csp2017295imm; Thu, 12 Apr 2018 07:19:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx48onIjXV+CFca49MnhXpTq2OXwwlaTfh7nHraFZKd78KKFH3CO0Ri5G9IUVGPl9w5JH7H+r X-Received: by 10.101.83.65 with SMTP id w1mr870682pgr.111.1523542777960; Thu, 12 Apr 2018 07:19:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523542777; cv=none; d=google.com; s=arc-20160816; b=meMgOCxLck0gtH3l4RGUslj+EJ92+vHk4QaSmif9FOT0Dok+tLsa1xary7KwvhY2Sz KnTpI67+Xl+VaIUbMFxZqqspN580XjiOM0X/3gKOgnmrp3g0l4zHxFccXr4lm8SprjST fxFWrdSEiSMBonrQ9nkDhOOelGZVI1FsntwsFQfmW0aU2B4aCvXIQpeseQYA1bvd+fQy utwycfOjUsfbYb3pdEs/iC3NFAPUd1F18vjnBOCYU39fHFDHkQnMXvRNMFebFyyRJ2gK uGvNGZZ+VWKUeFUM5+63eg7ekt2oEBGXHNn0Ld/p3BCqk2oY3/3n9DIn8G1SZ2RctNRp 0KaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:arc-authentication-results; bh=iVHe9s8s7Mg20KqWQXXUjfwENjXq7IsZCOa4RhPSeJM=; b=A1gxoUWSo7vNyIGULcKMpsDYkgt7h0RrKbvW+R4ACEPh9eoQ/bFLnYijeVoVDOzmCx tbX5RkxP1IouqvQKZ1QaD/h2vyKqOh3oX1gqerw1BV4qCg4lEiBi+EL8/FFihLeiLG7J vuw13ZMmkUZmQgh72WNgCJOI9mSRzK7zJT2+tAJrKkj5U/gRVdpMf5d4MHgE9vIEfYLf 8xAHGhkFgSk/IdFBMHwZTabjdo0q6zrn7ugn583+7CES8NmTu9Yoom2U0GxjpbWZQAoM MV0e3lLQVsYRbD2YFur2Ofsh821+kRwUXRXTnF79m67b1qIsJG1QZEfHxIH5EPEW/1Vu ZU6w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5-v6si3545463plo.739.2018.04.12.07.19.00; Thu, 12 Apr 2018 07:19:37 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752943AbeDLOPv (ORCPT + 99 others); Thu, 12 Apr 2018 10:15:51 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:40406 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752303AbeDLOPt (ORCPT ); Thu, 12 Apr 2018 10:15:49 -0400 Received: from mail-pl0-f69.google.com ([209.85.160.69]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1f6d0u-0006bn-RV for linux-kernel@vger.kernel.org; Thu, 12 Apr 2018 14:15:48 +0000 Received: by mail-pl0-f69.google.com with SMTP id t1-v6so3926930plb.5 for ; Thu, 12 Apr 2018 07:15:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=iVHe9s8s7Mg20KqWQXXUjfwENjXq7IsZCOa4RhPSeJM=; b=BhFd5lBnTj/ie+lrbGVfjNjDt9p2MqeyYd7J42lynPY3WFk6TycImQXdla1Plw06Sr jo8fXTAEmkqW7EFMRQI5j1J4m5uK8xzAgkW3rtPjGGZ6REr6cAoKvLRD+hV60BUxMIIo K1BBfnPzIPDxoFpgKEN4UfSkhKwND3ZhuCDT7Nynw58kROlelDAulB6GCTNcIfiDf14x dUMewe2IoXIeX9OomsT2mBkbauu/las1YdSY8eZipCztLPie1iXnT4iZlwaTNDHVTrqU DGE1k5BltU0mz4va4fyYJtNZ2i4vmuIWfHfejbzWFB8gyNtmnSo57zocsenhjUtZSEGi 9BqA== X-Gm-Message-State: ALQs6tA/znhoNe340SNRHpIfS4U5X1gf0xqHq5KyVt/0Sf/CEPIB8+Za A2rQ5IKHqP33hGjHIu9dbPnR0rGa7N9Ix5VqLXV8PIJ7GThMNql+gyEA6Hf3hYI/hyJq7UJa32L oGFBhboTM8pYl9zKk5aZy1WpqwSKBfeEC62INEvDieQ== X-Received: by 10.98.212.67 with SMTP id u3mr7862365pfl.58.1523542546787; Thu, 12 Apr 2018 07:15:46 -0700 (PDT) X-Received: by 10.98.212.67 with SMTP id u3mr7862350pfl.58.1523542546553; Thu, 12 Apr 2018 07:15:46 -0700 (PDT) Received: from [192.168.1.205] (114-32-108-117.HINET-IP.hinet.net. [114.32.108.117]) by smtp.gmail.com with ESMTPSA id y90sm10566077pfi.130.2018.04.12.07.15.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Apr 2018 07:15:45 -0700 (PDT) Content-Type: text/plain; charset=utf-8; delsp=yes; format=flowed Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: [PATCH v3 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics From: Kai-Heng Feng In-Reply-To: <20180412105909.tbyfcjm55sb47hiq@pali> Date: Thu, 12 Apr 2018 22:15:41 +0800 Cc: Takashi Iwai , Lukas Wunner , 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 Content-Transfer-Encoding: 8bit Message-Id: <93DC0F40-81A5-49C6-A470-0D1B6AA85725@canonical.com> References: <20180412104239.25584-1-kai.heng.feng@canonical.com> <20180412104239.25584-3-kai.heng.feng@canonical.com> <20180412105909.tbyfcjm55sb47hiq@pali> To: =?utf-8?Q?Pali_Roh=C3=A1r?= X-Mailer: Apple Mail (2.3445.6.18) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org at 6:59 PM, Pali Rohár wrote: > On Thursday 12 April 2018 12:50:02 Takashi Iwai wrote: >>> +#if IS_ENABLED(CONFIG_DELL_LAPTOP) >>> +static bool check_dell_switchable_gfx(struct pci_dev *pdev) >>> +{ >>> + bool (*dell_switchable_gfx_is_enabled_func)(void); >>> + bool enabled; >>> + >>> + /* 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; > ... >>> @@ -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); > > Hi! > > 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? Yes. > > 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? Kai-Heng > >>> + return -ENODEV; >>> + } > > -- > Pali Rohár > pali.rohar@gmail.com