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=1796179234; b=I1U+ks49HtPn82u/IXPg5wyEP298aW7mbvv+35OEoJ5QJq0wql6d1xf+zPmxgAqHErGs YlO9YaNq9+H/377xM3u+mZ2jnxo/hZMBFGR9At9myCIvaRyHmwh2PulZCsvJaGwmrJrRN F/xRQiYd5UooyMfNboBU2GeHfxloouQsCesZsQbpNINEWLfH4vXLH8nEvS/2X8/XR+EMW q8odVM+RwspMeEBUFyq6Jp88g1FXNQoPcYFHTm8sfGk+/XC//lZZjgE2VLIVUVGxWEAVH 7SSD05K7f+ZT/G++yK1ABD4nJXQ+TmN6TjHu3YLO7l9BBgNQzbtSh6tVoJAdIpAG5aQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796179234; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=3+joeV9tV4shxWFAWJR5YP7zT8Jy+XEi8XbhojU4EEU=; b=vAgxf/bkqcBzry4vOHCKF2BZfvL6NzVXrL1ZDCY3NpglPT37WH9pWfEEgmz0sQyAea4E OtTO+t0uQL3PO85StZMigU5fhNPQLhqy7yi70EymbmVYWtEO3XYPGhQKV7z4ZZ66lkZxi /30abt5n5ZJRujr2lgbLB+/neya0EuUTmPcFVdP0zcs9y3qBgTmjF/N8S6FdOJ1zwy4F1 vH4hkfP5e+Dr/E4Bnh9XMPOiODhov99emYOeaAjH+pjPtY+kvQsS2LfAbjgOdDvKGIVFi /+MxbCM4MO9kRxJ/FH0j+S3Vc2x0FiRLO3KfdaE95kxBUZceW9TJgFdNp/HwtNzBzig== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=RCz9DLmQ; 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 A43FB606A337 for ; Wed, 2 Dec 2026 02:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=RCz9DLmQ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19B521F0089F; Wed, 2 Dec 2026 02:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796179234; bh=3+joeV9tV4shxWFAWJR5YP7zT8Jy+XEi8XbhojU4EEU=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=RCz9DLmQvyaxF4euV6/QT0kMgkYEZbVluhJtgJXsoVDsiqsQCvuFKUnMfgvIdJqKz Ykut2MxF7gL/GJCjBbsiE38gwD5j29yOuYNGk3s+8IYx+9txB0gzmhkqVvQ7IXFCG5 wDCjDS1HgiiySZxd4FuozSj6Ng2gGfG/zcyXfP6NR5POc6eAFX86KB5gh1CMaRLC83 SelDdi0bELxNDhO7lXGGOPu65Dbz8z98ZqgAM8Z9ChR/E4fyUIc5MfNVKtUu83szWX 6QP3RsBk2vIFknuGi8hoENzMhA1xFk2YloF0WJ6Tp4c6euGVig75ntS9TNmNXygGfX mEvZTgmzLzJSw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 2/3] ASoC: sdw_utils: add SN622x codec_info and DAPM hooks Reply-To: sashiko-reviews@lists.linux.dev To: "Qianghua Wang" Cc: linux-sound@vger.kernel.org In-Reply-To: <20261202022209.77448-3-qianghua.wang@senarytech.com> References: <20261202022209.77448-1-qianghua.wang@senarytech.com> <20261202022209.77448-3-qianghua.wang@senarytech.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 02:40:33 +0000 X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] ASoC: sdw_utils: missing asoc_sdw_senary_amp_exit() on SN622x codec_info_list - [Medium] ASoC: sdw_utils: broken fallback mic_name in asoc_sdw_senary_dmic_rtd_init() -- commit 119d388e168f5de68368b6edbe3c2554b1c58aff Author: Qianghua Wang ASoC: sdw_utils: add SN622x codec_info and DAPM hooks This commit adds codec_info_list entries and speaker DAPM routes for Senary SN6220 and SN6224, and switches Senary DMIC routing to use a dynamic component name_prefix. > diff --git a/sound/soc/sdw_utils/soc_sdw_senary_dmic.c b/sound/soc/sdw_ut= ils/soc_sdw_senary_dmic.c > index 725f4658ec9c7..82e9a8b34ff92 100644 > --- a/sound/soc/sdw_utils/soc_sdw_senary_dmic.c > +++ b/sound/soc/sdw_utils/soc_sdw_senary_dmic.c [ ... ] > @@ -24,21 +19,34 @@ int asoc_sdw_senary_dmic_rtd_init(struct snd_soc_pcm_= runtime *rtd, struct snd_so > struct snd_soc_card *card =3D rtd->card; > struct snd_soc_dapm_context *dapm =3D snd_soc_card_to_dapm(card); > struct snd_soc_component *component; > + struct snd_soc_dapm_route route; > + char *codec_dmic; > char *mic_name; > int ret; > =20 > component =3D dai->component; > =20 > if (component->name_prefix) { > - ret =3D snd_soc_dapm_add_routes(dapm, senary_dmic_map, > - ARRAY_SIZE(senary_dmic_map)); > + codec_dmic =3D devm_kasprintf(card->dev, GFP_KERNEL, "%s DMIC", > + component->name_prefix); > + if (!codec_dmic) > + return -ENOMEM; > + route =3D (struct snd_soc_dapm_route){ codec_dmic, NULL, "Dmic" }; > + ret =3D snd_soc_dapm_add_routes(dapm, &route, 1); > mic_name =3D devm_kstrdup(card->dev, component->name_prefix, GFP_KERNE= L); > } else { > - dev_warn(card->dev, "sn624x dmic: component %s has no name_prefix\n", > + const char *name =3D component->name; > + > + dev_warn(card->dev, "senary dmic: component %s has no name_prefix\n", > component->name); > ret =3D snd_soc_dapm_add_routes(dapm, senary_dmic_map_bare, > ARRAY_SIZE(senary_dmic_map_bare)); > - mic_name =3D devm_kstrdup(card->dev, "sn624x", GFP_KERNEL); > + if (name && name[0]) > + mic_name =3D devm_kstrdup(card->dev, name, GFP_KERNEL); > + else if (dai->name) > + mic_name =3D devm_kstrdup(card->dev, dai->name, GFP_KERNEL); > + else > + mic_name =3D NULL; > } [Severity: Medium] Does this fallback populate card->components with the SoundWire bus device name instead of the codec prefix? Because the SN622x and SN624x codec drivers leave snd_soc_component_driver.name NULL, snd_soc_component_initialize() sets component->name to the SoundWire device name (such as "sdw:0:3:0496:184c:01"). When component->name_prefix is NULL, "name && name[0]" is always true, so card->components receives "mic:sdw:0:3:0496:184c:01-dmic" instead of "mic:sn622x-dmic" or "mic:sn624x-dmic", breaking UCM matching and making the dai->name branch unreachable (and dai->name is "sn622x-sdca-aif2" or "sn624x-sdca-aif3" rather than the codec prefix). > diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/so= c_sdw_utils.c > index b6acf7616d147..b782e36491a30 100644 > --- a/sound/soc/sdw_utils/soc_sdw_utils.c > +++ b/sound/soc/sdw_utils/soc_sdw_utils.c [ ... ] > @@ -1690,16 +1690,179 @@ struct asoc_sdw_codec_info codec_info_list[] =3D= { [ ... ] > + /* SN6220, part_id 0x184c */ > + { > + .vendor_id =3D 0x0496, > + .part_id =3D 0x184c, > + .name_prefix =3D "sn622x", > + .ignore_internal_dmic =3D true, > + .dais =3D { > + { > + .direction =3D {true, false}, > + .dai_name =3D "sn622x-sdca-aif", > + .component_name =3D "sn622x", > + .dai_type =3D SOC_SDW_DAI_TYPE_AMP, > + .dailink =3D {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, > + .init =3D asoc_sdw_senary_amp_init, > + .rtd_init =3D asoc_sdw_senary_sdca_spk_rtd_init, > + .controls =3D generic_spk_controls, > + .num_controls =3D ARRAY_SIZE(generic_spk_controls), > + .widgets =3D generic_spk_widgets, > + .num_widgets =3D ARRAY_SIZE(generic_spk_widgets), > + .quirk =3D SOC_SDW_CODEC_SPKR, > + .quirk_exclude =3D true, > + }, [Severity: Medium] Should all four SN6220 and SN6224 amplifier DAI entries also set .exit =3D asoc_sdw_senary_amp_exit, like the SN624x entries above? When two SN622x amplifier endpoints are present, asoc_sdw_senary_amp_init() takes device references via bus_find_device_by_name() and stores them in ctx->amp_dev1 and ctx->amp_dev2. Without .exit wired up, asoc_sdw_mc_dailink_exit_loop() never calls asoc_sdw_senary_amp_exit() on card removal or probe failure, leaking those device references and any attached software nodes. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202022209.7744= 8-1-qianghua.wang@senarytech.com?part=3D2