Received: by 10.192.165.148 with SMTP id m20csp3156217imm; Mon, 23 Apr 2018 01:20:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/eQg8bJM00OtRNfvgH1gt6PFzrtckXImHfwFhmNb1OCHnkYG+ZuHjf1bXLHtG/Bh7DhgnO X-Received: by 10.101.85.11 with SMTP id f11mr16499373pgr.252.1524471630648; Mon, 23 Apr 2018 01:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524471630; cv=none; d=google.com; s=arc-20160816; b=aAySmDdJFGhFnybFFVCP74Sdm+uC+yeYIvp+UlbYxd4167YpRjudotjcEWyfw9ug8d x0y2wuH7uMVOXab5w126T4NQ6eBy5KiWYLikQNcN304lWqWa60cWXAponI/VRDqg57mY wpFaejim7bak/iSrU+KCR2+O/1oergluuHWekSg9wSJqxliizKzM6B2f1x5M/JJTVd6w 6LQpToWInJiJTTBP1CXCjUuqm/N9P9AiqhsWuQsr7yPj+XrO+xH2T3XaDBjK6NwGUZE6 KDX+19TUtOBNoEZURJ5tW/IV3KEZJ27o7yRq6q1NRcLOPr2O8E0fYTqLcb+IQ1Asovjt h35g== 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=JamHhXLWymMdj4o9Q0HN8c5hqeaWCptLhN28SXSkZQ0=; b=k0uFB6Kp4nWul47JYv0jr0sZiNvyZRBzdMl+kfVNx5FX9qd2slkGIDHmwow5R3nS1v SFXc51YdfnWnY5SEPouvBSPEgtTMbsydSa7hYfLgPPQyQKsF6w1JjiALmVs0tF2rKwPU icBVDq7LpSmDHUfGV54lu3rBnGdWsyuXVVVhCZYc08P/+HlSj6/0mU8FJVOAWPM0gKbR WYtuszsTNEbdxcVMuSr2cksNeQKM2/MSwvSmrCcG9zC99wbj9FwNJsuj3qnR29MbMOw4 0EQIzLaFf9YlkUNJFGCfT28BOsBEu8jEH+XPEFAgiMcW20X198bkmCb43PasQdkJDx6b jMzA== 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 204si10654683pfu.274.2018.04.23.01.20.16; Mon, 23 Apr 2018 01:20:30 -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 S1754349AbeDWISs (ORCPT + 99 others); Mon, 23 Apr 2018 04:18:48 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:53615 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754330AbeDWISn (ORCPT ); Mon, 23 Apr 2018 04:18:43 -0400 Received: from mail-pg0-f72.google.com ([74.125.83.72]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fAWgM-0002Wk-Bh for linux-kernel@vger.kernel.org; Mon, 23 Apr 2018 08:18:42 +0000 Received: by mail-pg0-f72.google.com with SMTP id b18so6066597pgv.14 for ; Mon, 23 Apr 2018 01:18:42 -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=JamHhXLWymMdj4o9Q0HN8c5hqeaWCptLhN28SXSkZQ0=; b=chFgnArpFUd12JQvVwI374/TvG9PQTRIMx4ThkltyaUwO4Wr3p5iDwol4/64XEX7mM jLFa/7TUJ9qPYW/chCAB7Z9GjT7k1Hd/SGwBFq9QoNXfCYE0U0TNHcD0BHy2fIhHrZZw V2cVtLTVmR8PE2iDs6bSG2/S7/tOl9xlv9simRA5fZlkVU7QFwIYnxDZZfb5oHti4NDp 4A3RDXxublUExz29nVKFOliSjizhKTYnc77DSw0BsbaVBCPgf/LQUru2mS4V292FL+yP 3i1Q80CRNwvEpO313/33gpgjKK8XCbpSPmSU20LNnEVMkSBD7TaKUL+5h7m4MwNVR4Wz 3arg== X-Gm-Message-State: ALQs6tDY4gwzYi2tXGPzllJInpyxEcrPl+3FqdkYQ26KMTRljifdK/aB +cPalflgyIsu2X3mIRG2ArJIctQj1Fxy1iGiAz7qfoE3omZP1TlVTb9gRdcLqT70nH/BWhTBnXK 8/i1v1jeSwLeJclcMLoihHLe2TG5z1bd3pWtZBuG0dg== X-Received: by 10.99.135.198 with SMTP id i189mr15891334pge.2.1524471520950; Mon, 23 Apr 2018 01:18:40 -0700 (PDT) X-Received: by 10.99.135.198 with SMTP id i189mr15891321pge.2.1524471520705; Mon, 23 Apr 2018 01:18:40 -0700 (PDT) Received: from [10.101.46.95] ([175.41.48.77]) by smtp.gmail.com with ESMTPSA id a4sm28168975pfj.107.2018.04.23.01.18.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 01:18:39 -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: <20180423080844.yh6ndicpu6mwy336@pali> Date: Mon, 23 Apr 2018 16:18:35 +0800 Cc: Takashi Iwai , mjg59@srcf.ucam.org, dvhart@infradead.org, andy@infradead.org, Mario Limonciello , tiwai@suse.com, 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> 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 > 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. Kai-Heng > >>>> @@ -1627,6 +1629,42 @@ static void check_msi(struct azx *chip) >>>> } >>>> } >>>> >>>> +#if IS_ENABLED(CONFIG_DELL_LAPTOP) >>> >>> This should be IS_REACHABLE(), as both dell-laptop and HD-audio are >>> tristate. >> >> Thanks, will update in next version. >> >>>> +static bool check_dell_switchable_gfx(struct pci_dev *pdev) >>> >>> I'd remove "_dell" word here. Such a check would be likely needed for >>> other vendors, and it's quite possible that the function will be >>> extended to cover a wider DMI table. >> >> Makes sense. Will also update this one. >> >> Kai-Heng >> >>> thanks, >>> >>> Takashi > > -- > Pali Rohár > pali.rohar@gmail.com