From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796384593; b=y5dh+KBIUY2XR0lh6HlN11Gf/7k8XULGOeIKuKQd7zzh1pG+MuqBK4B3Y2VsSPeJAQT7 xoki6vr5X24hvFLSbFj69Bd91WN16cHgpP+4gPZcaAoALnGJtg9niyK1/GjXVVHsPibmz lVB42Wy2BVeX02iHqoyUELXSiHCMDpaSaGPvJ/X0X5qKFFKGuec/OkTjEElhLYVBEXjIr Y05Pm3atR9ayKfzv8o69y4zyXFkCANZQQil1Bt9LP7fHdnTLhBol1sGuibnszIVcLJBXy 8C1Y9kky5PK5tDMk+n3P6gj0Jptd3fy/meBSl42TzDEaqKTiikvI7oqoPiwClI6oe+A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384593; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=RHMJxPjt1xYPCjYPQM0phRf8R6TZe2Si8eKdVgiKk1U=; b=HUvLhn9gNN02VgTWaQZwfEN97LiFMYvDp80taYFNn8bw7hVDJlZzfVfWWonrfIP9d8u3 bJlKWIXf0BlOeAbZgO3q6zoBdnfN7aKdqE34Zjq/jPwpGgRlrsU8wGb1vdLDmljwmWdD7 +8tNM6AsmtyrmnhOzpOcIaG5f2Cz2G2FK94RMRro2bmKw7L+8F9YFueR668vNTWmFc+eT yqc+nFMWhX7fzWq1gotO2Z9lLsJCNBdfpEI7OEynUSjNGCbbevOc1/57caL9+QCpioyTB 4aQ2hCdYTZj7dwXxfujA0lfNH6/U3y6VO/GlkgYh6u6xnBAs5E2ZvGeG0Yv77tocp5g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=AwY2vE4N; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 063B7606A32D; Fri, 4 Dec 2026 11:43:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=AwY2vE4N Received: by smtp.kernel.org (Postfix) with ESMTPSA id 717D41F000CE; Fri, 4 Dec 2026 11:43:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384592; bh=RHMJxPjt1xYPCjYPQM0phRf8R6TZe2Si8eKdVgiKk1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AwY2vE4N3y52erTQXHudRMHzrry8orDjyE6cHwVEVBl9N3wBEBIEnaT3waXehjbhw FovRhKx/lFoBFXmValmKtVGOXVYtfQk4epM95QCC++oM7z9HrZotN8m+u2r4D2PDqm kRzibpOBjt27VFxJn0G17PRFHpBeksM9IrGUCybw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tyler Baker , Mark Brown , Sasha Levin Subject: [PATCH 6.6 0215/1167] ASoC: soc-core: copy the DAI link names into the card Date: Fri, 4 Dec 2026 18:54:02 +0900 Message-ID: <20261204100707.671663625@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tyler Baker [ Upstream commit 33a130f6ed8c75ed59b12889a417a57fb80d0abf ] snd_soc_of_get_dai_link_codecs() and snd_soc_of_get_dai_link_cpus() keep a DAI name owned by the component, which is freed when the component unbinds, so the card cannot bind again afterwards. Copy the name onto the card device, as simple-card and audio-graph-card do since commit aa173b70d372 ("ASoC: generic: keep fallback dai_name stable across rebind"). Fixes: e894efef9ac7 ("ASoC: core: add support to card rebind") Fixes: 900dedd7e47c ("ASoC: Introduce snd_soc_of_get_dai_link_cpus") Signed-off-by: Tyler Baker Link: https://patch.msgid.link/20261106054333.2748248-2-tyler.baker@oss.qualcomm.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/soc-core.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 9cebe0ff9c07d..7a6e54355de3d 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3552,6 +3552,18 @@ void snd_soc_of_put_dai_link_codecs(struct snd_soc_dai_link *dai_link) } EXPORT_SYMBOL_GPL(snd_soc_of_put_dai_link_codecs); +/* dai_name belongs to the component, which can unbind before the card. */ +static int snd_soc_of_dup_dai_name(struct device *dev, + struct snd_soc_dai_link_component *dlc) +{ + if (!dlc->dai_name) + return 0; + + dlc->dai_name = devm_kstrdup_const(dev, dlc->dai_name, GFP_KERNEL); + + return dlc->dai_name ? 0 : -ENOMEM; +} + /* * snd_soc_of_get_dai_link_codecs - Parse a list of CODECs in the devicetree * @dev: Card device @@ -3581,6 +3593,8 @@ int snd_soc_of_get_dai_link_codecs(struct device *dev, /* Parse the list */ for_each_link_codecs(dai_link, index, component) { ret = snd_soc_of_get_dlc(of_node, NULL, component, index); + if (!ret) + ret = snd_soc_of_dup_dai_name(dev, component); if (ret) goto err; } @@ -3636,6 +3650,8 @@ int snd_soc_of_get_dai_link_cpus(struct device *dev, /* Parse the list */ for_each_link_cpus(dai_link, index, component) { ret = snd_soc_of_get_dlc(of_node, NULL, component, index); + if (!ret) + ret = snd_soc_of_dup_dai_name(dev, component); if (ret) goto err; } -- 2.53.0