Received: by 10.192.165.156 with SMTP id m28csp1868282imm; Thu, 12 Apr 2018 05:03:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx48BXxqwsZmsdTnTxXLorTwz8BOBPxJRIqRdUawV7kn7jrAavtlnuoSqZ1SspMQQnYaTQtg4 X-Received: by 2002:a17:902:122:: with SMTP id 31-v6mr747289plb.280.1523534615821; Thu, 12 Apr 2018 05:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523534615; cv=none; d=google.com; s=arc-20160816; b=pVzvyxTTv4NRR1VOU+/QPgBiK3F5yVszNV1M8h9MHHZSL5MJ4AiVQ8qeY2mNUhV5tv tEg3AK0PNphbdwzJxAdRZTTqgQuk5y16r/OT8ll4ElLyYuZ9XAlW1zBZHA7ZM9EBQK11 pM6Z9IwlhFIthgBTm7aiVr9C2yrWGzMXVF9wSzXXk+qQaGCWbiqqiV54GQfUqUX5Efbm +iyshcgVGPqKudbXGhltvNTbIYcqBPhcKun62Th7pTo5mjxCk1FDXzp7liHMgzjirV0N w8hP+5lyK9U6D4lI0hl+xFcEqE7eoVtkvgcdmJqYF3wHQYI0zlFpKmEOfXEeIcisUH0U Loyw== 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:dkim-signature :arc-authentication-results; bh=gwXLjhZsqX6t9TWr6NU0nOKq+pTro+jegH398WTiMXY=; b=fs5oJapZzPXnnFVfrVCWv8bKTxA8PhmktoP3zl/owgu5eCHXvJBMxB/tPH6LYrAKGC maPwwimZoOCYLwf5/RzYFxHFE7Cvum9lhI/MC8AtNkg7l6/SwGoGytdV3lbnEyRzdtNa 80olCj+bmEM7dYZrs21VI4AZIlq87cVBTI1X9mhprU5sH+s8qaip2VO7rqEccnViw+sl ZS6nV57PCN/h09AUURuZqomNdV+mcUdyJnRPOEMbbPBbr80RlRoAGhGmBgT1naXAhM6i DO9/iyITAqAjAt5jc4XCXvuq/sXrLpgZFWRyihfjZcUeZr4H2iVB/C0BITjdkqAVYvIf vsag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QxTXta9q; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q14si2177637pgr.311.2018.04.12.05.02.56; Thu, 12 Apr 2018 05:03:35 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QxTXta9q; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752735AbeDLK7O (ORCPT + 99 others); Thu, 12 Apr 2018 06:59:14 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:40926 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751920AbeDLK7M (ORCPT ); Thu, 12 Apr 2018 06:59:12 -0400 Received: by mail-wr0-f193.google.com with SMTP id v60so772950wrc.7; Thu, 12 Apr 2018 03:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=gwXLjhZsqX6t9TWr6NU0nOKq+pTro+jegH398WTiMXY=; b=QxTXta9qKtWtNuLTjSxQSFHOfLZHSRMQGpvFPdopBvVyOAW/1yHbv3G5DMYlg7irEg k4e8Vef4lUNxcDT2hdwZTS0a0mLxUK0jQ3Gv78KjwHZcA1bRjjrT2GwHQgCNQS/L31KO BbYtpHQSjE4UsyNHvM/EZXVxWAqBTZCO7HwW7yXgQ65RY6zcfdqe5i1/gR62YeCT+BPZ rCgvHjB70tl/XGDEvz5r+vVYhCA/WOzIpK/Oi0yUWS+wclUn3pCkPIz2WkUTne3NPT/T ovLdcFxTwhqR+n09Kw7NJA3b/q57b0UVBnck1ohTyq8vIqW1Dch8wmOKSLG/ShVBgHr/ t9DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=gwXLjhZsqX6t9TWr6NU0nOKq+pTro+jegH398WTiMXY=; b=jN5jstEhY3rDDXdR9gZNVvN35RqIE0EDQStZs7ZKkp5I9fFGxkj/sJya/lByBzN7JN NgO4EAt6c5HBqlszJTQK46YWcuaZogIHfitIoYqfezuY0HVaqCGa5pDUOZ3BZnxjDkId P2DmipVcngSyRvsY+oLtqxyVugFOGmzXV20iGVeP+f7fG+kAluQXfnOl1u5kmrleiJfq VLTsl0Wv75j7hGC/Cj9IuRivmOXp3g/FeC/ki0kaKEjju/xJ3X6W7wnM47it+2DN0Vol TuyzZBRBwNe0oAxk5HdUDhwTiCJMu4fjkovEJnPkuJx+S7LVmSrC8sCtVSJLxiBetqAt ZgxA== X-Gm-Message-State: ALQs6tBYoEIyaDW8EHG4QhpDIMbh7+IGuq8UMEE5XZkjVgiV4QeiA2pS twLil6hDOjTcs1H5PfijS6o= X-Received: by 10.223.220.75 with SMTP id m11mr452763wrj.174.1523530751043; Thu, 12 Apr 2018 03:59:11 -0700 (PDT) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id z11sm2901116wre.15.2018.04.12.03.59.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Apr 2018 03:59:10 -0700 (PDT) Date: Thu, 12 Apr 2018 12:59:09 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Takashi Iwai Cc: Kai-Heng Feng , 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 Subject: Re: [PATCH v3 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics Message-ID: <20180412105909.tbyfcjm55sb47hiq@pali> References: <20180412104239.25584-1-kai.heng.feng@canonical.com> <20180412104239.25584-3-kai.heng.feng@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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? > > + return -ENODEV; > > + } -- Pali Rohár pali.rohar@gmail.com