From mboxrd@z Thu Jan 1 00:00:00 1970 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 620FD17BED0; Sat, 17 Oct 2026 16:11:38 +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=1792253499; cv=none; b=mdNGgWxapXOcvs4eouQxKch6ssYI0kzjBqPei/++fiFSOIPFWjf4QtxXG4uKIamXtGATXrHt9T6835WIH3ld1PEY685I0/roGZGGg625VZTKQ1HKSoaBLoPog+90KrK3eXoGTjVNEhUzFtWMOjdJFWF3oYPIy+bQ3zwvDlWE1a0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792253499; c=relaxed/simple; bh=VDAG2P0mZn9jSM/Ao7ifNWiy0RFAfkwNv/CKO4flH74=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=U0dkfaE+yAzpxL8YHqUVXHUOXDewnGY+e+mB6cBayVrmNsoQTQlXi37wludvImVyFGJvp48zDlaIQhHDZWozX9bz6xe9wxaGBQH7K1oQO8KDpretGfz91x/aWfTQBpthtuE8p2mReaG+cxHlZTEDsedYyyqLLzgxhZtPfue4B6I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wxWeifV7; 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="wxWeifV7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD15A1F000C4; Sat, 17 Oct 2026 16:11:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792253498; bh=Y+JM38sD3pNFidJxG+azLkDMghibvTMUS6fWZ0COLs4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=wxWeifV7prlDQVqb4JN91Wj4QOngvNiKEXafQOEemh/emzm8G+9CvCvJ2gITOG/LS imaYg8Sx1zRhs6JMuDNg8eYTLRBxzUNS3XmeuTfpPLaPLoiLpc+Ga1C8tls8Dn/gGf Zq+RM+mf4uuRSq+TgZxwF/wz6Y4/uhQR4Y7uDCcI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Jaroslav Kysela , Cezary Rojewski , Mark Brown , Sasha Levin Subject: [PATCH 6.12 138/869] ASoC: Intel: avs: Use topology information for endpoint numbers Date: Sat, 17 Oct 2026 17:49:39 +0200 Message-ID: <20261017160040.582218481@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261017160036.979869304@linuxfoundation.org> References: <20261017160036.979869304@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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Amadeusz Sławiński [ Upstream commit e3dc0351d7a0fdcde18ed1719c9149b1a656e7ec ] Use DAI PCM ID from topology as Front End device endpoint number. This allows devices to be more naturally enumerated starting from 0, like most cards, instead of values like 1 or 2. Signed-off-by: Amadeusz Sławiński Acked-by: Jaroslav Kysela Link: https://patch.msgid.link/20250407124154.1713039-3-amadeuszx.slawinski@linux.intel.com Reviewed-by: Cezary Rojewski Signed-off-by: Mark Brown Keep the compatibility parameter local to PCM registration, defaulting to topology endpoint numbers. The card-name compatibility option and machine-data conversion are not present, so omit those prerequisites and describe the parameter in terms of PCM device numbering. Retain the registration changes needed for the component-name lifetime fix to apply without conflicts. Stable-dep-of: 4dee5c1cc439 ("ASoC: Intel: avs: Do not share the name pointer between components") Signed-off-by: Sasha Levin --- sound/soc/intel/avs/avs.h | 2 +- sound/soc/intel/avs/pcm.c | 13 ++++++++++--- sound/soc/intel/avs/probes.c | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sound/soc/intel/avs/avs.h b/sound/soc/intel/avs/avs.h index eca6ec0428bbb..bd63676aa7aa5 100644 --- a/sound/soc/intel/avs/avs.h +++ b/sound/soc/intel/avs/avs.h @@ -339,7 +339,7 @@ struct avs_soc_component { extern const struct snd_soc_dai_ops avs_dai_fe_ops; int avs_soc_component_register(struct device *dev, const char *name, - const struct snd_soc_component_driver *drv, + struct snd_soc_component_driver *drv, struct snd_soc_dai_driver *cpu_dais, int num_cpu_dais); int avs_dmic_platform_register(struct avs_dev *adev, const char *name); int avs_i2s_platform_register(struct avs_dev *adev, const char *name, unsigned long port_mask, diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c index b63a537c3faeb..8889fa7ddd908 100644 --- a/sound/soc/intel/avs/pcm.c +++ b/sound/soc/intel/avs/pcm.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -21,6 +22,10 @@ #include "topology.h" #include "../../codecs/hda.h" +static bool obsolete_card_names; +module_param_named(obsolete_card_names, obsolete_card_names, bool, 0444); +MODULE_PARM_DESC(obsolete_card_names, "Use obsolete PCM device numbering 0=no, 1=yes"); + struct avs_dma_data { struct avs_tplg_path_template *template; struct avs_path *path; @@ -1274,7 +1279,7 @@ static int avs_component_construct(struct snd_soc_component *component, return 0; } -static const struct snd_soc_component_driver avs_component_driver = { +static struct snd_soc_component_driver avs_component_driver = { .name = "avs-pcm", .probe = avs_component_probe, .remove = avs_component_remove, @@ -1289,7 +1294,7 @@ static const struct snd_soc_component_driver avs_component_driver = { }; int avs_soc_component_register(struct device *dev, const char *name, - const struct snd_soc_component_driver *drv, + struct snd_soc_component_driver *drv, struct snd_soc_dai_driver *cpu_dais, int num_cpu_dais) { struct avs_soc_component *acomp; @@ -1307,6 +1312,8 @@ int avs_soc_component_register(struct device *dev, const char *name, acomp->base.name = name; INIT_LIST_HEAD(&acomp->node); + drv->use_dai_pcm_id = !obsolete_card_names; + return snd_soc_add_component(&acomp->base, cpu_dais, num_cpu_dais); } @@ -1630,7 +1637,7 @@ static int avs_component_hda_open(struct snd_soc_component *component, return 0; } -static const struct snd_soc_component_driver avs_hda_component_driver = { +static struct snd_soc_component_driver avs_hda_component_driver = { .name = "avs-hda-pcm", .probe = avs_component_hda_probe, .remove = avs_component_hda_remove, diff --git a/sound/soc/intel/avs/probes.c b/sound/soc/intel/avs/probes.c index f0b0109563038..a42736b9aa55b 100644 --- a/sound/soc/intel/avs/probes.c +++ b/sound/soc/intel/avs/probes.c @@ -284,7 +284,7 @@ static struct snd_soc_dai_driver probe_cpu_dais[] = { }, }; -static const struct snd_soc_component_driver avs_probe_component_driver = { +static struct snd_soc_component_driver avs_probe_component_driver = { .name = "avs-probe-compr", .compress_ops = &avs_probe_compress_ops, .module_get_upon_open = 1, /* increment refcount when a stream is opened */ -- 2.53.0