Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66163C61DA4 for ; Thu, 16 Feb 2023 13:20:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229888AbjBPNU6 (ORCPT ); Thu, 16 Feb 2023 08:20:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjBPNU4 (ORCPT ); Thu, 16 Feb 2023 08:20:56 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7B2A55A9 for ; Thu, 16 Feb 2023 05:20:55 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 950C421D16; Thu, 16 Feb 2023 13:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1676553654; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=v5JyBkcwirWIeq0OSn+O0k4FE4Kvt8rex6mOed7tRrA=; b=fmgnUO6tJUMWyCAl90ikIHcD+QVsgNJ+X85yUTvubM6VeHRBhGkirr6ec8EBeeJ7sT96AP 2gYC/S4AfaXsD5jJAfbnMYUpicipvq486Xekd/unJRib5TgrS8tdvdd6IVgA/Pyybv5WRB 2ks8uYqEcILsN2TzTJ8sxBIa8ewd0vI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1676553654; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=v5JyBkcwirWIeq0OSn+O0k4FE4Kvt8rex6mOed7tRrA=; b=+eP391B+GYmkBsdtm0gPaCMhmkp8eW+nLpvVV1lmZbCAaoMPHHFM27V2Ka+UbIuNjYLwZt 5NDkkVfWXPsxeRBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 64A5E13438; Thu, 16 Feb 2023 13:20:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wthuF7Yt7mN5WQAAMHmgww (envelope-from ); Thu, 16 Feb 2023 13:20:54 +0000 Date: Thu, 16 Feb 2023 14:20:53 +0100 Message-ID: <877cwh7nm2.wl-tiwai@suse.de> From: Takashi Iwai To: Orlando Chamberlain Cc: alsa-devel@alsa-project.org, Jaroslav Kysela , Takashi Iwai , Evan Quan , Alex Deucher , linux-kernel@vger.kernel.org, Aditya Garg , Aun-Ali Zaidi , Kerem Karabay Subject: Re: [PATCHv2] hda/hdmi: Register with vga_switcheroo on Dual GPU Macbooks In-Reply-To: <20230216103450.12925-1-orlandoch.dev@gmail.com> References: <20230216103450.12925-1-orlandoch.dev@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 16 Feb 2023 11:34:51 +0100, Orlando Chamberlain wrote: > > Commit 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for > AMD") caused only AMD gpu's with PX to have their audio component register > with vga_switcheroo. This meant that Apple Macbooks with apple-gmux as the > gpu switcher no longer had the audio client registering, so when the gpu is > powered off by vga_switcheroo snd_hda_intel is unaware that it should have > suspended the device: > > amdgpu: switched off > snd_hda_intel 0000:03:00.1: > Unable to change power state from D3hot to D0, device inaccessible > snd_hda_intel 0000:03:00.1: CORB reset timeout#2, CORBRP = 65535 > > To resolve this, we use apple_gmux_detect() and register a > vga_switcheroo audio client when apple-gmux is detected. > > Fixes: 586bc4aab878 ("ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD") > Link: https://lore.kernel.org/all/20230210044826.9834-9-orlandoch.dev@gmail.com/ > Signed-off-by: Orlando Chamberlain > --- > v1->v2: Use apple_gmux_detect(), split this patch out of the patch > series Thanks, applied now. Takashi