Received: by 10.192.165.148 with SMTP id m20csp3148792imm; Mon, 23 Apr 2018 01:10:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Nj9zDMX4QBBtP8wBdpcGXcDdcIxdLPRJJXp2dOGXnwcE8EniB9vjmnMANGRGHk7t+cMrj X-Received: by 10.99.47.4 with SMTP id v4mr16720346pgv.42.1524471004794; Mon, 23 Apr 2018 01:10:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524471004; cv=none; d=google.com; s=arc-20160816; b=g0j99aD8FbI2jBhyxzrm22hV6sBeBocOEY6HRA2Z+/06xs7OBysgwXtdm+ulSVuXu+ wM4KqCc0ctEsgvmbJ+SpFLGYyKJaFdXHAmCHPro/TT/hYAYpX2evemyWAjfOQ0FFx749 fKWz8vwRHasjG1SwoYn0403pXf5mLuLF6UwrCScpbg6xMI5JcPWBAQEe43buS3WUCs0X 4H7j06xHFdKOj/7b73xO/xAcHTxashXfk8LWuwOgkAoIYUKdAkis2R3wfd8izrk33ptt RUwcnlrHuZuCQSfZd8rKnzx5OUlqRR5Lhf5bPjorZlqHkGCDuBaLIcmQV9KQIBwQfgb9 Br0Q== 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=jdu0Xd3nFDf7LXeD1Q5j9wiEl61GpJdUsO3HUU9aym4=; b=lAxLYOC0lLms8zV4CEtc/8t0Hc1g4vAf21UO0Q45J89Ghmvr2Oa0Ij6Q3+JJmFyYUA nR945qoPCqxK0kDzI5tppXQVkbH+PfD7uoUZtht/CKUcHC3fE3ADXW8fmx5RUpwTDOL1 Yd7YuhA97aEfsO5yZ/WGllYU4YfYAErdF9xGan2O00xRo8FoHdqeWm9umxdTmgmo3twL +ygeDURFf8uxofEM3azzhpjgNLDrxViXPwkcUkSXyoM6PAqqhAK4F3ifO2/1o5xZVmIk JwjdMbbneBz6emr3X1QtXFmckW84Adwf312P8+gqELOVopE41a3p1DSQ8p6IOEm0oB+7 xnoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f9mCzc7I; 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 g14-v6si5322235plj.146.2018.04.23.01.09.50; Mon, 23 Apr 2018 01:10:04 -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=f9mCzc7I; 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 S1754250AbeDWIIu (ORCPT + 99 others); Mon, 23 Apr 2018 04:08:50 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36980 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754010AbeDWIIr (ORCPT ); Mon, 23 Apr 2018 04:08:47 -0400 Received: by mail-wr0-f194.google.com with SMTP id f14-v6so38545240wre.4; Mon, 23 Apr 2018 01:08:46 -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=jdu0Xd3nFDf7LXeD1Q5j9wiEl61GpJdUsO3HUU9aym4=; b=f9mCzc7IeUAZPixhOg/1j1PVqgYt6txDIhgwm1K77L//RrU23LnFfyPv+cmDDEksmp 9ZfxpaDm8FhURNYuDcsxWv48lpVPn+GA1P6QOQnjv+TStDsk+wY8DJ9kHo5dsLQF1WQV lOwpopHDlXbJUyJd83n1JiMDvAz07vuHm9xibyAvZJA6EtW+hiRoes3XeM9ZfeKruZeq HjnDmxf8o1S8kV4HMtTk2S6ed0HT4rUr7HClDJ0wiWm4cofU21I8wXZTpKd8VLDudgeB 9k6RqhYWbJkDD6hrxDENB8kT/rKGO5tfMOFEIzZtO6P8pSZSSPxZT5fHRuowPRCSlIjb sidQ== 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=jdu0Xd3nFDf7LXeD1Q5j9wiEl61GpJdUsO3HUU9aym4=; b=b7uI1tJjLOUQQuimOq2XbWhwFsvI93TPfhWsa6KXQ7Ku6bqqPgK0naNFnpg4rJlDpm rSDdX4iYnP4/0kM5J4a/wr4vPhOXBLXIlVFuCB3sF0UU63YmzlAEQEs7Obgz9RlipU/k 5TKAmrtdNyt/+HrMPYmv7zBHFRmwj6A8nWN7sGleW4z7wvfHFRSZCnpFm5k1qTmpep8X Kvm/L1rMDPqoV/34YFKz4q+sWABbeQA1VpZIFBH11sy2ZBeBSXzvrUlZwDv+BFA7/SNO H5WG8NgxotHdYjvkFzruEQ/eo31xCi+E6/A6s8s/dREbeHQiAVMGiSMaK5P7tXM3zuzi 6bkQ== X-Gm-Message-State: ALQs6tCNVLxGpiOs2xgHIChRedOTLASHrzkV5itvleRzIpcq1hmw0drd tQgeOuJ5XnVV5rMezaHNUYU= X-Received: by 2002:adf:8d90:: with SMTP id o16-v6mr15902326wrb.81.1524470926160; Mon, 23 Apr 2018 01:08:46 -0700 (PDT) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id a139sm6519228wma.43.2018.04.23.01.08.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Apr 2018 01:08:45 -0700 (PDT) Date: Mon, 23 Apr 2018 10:08:44 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Kai Heng Feng 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 Subject: Re: [alsa-devel] [PATCH v4 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics Message-ID: <20180423080844.yh6ndicpu6mwy336@pali> References: <20180420094432.13133-1-kai.heng.feng@canonical.com> <20180420094432.13133-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 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. > > > > > > > @@ -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