Received: by 10.192.165.148 with SMTP id m20csp180242imm; Fri, 20 Apr 2018 05:12:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx49zoRPHu5rmBGKHTYPf0I6pI1nNS/5uoEyCdHtE6cO06oI3V/N8BZ4glJ5Fn6HDqD3WlRsT X-Received: by 2002:a17:902:9042:: with SMTP id w2-v6mr9951864plz.34.1524226338463; Fri, 20 Apr 2018 05:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524226338; cv=none; d=google.com; s=arc-20160816; b=kRVB2Wab1RPYV+kY1UXwj7PCccWUgGOOhCF/RA3GCubyP2sCMDdJdptwvrMbMmdRQF 5obfeaL5KUyVGYA98vvdnY5hU+odFWEcMsZJuS7O2/+eWGoSeno1tSqxh1hY3bftQ+1R ABw4u9wAjuH/XiC10TUoy7XPJwZW2BF9qNJM+7o3wiUsQKAUVMheMW9YSms8jA8F9Dv2 zA4r47NS8yqmYKk8AJqG8sdx97ZooHn3nkKLlRASj8z/Msg5v0n3pAoMoghaO6lWuFNZ I0vr9pyeA6s6RGhr3mk8e+q8FH5M1hlVMQ8MYkd59f6WBWxo17TBBIEs9irpiSss//1g SRzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date :arc-authentication-results; bh=9ukJlWph5AuoqzK0d7VsxB8+iIOCz5X7QnlLRK8xd6A=; b=DkXMIyuIkaGvEIAf53WqzNw9CBz0epzG63BSFIMIue2mYd7uy08FfHsjyNhwRtQQoO Aa9ma4aRQM2wGw73WorlNKCyUuG+1FZH0+f8D44arIlMAFMy6VQlZRxjLWgY/Vhs8vro f2V6vJPe0AXmA+qbRd7+uuqUOuowCX1X73wxpJcUM28YkMGg6KCKfB40EileipYzjbEz T+LOXz7/ePTAtfAx+O9yia3JNX3Piy3+UUCHWWHHk+7xlT0vahfnr/C6R907IH6kLrYl XIXLtz6JjaaLqMevTDq5myOxbbvx2+t8YTzpg6G1bGic4bK3SGcyGAV+xAefrOG3pb0l abqQ== 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 z129si4886355pgb.40.2018.04.20.05.12.04; Fri, 20 Apr 2018 05:12:18 -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 S1754779AbeDTMK7 (ORCPT + 99 others); Fri, 20 Apr 2018 08:10:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:44366 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754607AbeDTMK5 (ORCPT ); Fri, 20 Apr 2018 08:10:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 46A15ADA9; Fri, 20 Apr 2018 12:10:56 +0000 (UTC) Date: Fri, 20 Apr 2018 14:10:54 +0200 Message-ID: From: Takashi Iwai To: Kai-Heng Feng Cc: mjg59@srcf.ucam.org, pali.rohar@gmail.com, dvhart@infradead.org, andy@infradead.org, mario.limonciello@dell.com, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, 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 In-Reply-To: <20180420094432.13133-3-kai.heng.feng@canonical.com> References: <20180420094432.13133-1-kai.heng.feng@canonical.com> <20180420094432.13133-3-kai.heng.feng@canonical.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > @@ -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. > +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. thanks, Takashi