Received: by 10.213.65.68 with SMTP id h4csp205411imn; Tue, 13 Mar 2018 01:14:56 -0700 (PDT) X-Google-Smtp-Source: AG47ELtB+HXBpm83uHtCbTcyf557zyXYkS3gpQwxAZJ+doIltG7UAzDqsSK1YpI5k/Zv9e0gotHz X-Received: by 10.101.93.17 with SMTP id e17mr9120904pgr.239.1520928896480; Tue, 13 Mar 2018 01:14:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520928896; cv=none; d=google.com; s=arc-20160816; b=CmRuhFAn+9seUgAOO8hW9fD5GqH2+jr7O91qY5ePoLkURcahVO0XcQGQrKpEgSmOSU LN3xsSEmIUAD0iuGDCCCSTUJBIFR9Ci87nzi2zDEu7pnNx89hfXSecVBCTWhXMgnsoRB vyqRkbKd16sal5fgKJ15WxCTo1uKwmkRzkCuL3+KSIjLl4Gv8tn7kXhYOfIaBVT2ROJL bOXNVwLqfDXaR/PHDp2QejVn0dC2ayd832LbPNJLRijq43MQMa1dDn+KL9mKkuzHJQf5 pgb5SWMJIWMEhNSnfaCxRsQyGpWQoewNNHTUfkvyWUFPuUJSwgtneRnDIzYnCuLMy2MV YcuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=3EQLJqF2YeQPsH9NqVLzP1/hWWfSpjTzC9mV9A8FtFM=; b=1EFYJRpdLhGoxuv1JNnekH6S2xgRJEGl8hWWIUmg2qN6G+QqVXJcl8BbWDGJr8Ta5O MFsWKyB4pkLcuQHID9Sf9F95GKCxnFi7AuCBLWFmrB8iyEI8EyByXdJpkHOmpYAE7qiA u6c0KWp8XSZYsD/6eHEweoQYihTfwCLYj4+WosUTRbguO1AO+GbDxHfd44m7dZ5UgSZG q3ITX8eAY9Act5jaS1CvhhGpqwUU4ChcnsZ/PR2OA9nZGdp/moLOiRWoAf+E7Nwg5A1m zuMTX+U2wDJkqI8rN/aHizPronP1WtGOO7CNHjzOJfqpiLau0OdRqW3k0LFXAOxSGqNa /2CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@dell.com header.s=smtpout header.b=HL/ASOg/; 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=dell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o16si1889374pgc.832.2018.03.13.01.14.41; Tue, 13 Mar 2018 01:14:56 -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=fail header.i=@dell.com header.s=smtpout header.b=HL/ASOg/; 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=dell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752271AbeCMINp (ORCPT + 99 others); Tue, 13 Mar 2018 04:13:45 -0400 Received: from esa7.dell-outbound.iphmx.com ([68.232.153.96]:59567 "EHLO esa7.dell-outbound.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752000AbeCMINo (ORCPT ); Tue, 13 Mar 2018 04:13:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1520928755; x=1552464755; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=tfFhQR8c4nky3+Z97jfIP1kRbPgz5PCe9ZoKBS2j6Lw=; b=HL/ASOg/LZ6RIu+O/bIzH9VbvKkRXLlReFUhAnEWAuFgAJhVTrgJlVeq /vkJvqS2KisObCgu4PfiNEMRwE4IVpwXV+AKkWo/fawJHSPAx6Qi9n5nj wDY0ju5bOi4YVyOOfOAOIvOprl9pc184V0AItYXNt9Rd6cOT4f1huHUDA w=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2F3AADWh6damMqZ6ERdGQEBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAYQlfygKjWONc4IEextthjeNDYIVCoUlAoMdITQYAQIBAQEBAQE?= =?us-ascii?q?CAQIQAQEBAQEICwsGKC6COCKCSgEBAQQdHTQLDAQCAQgRBAEBAR4FBAchJQkIA?= =?us-ascii?q?gQOBQgThGUDFa1uhyQNgTCCFYU1gi6DPIJ4NoJqgj4xhTIEmiUxCY0tgy2BbYQ?= =?us-ascii?q?1iEmKMocWgSweggtwT4JDgkIigWN3AY1VgRgBAQE?= X-IPAS-Result: =?us-ascii?q?A2F3AADWh6damMqZ6ERdGQEBAQEBAQEBAQEBAQcBAQEBAYQ?= =?us-ascii?q?lfygKjWONc4IEextthjeNDYIVCoUlAoMdITQYAQIBAQEBAQECAQIQAQEBAQEIC?= =?us-ascii?q?wsGKC6COCKCSgEBAQQdHTQLDAQCAQgRBAEBAR4FBAchJQkIAgQOBQgThGUDFa1?= =?us-ascii?q?uhyQNgTCCFYU1gi6DPIJ4NoJqgj4xhTIEmiUxCY0tgy2BbYQ1iEmKMocWgSweg?= =?us-ascii?q?gtwT4JDgkIigWN3AY1VgRgBAQE?= Received: from esa2.dell-outbound2.iphmx.com ([68.232.153.202]) by esa7.dell-outbound.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 03:12:34 -0500 From: Received: from ausxippc101.us.dell.com ([143.166.85.207]) by esa2.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 14:11:03 +0600 X-LoopCount0: from 10.166.132.169 X-IronPort-AV: E=Sophos;i="5.47,464,1515477600"; d="scan'208";a="1063703413" X-DLP: DLP_GlobalPCIDSS To: CC: , , , , , , , Subject: RE: [PATCH v2 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics Thread-Topic: [PATCH v2 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics Thread-Index: AQHTtr1XC+3UjKIddE2I55hGuXPKiaPIAceAgAAHyYD//5ufkIAAaMcA//+dHPCAAgPLgIABZOtwgABdgwCAAGHKMIACVMEA//+wi9A= Date: Tue, 13 Mar 2018 08:13:41 +0000 Message-ID: <591ad9c31f604afc8bd08858eb611323@ausx13mpc120.AMER.DELL.COM> References: <20180308091023.9061-1-kai.heng.feng@canonical.com> <20180308091023.9061-3-kai.heng.feng@canonical.com> <20180309090223.xb55ltac4pfesdrh@pali> <723DA929-C9FA-4F69-8D3A-03D8A75D09A6@canonical.com> <014795f5a3014cd3bf55de26f76a5af8@ausx13mpc124.AMER.DELL.COM> <20180309094600.m24d3zbzdsmls7aw@pali> <09eadabb264f401a88b427744505adf8@ausx13mpc124.AMER.DELL.COM> <20180310103809.5nnwoulua2u64rku@pali> <20180311143018.u64cldtxuv7divta@pali> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.242.75] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Kai Heng Feng [mailto:kai.heng.feng@canonical.com] > Sent: Tuesday, March 13, 2018 3:56 PM > To: Limonciello, Mario > Cc: pali.rohar@gmail.com; mjg59@srcf.ucam.org; dvhart@infradead.org; > andy@infradead.org; tiwai@suse.com; platform-driver-x86@vger.kernel.org; = Linux > Kernel Mailing List ; alsa-devel@alsa-proje= ct.org > Subject: Re: [PATCH v2 3/3] ALSA: hda: Disabled unused audio controller f= or Dell > platforms with Switchable Graphics >=20 >=20 >=20 > > On Mar 12, 2018, at 9:30 AM, Mario.Limonciello@dell.com wrote: > > > >>> I think the missing aspect is that this is only used in AIO and lapto= p > >>> form > >>> factors where the discrete graphics is in a non-removable form factor= . > >> > >> Why we are not checking if kernel is running on AIO or laptop form > >> factor then? Or it is not possible? > > > > Kai Heng, can you please confirm if AIO sets chassis type properly? > > It should be 0Dh. > > > > If so, then I think as second check for chassis type should be possible= for > > next version of this patch. >=20 > The chassis type is correctly set as 0Dh on AIOs. >=20 > > > >> Basically what I see there is that we need to detect if current HW > >> platform has switchable graphics and check how is configured AUDIO MUX= . > >> > >> But instead of directly checking hw state of audio MUX, we are trying = to > >> check something different which could get us information of state of t= he > >> audio mux. > >> > >> I suspect that we do not have a way how to check audio MUX directly, s= o > >> it needs to be done indirectly -- via some Dell SMBIOS call and some > >> other heuristic. This is something which should be specified either in > >> comment or in commit message (problem of type: we need X, but check fo= r > >> Y). > >> > >> And if we are doing this check indirectly, we should do the most > >> specific test and not more general. > > > > Right. > > > >> I think that PCI vendor ID check of audio device is more general test > >> then checking if kernel is running on Dell laptop (check via DMI). And > >> if we can check also if running on AIO or laptop form, then it would b= e > >> more specific test. > >> > >>> Running with your hypothetical though, what would happen is if it's > >>> on a non-Dell machine the PCI check would pass and then the code > >>> would not be executed by dell-laptop (since dell-smbios didn't load). > >> > >> Right. > >> > >>> If it was on a Dell machine it would load but the BIOS would return > >>> either Switchable graphics turned off, or invalid token. > >>> > >>> Even though these aren't real for switchable graphics on Dell I don't > >>> see a problem with either of these situations if it ever came up. > >> > >> I see, this solution is working... > >> > >> ... but, I see there a very bad precedense. What would happen if anoth= er > >> laptop manufactor comes with similar solution for hybrid graphics. Doe= s > >> it mean that hda audio driver would try to call for every one vendor i= ts > >> vendor dependent API function (EFI, SMM, WMI, whatever) to check if > >> current HW has some switchable graphics and needs special checks? > >> > >> Those vendor dependent API functions (which Dell SMBIOS is) should be > >> really called on vendor hardware. > >> > >> Otherwise audio drivers would load bunch of the other vendor dependent > >> platform modules and all of those modules (except maximally one) just > >> return error. > > > > Sure the more specific the check the less symbol requests needed that > > will fail. > > > > Kai Heng, > > > > Can you please use Alex Hung's OEM strings patch in your series to matc= h > > "Dell System" in OEM strings too? >=20 > Sure, but this probably need to wait till it gets merged in Linus' tree. >=20 It's already in -next isn't it? Isn't that sufficient to indicate your pat= ch depends on that? Or it could come through platform-x86 tree too if needed. During the merge window one of the duplicates will get dropped. > > > > Between chassis type, OEM strings match, and AMD vendor/Dell subsystem > > vendor that should satisfy all of Pali's concerns I think. > > > > If anyone thinks that's too much, please speak up. > > > >>> Compiling a whitelist is a wasted effort because it will have to chan= ge > >>> Every year for every new platform that has AMD switchable graphics. > >> > >> I agree, But see that this patch already uses vendor ID whitelisting. > > > > I mean making a whitelist of all individual affected Dell platforms wil= l > > grow > > each year. I want to avoid that approach.