Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37B683CAE99; Thu, 17 Sep 2026 18:15:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789668926; cv=none; b=gK9gxffbfKcR2m/j+jocfqnaKumcWUIZkxrcZWP7oVVOO1uJ67X/iJyaI5MQ3EPYx/wJa5Vn2YSyWrE6dZmYweK9ETLbsNAsOH6iF2wuAYNzG34spYr4JMTdklteIGpY//qV3p/8DPwdOP6kIp85vEdTQzDLAzgzr9gka5pA2PE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789668926; c=relaxed/simple; bh=RH3wsW0Gff528BzKztYG9l7H6Hg5yW7y8DLZ2CfXtfY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i+bCUsPCBT+VmEf6YuZEH8TZ0ZbJTthp6SjEUlK47eQXAkRy9zzHS9Z7n1zoqI/t/ry+mXihDK6s1RG1ts5PbvUSQYjXxZ1hRywLCurTC42AiGvnnWI/ehRFBkj9vuWDNDuSyf4nYZyeR9+Kss1nbpHoMstUq0z5vxkL6aFpZKk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=l5wADnw9; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="l5wADnw9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DE711F000FF; Thu, 17 Sep 2026 18:15:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789668925; bh=+Kf98NBYGOt4u+EHqemtSONfzgYqI6KM0Vcb9lRB+k4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=l5wADnw9lSJE8jLKOYzNEocjeMJoTszyFlZbr3CnitK0C7Dtk0C4/ePFMiso+60d4 K4JrpGT0DXhT4C7yid6xAj1h2RYQ0OA9xQOVjqUgkgjKfwA9nYh28d5zihSOiAjnx1 RliK8vWKB36kFnney728tOjT3B9M5UzYt0+Ha0FI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Xu Rao , Takashi Iwai , Sasha Levin Subject: [PATCH 6.12 0585/1102] ALSA: hda: restore MFG widget enumeration after core split Date: Thu, 17 Sep 2026 16:08:48 +0100 Message-ID: <20260917151554.641217962@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260917151539.408551884@linuxfoundation.org> References: <20260917151539.408551884@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xu Rao [ Upstream commit 32d7226e6105c257ef7b3d0ec819f11a81f53b6d ] Before commit 7639a06c23c7 ("ALSA: hda - Move a part of hda_codec stuff into hdac_device"), widget enumeration selected the function group with codec->afg ? codec->afg : codec->mfg and read subordinate nodes from that group. The core split moved this logic into snd_hdac_refresh_widgets(), but hard-coded codec->afg there. For an MFG-only codec, codec->afg is zero, so the Root Node is queried and codec->start_nid/num_nodes are populated from the function-group range instead of the MFG's subordinate nodes. Restore the pre-split AFG-or-MFG selection. Fixes: 7639a06c23c7 ("ALSA: hda - Move a part of hda_codec stuff into hdac_device") Signed-off-by: Xu Rao Link: https://patch.msgid.link/44809B8FF80DCCA2+20260901034024.2407783-1-raoxu@uniontech.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/hda/hdac_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c index 0f2e768fd678c..c89b994977584 100644 --- a/sound/hda/hdac_device.c +++ b/sound/hda/hdac_device.c @@ -404,6 +404,7 @@ static void setup_fg_nodes(struct hdac_device *codec) */ int snd_hdac_refresh_widgets(struct hdac_device *codec) { + hda_nid_t fg = codec->afg ? codec->afg : codec->mfg; hda_nid_t start_nid; int nums, err = 0; @@ -412,10 +413,10 @@ int snd_hdac_refresh_widgets(struct hdac_device *codec) * widgets array. */ guard(mutex)(&codec->widget_lock); - nums = snd_hdac_get_sub_nodes(codec, codec->afg, &start_nid); + nums = snd_hdac_get_sub_nodes(codec, fg, &start_nid); if (!start_nid || nums <= 0 || nums >= 0xff) { dev_err(&codec->dev, "cannot read sub nodes for FG 0x%02x\n", - codec->afg); + fg); return -EINVAL; } -- 2.53.0