Received: by 10.192.165.156 with SMTP id m28csp1693869imm; Sat, 14 Apr 2018 04:26:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx49MKjVY7V7dMDa4BxXglGkkKo15JRzZjNB4EudOoF39FjYyI6LLPJYQpUUX1xOtiIkUNUmO X-Received: by 10.99.143.75 with SMTP id r11mr7011584pgn.341.1523705218988; Sat, 14 Apr 2018 04:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523705218; cv=none; d=google.com; s=arc-20160816; b=JsqQ3oy+XK+z3dMMaB9zEcg4eNaS7cXV+DBz+LkIGVWxNiHW5zlWfenYRj5jtWQ6S7 Psej56Bheu3rmjBDynm1HmfuMik4MGWzX8Bdh5tMmASIIkySv8ZOhoNgj8f5Vqk46pVc Vmra4tcCdjCFJAQc0COhoHFaYqzetQtFxIzwiabmPFHLgwBCkfL/PLUyBorGGbm9Zg3E g5G4Hco1gKNbk9EQryryTe6pHA4jLsokPmI+kBcBTCeTAzEssMoKoj/JYvmCAgCr1qMi mm8n29MBP93h+8klk55Ss4IRSrRhDLbDxL/JNmPjXk13TsCQ6ki6vIeM9WRxFBWJsNwk AVjA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=4QrsH5PhnM6kRnEZXyDP3IE5fX99fRV4fxRxgNNlhRE=; b=N3gR93h37gLXc27DkeHVMm1Y4rY8mCpUo5Gc2YzgzEIQRPd/wDhGXf8o5F2AXTZg5W dNv8WMEIXB24YNHE2o1jAI7n4+jd7OCcJ3U+zh4VG+tU08/UU36dPmGrXhJ7X8PRaG0L byUf6cbB+9KVrdqi6Fb0PwT5lfsTtJDmbdOoR1evQogDf4NujvzES5YRmXHoBuEJeXPx 4kmb4YkrkeijZ/WnpMGmWcx6OHNA8HR4YmgJpe5lduabiQsu1bUFOFL5WzFlIF+8faZb iR78KjbJK+Ov2AfIl80T2nK8eCCA8QvwU88u+IPbRSdp/rJOjs/EhO7IH2E58ATB9Isf Jyfg== 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 m65si6586363pfc.9.2018.04.14.04.26.45; Sat, 14 Apr 2018 04:26:58 -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 S1751374AbeDNLZc (ORCPT + 99 others); Sat, 14 Apr 2018 07:25:32 -0400 Received: from bmailout3.hostsharing.net ([176.9.242.62]:51283 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750936AbeDNLZb (ORCPT ); Sat, 14 Apr 2018 07:25:31 -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 DDA19100F00FB; Sat, 14 Apr 2018 13:25:29 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 7EAF01AF10; Sat, 14 Apr 2018 13:25:29 +0200 (CEST) Date: Sat, 14 Apr 2018 13:25:29 +0200 From: Lukas Wunner To: Kai-Heng Feng Cc: Takashi Iwai , mario.limonciello@dell.com, pali.rohar@gmail.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: <20180414112529.GB4245@wunner.de> References: <20180412104239.25584-1-kai.heng.feng@canonical.com> <20180412104239.25584-3-kai.heng.feng@canonical.com> <018FF40E-B380-4E22-9599-2F4A2A8B51B7@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <018FF40E-B380-4E22-9599-2F4A2A8B51B7@canonical.com> 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 Thu, Apr 12, 2018 at 10:12:49PM +0800, Kai-Heng Feng wrote: > at 6:50 PM, Takashi Iwai wrote: > > On Thu, 12 Apr 2018 12:42:39 +0200, Kai-Heng Feng wrote: > > > When SG is enabled, the unused AMD audio controller still exposes its > > > sysfs, so userspace still opens the control file and stream. If > > > userspace tries to output sound through the stream, it hangs when > > > runtime suspend kicks in: > > > [ 12.796265] snd_hda_intel 0000:01:00.1: Disabling via vga_switcheroo > > > [ 12.796367] snd_hda_intel 0000:01:00.1: Cannot lock devices! > > > > > > Since the discrete audio controller isn't useful when SG enabled, we > > > should just disable the device. > > > > > > Signed-off-by: Kai-Heng Feng > > > > I thought we manage this better now with runtime PM by Lukas's recent > > patchset? > > Yes, that's true. I'll update commit log for next iteration. > > Nevertheless, the unusable control file and stream still get exposed via > sysfs. > We should disable them when SG is enabled. Right, the hang on runtime suspend as mentioned in the commit message should be gone in 4.17. The purpose of this patch is thus to prevent the user from seeing or opening the HDA controller on the discrete GPU. If SG is enabled, external DP/HDMI displays are muxed to the Intel GPU, hence the HDA controller on the discrete GPU cannot communicate with the attached displays. Thanks, Lukas