Received: by 10.192.165.148 with SMTP id m20csp1717732imm; Thu, 26 Apr 2018 00:54:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+6gKr1OgOGCE+feFimMOdmfPyNeAotIRKhksqO3WeASkSbPiObGayi1SlWBHqkFBdSgJnm X-Received: by 2002:a17:902:1c7:: with SMTP id b65-v6mr30396945plb.298.1524729296778; Thu, 26 Apr 2018 00:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524729296; cv=none; d=google.com; s=arc-20160816; b=rysDvKX3yZ8Gd79JzKHZx66Dxvs0Nc3k7pSLaXkrpTWKjIv4/NwEpqFRJl1jczG0Xa 1VCyde1rg3pRW6XA/4ZgdaTYef4omMcNcrjnHmczhqPn4wvpOSjBz2ytEfuJfzL/9sq6 lKjbLRDoJql+lPOu+YW1n+qtZCjMTYsfVP42vmP/5EY01CBEwOcL83ecCwJUMKWIidJ3 A7rGqYhVmzh5R77Ir0qPx3QcjEOLArB8/bI9mn3v6yWyte3hcfqo5obKtm08fq0E7tWr lHaWr4nUWzcST2t6URBwE8abEFvSXMX38rmISlWnav6WU/4E2yExpkcccGPQqQb+wAdq WOyA== 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=x7Ov+hYxBsU+2/RiFd24UxfVc/Gtg3CH/tEkF+VRXzY=; b=xV+U5zti7J9RMDF/DxkRa+WCc18V624y0npLVAJP6qdw5FZcuVDe5YfodT/695/8fW cg6GrCTFkv/k1mF1vBfejdawlFzqN2uk3tCLfeRp5fMk/0tdBkhVkGbzy7sig2/+gkSQ ZvaprcRVbGUBl6EAA1D3TeLIml7jbSXvLueWI6sNl3XunRdZxXJUDrz1CbN2yfaQ33i2 +17+bTT8aeWHNY8S2v1V7pw/mDX5Orz394hQUcTS0OXjUFx4N3ooQpwPE+lB8qzZAe2n MFkk/xOJrNDA+94ObHZLxrVi3u8WpVJOwKNQHMZn5pqM9T3m7olxEP004QRiFUEEMpGm MzAA== 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 t9-v6si18147256plo.592.2018.04.26.00.54.40; Thu, 26 Apr 2018 00:54: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; 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 S1754046AbeDZHwU (ORCPT + 99 others); Thu, 26 Apr 2018 03:52:20 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:59277 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753068AbeDZHwQ (ORCPT ); Thu, 26 Apr 2018 03:52:16 -0400 Received: from mail-pf0-f198.google.com ([209.85.192.198]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fBbhP-0001ta-Ac for linux-kernel@vger.kernel.org; Thu, 26 Apr 2018 07:52:15 +0000 Received: by mail-pf0-f198.google.com with SMTP id a6so18097313pfn.3 for ; Thu, 26 Apr 2018 00:52:15 -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=x7Ov+hYxBsU+2/RiFd24UxfVc/Gtg3CH/tEkF+VRXzY=; b=ZiI3XVd/HgMRMy0YKIIajqfa/SEQfyDNsZvlTNoamGc/NTIKmY7twGO4cRVAJ+4VmE dOw9qBnfQ50/vy4Q4DEM6IJ7LVHGHQbWOrqETBBUVhyT2cXwxxQHZftFOpnyY9f7jLTy A1dxHJPVjMKIrauh9UIqY8HqmcKoN9zu/qZMOqveikLoz3Hz6s1fevo0UR6uNtNbsoP3 R//o3eF5hO1cIi9lEbHyAfoiPo/LZLHLzpOqvBPScWm32yeDtXaER6T0BCdeT0JIaruB Xh/o3exEStIR+tgjCi6vm5vfcs+eTu+dnVCfWcP0mO7d4M6Icim70Wbdg8VD4VM4g+09 zNZw== X-Gm-Message-State: ALQs6tBPdijA1pH/gHm8BGbJ2I2aVM2UCbRVBJj3+Xy0Qzz9371sFzag iXHPeB0jBn+T2TFgxqs1I3h70hTxqhoOG9cd5ivBvruYWgYAsvkbHSFlRxULOaJ5yroldCoqBWU F0CyQy+QpEJoaDup9mLCdruk8xgpI2jSc/igfc5PL9g== X-Received: by 2002:a17:902:322:: with SMTP id 31-v6mr32460424pld.122.1524729133995; Thu, 26 Apr 2018 00:52:13 -0700 (PDT) X-Received: by 2002:a17:902:322:: with SMTP id 31-v6mr32460390pld.122.1524729133472; Thu, 26 Apr 2018 00:52:13 -0700 (PDT) Received: from [10.101.46.95] ([175.41.48.77]) by smtp.gmail.com with ESMTPSA id o64sm35349165pfb.62.2018.04.26.00.52.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Apr 2018 00:52:12 -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: [alsa-devel] [PATCH v4 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics From: Kai Heng Feng In-Reply-To: <20180424211347.GA18258@wunner.de> Date: Thu, 26 Apr 2018 15:52:08 +0800 Cc: =?utf-8?Q?Pali_Roh=C3=A1r?= , Takashi Iwai , mjg59@srcf.ucam.org, dvhart@infradead.org, andy@infradead.org, Mario Limonciello , alsa-devel@alsa-project.org, Linux Kernel Mailing List , platform-driver-x86@vger.kernel.org Content-Transfer-Encoding: 8bit Message-Id: References: <20180420094432.13133-1-kai.heng.feng@canonical.com> <20180420094432.13133-3-kai.heng.feng@canonical.com> <20180423080844.yh6ndicpu6mwy336@pali> <20180424211347.GA18258@wunner.de> To: Lukas Wunner 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 > On Apr 25, 2018, at 5:13 AM, Lukas Wunner wrote: > > On Mon, Apr 23, 2018 at 04:18:35PM +0800, Kai Heng Feng wrote: >>> On Apr 23, 2018, at 4:08 PM, Pali Rohár wrote: >>> On Monday 23 April 2018 16:04:55 Kai Heng Feng wrote: >>>>> On Apr 20, 2018, at 8:10 PM, Takashi Iwai wrote: >>>>> On Fri, 20 Apr 2018 11:44:32 +0200, Kai-Heng Feng wrote: >>>>>> Now it's a typical discrete-only system. HDMI audio comes from AMD >>>>>> audio >>>>>> controller, others from Intel audio controller. >>>>>> >>>>>> When SG is enabled, the unused AMD audio contoller still exposes its >>>>>> sysfs, so userspace still opens the control file and stream. If >>>>>> userspace tries to output sound through the stream, it hangs the >>>>>> system. >>>>> >>>>> Hm, could you give more information about how it hangs? >>>> >>>> Well, I should say "it hangs the userspace process" instead. >>>> >>>> $ speaker-test -t wav -c 2 -D hw:CARD=HDMI,DEV=3 >>>> ...and it just stopped. Can't Ctrl+C to break it. >>> >>> So userspace process cannot be killed at all? Then it is different bug >>> in kernel and disabling pci device is just a workaround. Not a real fix. >>> >>> I would propose to find out what happen and why it cannot be killed >>> (probably it stuck somewhere in kernel) and fix it properly. >> >> That's because the audio device got runtime suspended by the graphics. >> >> In this case, if we really want to use the the discrete audio, then we >> also >> need to wake up the graphics. >> The discrete audio is totally useless when SG is enabled, so my approach >> is >> just to disable it. > > I don't quite follow, that should be fixed by commit 07f4f97d7b4b > ("vga_switcheroo: Use device link for HDA controller") which landed > in v4.17-rc1. Looks like I hit a new bug: the discrete GFX and its audio controller never enters to D3. The GFX can enter to D3 with my prosed patch. > > My understanding was that with SG enabled, the external DP/HDMI ports > are muxed to the Intel GPU, so audio can only be streamed to external > displays by the Intel HDA, not by the HDA integrated into the discrete > AMD/Nvidia GPU. Audio streamed to the latter would essentially end up > in a blackhole. And preventing the user from seeing such useless audio > devices was the sole purpose of this commit. Am I missing something? Yes this is the intention. Kai-Heng > > Thanks, > > Lukas