From patchwork Thu Oct 24 01:29:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 838787 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 23170D0BB4C for ; Thu, 24 Oct 2024 01:30:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B62E4E9A; Thu, 24 Oct 2024 03:30:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B62E4E9A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1729733416; bh=gugHGwmqPl6ue/nPd/SxITSeG/aRAT68mCYUE8F6o6E=; h=From:To:In-Reply-To:References:Subject:Date:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=iMxPE5RnBxt7wIhwmgo0L5M3oTXHRQy3Qsb8PKxzPB6Qql9ijedd1yYbY/aYCKO6X L97mIbEaJBAdFEkKDxOdRYKbTt3umFMSDuMj2hF18/kGIZ78Fsc9On9wN+2hHm6hbm P78OyL2wSiE4YSOQgLGWS+9CTOYnO+dS1qAp/Ikw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 53B4DF805C6; Thu, 24 Oct 2024 03:29:45 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 567F2F805C3; Thu, 24 Oct 2024 03:29:45 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8B3BEF805C0; Thu, 24 Oct 2024 03:29:34 +0200 (CEST) Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c405::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 39B56F80104 for ; Thu, 24 Oct 2024 03:29:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 39B56F80104 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=mtZ6nFd1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Uu+J2GR0ruPkgWImzm09jXV5NYfmT3f5y1jDtBRQKpBz7Wr5NGFEhmz1PLzx4Q9pkP/Tbfoq1Ny3mYnZLlIOFYm1zfRfoF6WEdEqq2U/bqcRCekFnxn4zMJ+qkj57ilMbGNzAK8N09OOHFGaEb3lSE42JbUNNcTpLS5p8VM86ZUJ/eHvmFi4tSAQD/u1p/lOn2+sq0PsGiBpIQ7WC7Fz0qByI/T9h323gV5sFSHg0T5kLFdN4ewiTVFbvVyatyBqULxPWh+Y3fuTVbinNVuzFtLwgV2aYEht9313Axn5zV+Z88PpWzI9TAbvY5MbEEbWxB+LE5MAVT7iD/bP640t3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZO2patj9D+11jk/AZukivnim9ku9AwlSWy6u+BsM1cA=; b=Ju/PJAA55Odh5c8TydPgpQiaRoRUDS2Jv69VXlqUQgVDeR6jH7Jalm9cNxwE12M6j2WXzfrKZqlWOi021vC0HaoEv/2LmRrUMChqVOKoB+r37ffvDs6hZpIbkx3HOHa92c1MnNv2kLW18wJrwMIrg9jcfcQFNZxj+3ZIN+IHN8z0XSAyMGIAeX5oqxzVkqZuGes0juCcjI4dhPHlN7FkDK2UNOEy6UR2xL2UQVbVK+Czh1ofOpi2zx2PySMIk4vNGURmKA9tLrBvNGIkrqTHKPwuBJv0hXN32vCT9dve6bEWP9WWCWft/+/X7o03Cr1Cgsrfh0BiDmMmgP4qKdoHjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZO2patj9D+11jk/AZukivnim9ku9AwlSWy6u+BsM1cA=; b=mtZ6nFd1YDs/5VKqbeTf4qyuRM8REYwTyDyKcIbmt4iYpgKF1rNspjSiOhlJseTg+smDAKDMgEYceNw9Is+KZqh9nsVJjuNThxRfj9lMN+XBIs4KIfVhe7qFKEGmHVlx4PfXMUW/8LbQfa/AxUQGqe7NGDhSlAqLvEaXlrDgH8U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB12111.jpnprd01.prod.outlook.com (2603:1096:400:43d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Thu, 24 Oct 2024 01:29:13 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.8093.014; Thu, 24 Oct 2024 01:29:13 +0000 Message-ID: <87zfmub85z.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Lad Prabhakar , Liam Girdwood , Mark Brown , Neil Armstrong , Sascha Hauer , Shawn Guo , Shengjiu Wang , Takashi Iwai , Vinod Koul , Xiubo Li , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-sound@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, patches@opensource.cirrus.com In-Reply-To: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> References: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 1/8] ASoC: rename rtd->num to rtd->id User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Date: Thu, 24 Oct 2024 01:29:13 +0000 X-ClientProxiedBy: TYCP286CA0101.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b4::14) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB12111:EE_ X-MS-Office365-Filtering-Correlation-Id: 7ba6578f-d91e-4d49-0190-08dcf3cb4496 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: pjSysd2Bivrz1SFwsZpkWRVIUdBhGXRwPUfgPGWQ1tHaHfSKo0tAqqGHITGp99gPiR6BLxR3cv1IP1xRbLuG6acMd+u3Ti0inGNU9gDgbxGtcVzhqzNrm3yAQiBrc4fiCdUOJgm7PzkAFkXC1wJdgNzL4jVMZSNA4aZ8b5ZVZkujhdcwRN6LofoKVvLia1qHaM2Q9D+Eg5Ydtlwt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bBsJ3nAL0fNY6+AzKTEQ0GN+DKf3LOHTvgkGKjC0SXwxe21WPRLCodiUel4x+q8dPKKpJeahla5f0V0tVBllrImjFPgagyMHTag6c935MeNPWf8v X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(366016)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7EMXdx0DqimrHyZQFeBXBK03qu3FLJ+FONQy2aAi6UXENs8b+CeldLlM9Mdux2Cp9VXSf3gDsf50eOwWyC8FuoKGY20JeF18p20twu4MSoa+XUnqTEwThe2uHLw5rlX9OdS7udoNNesk5o9eAyKzb6qmU4dX9e6CE/JVdu3sV39LP78WNcRxD9MltiDj4pylcEEq/e2j9YmaJSviR8Fc0DIVzvOnMhustnlTLI2Fn1lOV2eEep2j5BcU9wnIlfMNiBWicgD5Y6ViM29TAQpHXUFzoyY5FuS3kdlDNEWbHCps9t5B9tXL3IfcJOQQDmZY2mzEMuugRl14HuQm4HGjgj0+I8Lt2SUXP1I0/1lW/IBSWyDfj1u4vqPYpifLywPiCRioJ+Vg2TS4WwSqSrJ7ELt2RoxdvYoxBevpb2a1QpiOU2wrYk4S7/Eh4L2aslPsjapK7PYulE9jm2Yk74XXZTyZibJvKBRH59zi1zksUg4XgL7YPEWm/x7u/kcOHUDAW/UCrgYHMl/crT2L6kdtdCw9v7YWA9LIiRV44zJWEMG4Evle04Rjzyl4kt596/z1gxgdKBvNfEUrz+RPLQKP9whWg1O24Ctsxsr4nagX3/ika2hFHSLYIL1WxFoFrU2pmNMYJNGR6N3YezmlSq4WTp9Mk54zYJMEp4SVZQpzHdGE7zj5M0uGUcdGFiq8V6oZ0nXFvfqXbOwgEQIlCkTvZ90SRx45O0Im74Fh3xvxT4QYPnVio+bS/qi5aXHz3+ppepwONytlEpgErQaeabRThJigIPwNySSkNXVuEfNC3tvP9CPDR0kzU5TObhqtuud6WqpnDolbc27lKrwquMQ/Zz6r0uTpIkCySYitER+G2xTkzutJ/W8M5IyW4uAJmFMXY+/8+ErtxsQzUH+oPoYCGSz9A0lGhN1fmXc67l/qMcvopPCAPs9ISW5id/wiJsiS7CaoGPjJPQWu+98Ko9ZS10C2FwdGUw5FEX9pYxTs6AOCnS9ACCiXmh5l8JupbNVPVYyiCuEN2vRX9ltje7a480HQJGVJLFPtUY0dUPVz78bPPES9RCHfyL6EM2WEf+rzNgGxrvnEnKW/pqE5NiOicseAGEM+Et8DF1Mku7O5j9mzbj5rLaNQHsK1Eh7YBYeQp78+rFCRdhqbgL6Z7opg6w+JyAqWiTLH4EM7HKrnFq/9QOiJ5VvOJb9vod7ZOJAtJFG5q+h5z1K6QFSufZ1UEevrcNikpIw/YPYd94yfJ1yUcMPE0DTQCmFdstlpz9cTf9vy74sKk2HewhsdLyit1dPWRY0tKMpQ1JHhJ3SHDSZ4GQoMAPvq8d1C8anG9AQcAN6cZCcnhPN1XWHOH1CM5lpCwuOdNOFbP3ennT2d17qGGhQ6EbE4UD07GSY+C86n2jrqIl8L/F6XSDf2Ic1JqF1y2gXNrG+42ISgRFxe0L4jwWOh9SJY/9JS8kLs2POl9Z+Q+M8wdvZ/6KLiKkxQkpw8MqsvmdxMNlp4wQLM+XtTmSeoT6lQAmDwXPQQg1KEPOhctPZ6egeihr3BLrVoN7q99vVD/Pfn5qzEQ2gETjS/o0NKGm7yh4KINVJQAR9SXVsRsDIvgJuKs3NO4a/qieWPvLoyWL4C4S9WpGfPVgM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ba6578f-d91e-4d49-0190-08dcf3cb4496 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 01:29:13.5627 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ydVoeSgrSy8k5ECKj1+oL/AnjvP3m75tnKIrYv6IIuhBN8oD2XPttJ5UFDc0+OQqko/nSWYFs8xr2K6wIMmFyIHxHrcqdzEd4/87GlHBB9iNtgXnzCa+Gphe/cbUbV3V X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB12111 Message-ID-Hash: 4Y4VAU4EIVK3REUJTZI7OJU2CHYIUHJR X-Message-ID-Hash: 4Y4VAU4EIVK3REUJTZI7OJU2CHYIUHJR X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Current rtd has "num". It sounds/looks like size of rtd or something, but it will be mainly used at snd_pcm_new() as "device index". This naming is confusable. Let's rename it to "id" Some drivers are using rtd->num, so let's keep it so far, and remove it if all user was switched. Signed-off-by: Kuninori Morimoto --- include/sound/soc-dai.h | 4 ++-- include/sound/soc.h | 9 +++++---- sound/soc/soc-compress.c | 10 +++++----- sound/soc/soc-core.c | 15 ++++++++------- sound/soc/soc-dai.c | 4 ++-- sound/soc/soc-pcm.c | 16 ++++++++-------- 6 files changed, 30 insertions(+), 28 deletions(-) diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 0d1b215f24f4f..9dbeedf6da13b 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -217,7 +217,7 @@ void snd_soc_dai_shutdown(struct snd_soc_dai *dai, void snd_soc_dai_suspend(struct snd_soc_dai *dai); void snd_soc_dai_resume(struct snd_soc_dai *dai); int snd_soc_dai_compress_new(struct snd_soc_dai *dai, - struct snd_soc_pcm_runtime *rtd, int num); + struct snd_soc_pcm_runtime *rtd, int id); bool snd_soc_dai_stream_valid(const struct snd_soc_dai *dai, int stream); void snd_soc_dai_action(struct snd_soc_dai *dai, int stream, int action); @@ -275,7 +275,7 @@ struct snd_soc_dai_ops { int (*probe)(struct snd_soc_dai *dai); int (*remove)(struct snd_soc_dai *dai); /* compress dai */ - int (*compress_new)(struct snd_soc_pcm_runtime *rtd, int num); + int (*compress_new)(struct snd_soc_pcm_runtime *rtd, int id); /* Optional Callback used at pcm creation*/ int (*pcm_new)(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); diff --git a/include/sound/soc.h b/include/sound/soc.h index 3e72317e2c20f..9acd3fbf7c7e1 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -486,11 +486,11 @@ struct snd_soc_component *snd_soc_lookup_component_nolocked(struct device *dev, struct snd_soc_component *snd_soc_lookup_component(struct device *dev, const char *driver_name); -int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num); +int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int id); #ifdef CONFIG_SND_SOC_COMPRESS -int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num); +int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int id); #else -static inline int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) +static inline int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int id) { return 0; } @@ -1195,7 +1195,8 @@ struct snd_soc_pcm_runtime { struct dentry *debugfs_dpcm_root; #endif - unsigned int num; /* 0-based and monotonic increasing */ + unsigned int num; /* REMOVE ME */ + unsigned int id; /* 0-based and monotonic increasing */ struct list_head list; /* rtd list of the soc card */ /* function mark */ diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index a0c55246f424b..fb664c775dda5 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -537,11 +537,11 @@ static struct snd_compr_ops soc_compr_dyn_ops = { * snd_soc_new_compress - create a new compress. * * @rtd: The runtime for which we will create compress - * @num: the device index number (zero based - shared with normal PCMs) + * @id: the device index number (zero based - shared with normal PCMs) * * Return: 0 for success, else error. */ -int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) +int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int id) { struct snd_soc_component *component; struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); @@ -617,7 +617,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) snprintf(new_name, sizeof(new_name), "(%s)", rtd->dai_link->stream_name); - ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, + ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, id, playback, capture, &be_pcm); if (ret < 0) { dev_err(rtd->card->dev, @@ -638,7 +638,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops)); } else { snprintf(new_name, sizeof(new_name), "%s %s-%d", - rtd->dai_link->stream_name, codec_dai->name, num); + rtd->dai_link->stream_name, codec_dai->name, id); memcpy(compr->ops, &soc_compr_ops, sizeof(soc_compr_ops)); } @@ -652,7 +652,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) break; } - ret = snd_compress_new(rtd->card->snd_card, num, direction, + ret = snd_compress_new(rtd->card->snd_card, id, direction, new_name, compr); if (ret < 0) { component = snd_soc_rtd_to_codec(rtd, 0)->component; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index f04b671ce33ea..3cb7482791669 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -558,7 +558,8 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime( */ rtd->card = card; rtd->dai_link = dai_link; - rtd->num = card->num_rtd++; + rtd->id = card->num_rtd++; + rtd->num = rtd->id; /* REMOVE ME */ rtd->pmdown_time = pmdown_time; /* default power off timeout */ /* see for_each_card_rtds */ @@ -1458,7 +1459,7 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link = rtd->dai_link; struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_component *component; - int ret, num, i; + int ret, id, i; /* do machine specific initialization */ ret = snd_soc_link_init(rtd); @@ -1473,7 +1474,7 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card, /* add DPCM sysfs entries */ soc_dpcm_debugfs_add(rtd); - num = rtd->num; + id = rtd->id; /* * most drivers will register their PCMs using DAI link ordering but @@ -1485,18 +1486,18 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card, continue; if (rtd->dai_link->no_pcm) - num += component->driver->be_pcm_base; + id += component->driver->be_pcm_base; else - num = rtd->dai_link->id; + id = rtd->dai_link->id; } /* create compress_device if possible */ - ret = snd_soc_dai_compress_new(cpu_dai, rtd, num); + ret = snd_soc_dai_compress_new(cpu_dai, rtd, id); if (ret != -ENOTSUPP) goto err; /* create the pcm */ - ret = soc_new_pcm(rtd, num); + ret = soc_new_pcm(rtd, id); if (ret < 0) { dev_err(card->dev, "ASoC: can't create pcm %s :%d\n", dai_link->stream_name, ret); diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c index 4a1c85ad5a8d6..2feb76bf57bb7 100644 --- a/sound/soc/soc-dai.c +++ b/sound/soc/soc-dai.c @@ -457,12 +457,12 @@ void snd_soc_dai_shutdown(struct snd_soc_dai *dai, } int snd_soc_dai_compress_new(struct snd_soc_dai *dai, - struct snd_soc_pcm_runtime *rtd, int num) + struct snd_soc_pcm_runtime *rtd, int id) { int ret = -ENOTSUPP; if (dai->driver->ops && dai->driver->ops->compress_new) - ret = dai->driver->ops->compress_new(rtd, num); + ret = dai->driver->ops->compress_new(rtd, id); return soc_dai_ret(dai, ret); } diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 678400e76e53b..81b63e547a099 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2891,7 +2891,7 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, static int soc_create_pcm(struct snd_pcm **pcm, struct snd_soc_pcm_runtime *rtd, - int playback, int capture, int num) + int playback, int capture, int id) { char new_name[64]; int ret; @@ -2901,13 +2901,13 @@ static int soc_create_pcm(struct snd_pcm **pcm, snprintf(new_name, sizeof(new_name), "codec2codec(%s)", rtd->dai_link->stream_name); - ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, + ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, id, playback, capture, pcm); } else if (rtd->dai_link->no_pcm) { snprintf(new_name, sizeof(new_name), "(%s)", rtd->dai_link->stream_name); - ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, + ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, id, playback, capture, pcm); } else { if (rtd->dai_link->dynamic) @@ -2916,9 +2916,9 @@ static int soc_create_pcm(struct snd_pcm **pcm, else snprintf(new_name, sizeof(new_name), "%s %s-%d", rtd->dai_link->stream_name, - soc_codec_dai_name(rtd), num); + soc_codec_dai_name(rtd), id); - ret = snd_pcm_new(rtd->card->snd_card, new_name, num, playback, + ret = snd_pcm_new(rtd->card->snd_card, new_name, id, playback, capture, pcm); } if (ret < 0) { @@ -2926,13 +2926,13 @@ static int soc_create_pcm(struct snd_pcm **pcm, new_name, rtd->dai_link->name, ret); return ret; } - dev_dbg(rtd->card->dev, "ASoC: registered pcm #%d %s\n",num, new_name); + dev_dbg(rtd->card->dev, "ASoC: registered pcm #%d %s\n", id, new_name); return 0; } /* create a new pcm */ -int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) +int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int id) { struct snd_soc_component *component; struct snd_pcm *pcm; @@ -2943,7 +2943,7 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) if (ret < 0) return ret; - ret = soc_create_pcm(&pcm, rtd, playback, capture, num); + ret = soc_create_pcm(&pcm, rtd, playback, capture, id); if (ret < 0) return ret; From patchwork Thu Oct 24 01:29:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 838128 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0C443D0BB4A for ; Thu, 24 Oct 2024 01:30:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1015DDEC; Thu, 24 Oct 2024 03:29:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1015DDEC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1729733404; bh=L/Ifk+4rDHrAjBuSdnTX+AwcKJay0F9vI64u1oiqIRA=; h=From:To:In-Reply-To:References:Subject:Date:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=G482EwwoYpIlJhQXKC9VPf10stpbng3XjZ3BGQUtlXYAM8U/YbjJRt0Zs1DIEh8uO Pf+bPxXSK72LCKBxIdAwQf68p2h3bRHiDXC0RCrwV+ImZ8XhZ/FIyQkVaE2dQrFgmj JY0gBiDm4Qf9rs4wxAVplG32Ywyzso0qeFPGV0fo= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 09268F805A8; Thu, 24 Oct 2024 03:29:33 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 836F1F8023A; Thu, 24 Oct 2024 03:29:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4A4AFF8023A; Thu, 24 Oct 2024 03:29:28 +0200 (CEST) Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c406::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 399F2F80154 for ; Thu, 24 Oct 2024 03:29:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 399F2F80154 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=fDgi6C30 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rCSHfYF7FwM2hVOaJRyUGa0G6Wy3FEB9grw0JPwZBCuWiSP9EoeTubFe+AWClsEjEm9xw8dVCZddVdKqt72Y05auiafBdIBQHujLnobB0J6VvkFVTweOUPIxRFzA/zxGZvIuwFjdWAXx5iSwtsHFhsvJXo769qiuU565INqlampetQqh3MrZhtatRoFR4UlXTshMCl6ByuZmQ/pVZ0Ir4MgjjmKyS8YK/zKmLp737fYGq/qe76KcKWQcCOhAFhWZM7/+eOcx0+wOxRH/jcp+7/2nIPceJEBxkkTM1w3cNM34/A1TWIhbIm303rStn+90YEzNTgTOSxHLYh4BcKiG4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cxdb/PisWW6W+5EcyBGHBgXtLISL/Q0j3ey79Fhf5fY=; b=f8A1DDzrEODZZNS1h9PIcbEkpnEl8rL1XZOm2uPQdkBw/5fR3nFpdmFv0s36uu5M/8e5ANMQq2iecRyXvQMRmhbLYlEi94+ko71qhX95FkuzeiD5wi13/CTvXrQ+uMrHE+KqVKhGvgEJpKYEPXL/aNutRCmW9IG3ARTRipJb3eeOyXI/GjkR/khN51EnXRUl5FKwacX36jb2TQMYtyPi97T39RzwGoMysJez7aFujDVGekP2Wm+aa2d3DcejuEtY9y00Thx2aoQhp1MPbV/7HQTRwAJXCG3z45RFE1OJr0TLbYoVECZ64A0G+y15B2kRnxiBnXg8iFeU7uxiXt1Ptw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cxdb/PisWW6W+5EcyBGHBgXtLISL/Q0j3ey79Fhf5fY=; b=fDgi6C304v08LXOTDK4TNxvXe7HQWEv1VCdKk1KkUiHky0Ty3JqYB9iKEyW6jf+DkGzOTPe+2PHNPym7erHcbFAp3VdiBVgyvIpt0diK2Emq0BEEMrdN7NtORNUgsRpcPWLs+ri+HFjvHaiprO9wvevvycdIYyndxxX6bJnBdZk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB12111.jpnprd01.prod.outlook.com (2603:1096:400:43d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Thu, 24 Oct 2024 01:29:21 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.8093.014; Thu, 24 Oct 2024 01:29:21 +0000 Message-ID: <87y12eb85r.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Lad Prabhakar , Liam Girdwood , Mark Brown , Neil Armstrong , Sascha Hauer , Shawn Guo , Shengjiu Wang , Takashi Iwai , Vinod Koul , Xiubo Li , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-sound@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, patches@opensource.cirrus.com In-Reply-To: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> References: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 2/8] ASoC: fsl: switch to use rtd->id from rtd->num User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Date: Thu, 24 Oct 2024 01:29:20 +0000 X-ClientProxiedBy: TY2PR0101CA0026.apcprd01.prod.exchangelabs.com (2603:1096:404:8000::12) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB12111:EE_ X-MS-Office365-Filtering-Correlation-Id: c96e5d44-010a-4469-2521-08dcf3cb491a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: d+6HXpEw25TlSD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zEgwm4VpILljqTIgl10d+lZiMYkfZeH7+Rp9WSj2pe9J6ZVDcD9ocgbUVBvErqzVW56/7qIEY9h3JxyXSj4u+HJBUhL+8oGPQOQLcrXvtjjaw9WUGks94fYgWDQ5L4lmygkSSc5fDZA91tp1LrJZsC9Q1UXL9UaDT3Kfgn3avqQLoY55PbUQODjRnBlhHZLx54+a+i6Tuhjk+EuhP4wO1GNEhXE6GC3QeokHRhPatK+JFNdrlV2q8mtHDlR0gfzifhRQ9s99j+JIaDnJn+cI3H3AuAddrxcV+YwwQl6nk4J7bb75jq0WDP/APISC3VgrKgcCKP X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(366016)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ms5a+3uu2t5OFqqE3pvset8b6HEvjDYhpJPWb3MGTtckC/BfAwYU8zWwh9uQ25Kf1sR+OXcBHF9BHd46wZpqwmEOJyopcii8RmMaX1gROA7Rim9mr+lSiYAkzPySDIp0VjpraxjIoXsp9Ha6HVwLnsp0V2HSRfEUVIcLhRzUN+6WYZliYxYi30Esku+LO+v/I6rqwe7H3/bNgWGLHlKHQKPnZoR3weosz18aB4xsKp7OF4P0Ft2iC+2W/N20ZZQ958Z+Q5+BUnnzkdu/DXV1ZcnVa2pBK6dLw2wTlQ3hJlHmtODrCFcnUHG65A2tnB2Gv0zb04r8DKVADQo2L4yDAhCN0qQENmWKeDjX6+Dz+YbRhYhavGZA06A800ttd4PPuYSTBJ2/GhV1Z/uDRRj92yPI84sSMVM4rdGZeE2GwBLWqGjGDwqeahMCbS2X1QSwnPbGO7DbHSHoiiN5iGaw8SX4ydulfeSKCkQ/LHDwGXdH4TfApKfpfb6kqv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rKdFZVXab4qH/v5Umw+RjFl26mrpACX6WuH6IwggRKt4Y= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c96e5d44-010a-4469-2521-08dcf3cb491a X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 01:29:21.1085 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RbyGMHXfNtbnGpOqhj+F1EQQ5sqyUgoOECuxNKoH3AlgOwwFZvHUHYRDOBa6NxY2QqT5R84bYdGhCFheZB8hEzAurpZOg9q+7v4uodsHYKRl1/AUOkDrg03FNuUC3pLq X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB12111 Message-ID-Hash: M7MG3R5RTFCKFAXHREJDPL5SSDP5FZJ4 X-Message-ID-Hash: M7MG3R5RTFCKFAXHREJDPL5SSDP5FZJ4 X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Now rtd->num is renamed to rtd->id. Let's switch. Signed-off-by: Kuninori Morimoto --- sound/soc/fsl/imx-card.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index 0f11f20dc51a4..95a57fda02503 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -275,7 +275,7 @@ static unsigned long akcodec_get_mclk_rate(struct snd_pcm_substream *substream, struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct imx_card_data *data = snd_soc_card_get_drvdata(rtd->card); const struct imx_card_plat_data *plat_data = data->plat_data; - struct dai_link_data *link_data = &data->link_data[rtd->num]; + struct dai_link_data *link_data = &data->link_data[rtd->id]; unsigned int width = slots * slot_width; unsigned int rate = params_rate(params); int i; @@ -313,7 +313,7 @@ static int imx_aif_hw_params(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_card *card = rtd->card; struct imx_card_data *data = snd_soc_card_get_drvdata(card); - struct dai_link_data *link_data = &data->link_data[rtd->num]; + struct dai_link_data *link_data = &data->link_data[rtd->id]; struct imx_card_plat_data *plat_data = data->plat_data; struct device *dev = card->dev; struct snd_soc_dai *codec_dai; @@ -435,7 +435,7 @@ static int imx_aif_startup(struct snd_pcm_substream *substream) struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct imx_card_data *data = snd_soc_card_get_drvdata(card); - struct dai_link_data *link_data = &data->link_data[rtd->num]; + struct dai_link_data *link_data = &data->link_data[rtd->id]; static struct snd_pcm_hw_constraint_list constraint_rates; static struct snd_pcm_hw_constraint_list constraint_channels; int ret = 0; From patchwork Thu Oct 24 01:29:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 838127 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71038D0BB4C for ; Thu, 24 Oct 2024 01:30:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EA5FFE85; Thu, 24 Oct 2024 03:30:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EA5FFE85 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1729733438; bh=4KnzZrrgyi9oDhtflcKQiC9dDTsJ7UWHBHHBswiskyE=; h=From:To:In-Reply-To:References:Subject:Date:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=Mceq5BbNOik+gDxyhlnjoDwW9Zk6uLbZgHKMUAGP0opefqIrNpZT5m/h+RWrftW99 L7kGdlxjvnfrVsvxJB5zPJoI1wQlmGmZMQoAAtPmji9APgaJImFmQe0VZ5v+AH79QN D3twPmJuVKfklZpQ7W75SHumwIuEn950N0g2qQcc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7412BF805F7; Thu, 24 Oct 2024 03:29:53 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E69BDF805FB; Thu, 24 Oct 2024 03:29:51 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8FA0DF805AE; Thu, 24 Oct 2024 03:29:35 +0200 (CEST) Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c406::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 10202F805BA for ; Thu, 24 Oct 2024 03:29:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 10202F805BA Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=Xgbd/m74 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XHlcosEYjDwOh+IAqvQBx0zXZPcXsTWoePSu0mFTKgSbxXGKoKRmnt3yQmmS9SAuPY+8bx2zzKzgGDebpJbhT2BiU+HKZZli/EPAq9HfIKpUVD+Q0S8b6/F83kEM2QK0ZaEWgWZkIW0NO+Dmh7a+lWJbn71DnzLcVqatEN+eF4ACZJDwEn6OwdOpjO6rp+5OBF6IP7gE3hOqT6Y+jmK3y54xa50/NqDhhOZzuyX+oF0kzQ7KbagolG4x2HcQojvHSZxrzMf9Pe+v5pEuLi9ZOlZ00Aj3phpO8AmVTrAHZlDzB5kU/j/i4ESzyLMvhXpd2faYkRKIr0O2C74aFop2vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E6CkNWQso7kXIHad5ftA0Sjh/fPNdbw0gIRq5i0bGwQ=; b=zB2geOy13zVM9d8wqQJH7f8EsEMXr/gAFDJiyOG72Ov8o0VlwrsPkeE+rLDgZ8vZtBr2jFqiwad36e2HRtK1lglYWqtfdeoNckc252W3M833ep+Qxyl4EC6WVvEvrcxS9Dw5Nw37f5MY0aTI5+B344HoW85jZ6wnOxEIDLR0Qha7tt2gJZjYcZBglWOsVASZpe/t2WW0N2pqsR5iTvaQ0fFZtN+RjWkgVxgv5qGC+6VNlSvSSZSf1VfOVwgE9JnnTffNGz5mxS3CTAmicQWwV+sC/7FeBUjzgn8NdDa3fpioF2HzOhX+cWL31/aCDuVERQuf1qh/Xil+5obaSJtyUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E6CkNWQso7kXIHad5ftA0Sjh/fPNdbw0gIRq5i0bGwQ=; b=Xgbd/m74UrCHJhbi+7opUknYtGjoCz/1+Lm+i7iG7716fwu2a2dl7DsC+huFhR7ea2Lp9FKXL48dMfqkBVeP7It8CN0tq8lMjfvdEm/sRTF71ocvJstcQ1vovx4NNU4PujFAq1jQ2dqripQxjdwk9MqwVRfTIJvXdo2Se1XTsUg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB12111.jpnprd01.prod.outlook.com (2603:1096:400:43d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Thu, 24 Oct 2024 01:29:27 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.8093.014; Thu, 24 Oct 2024 01:29:27 +0000 Message-ID: <87wmhyb85l.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Lad Prabhakar , Liam Girdwood , Mark Brown , Neil Armstrong , Sascha Hauer , Shawn Guo , Shengjiu Wang , Takashi Iwai , Vinod Koul , Xiubo Li , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-sound@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, patches@opensource.cirrus.com In-Reply-To: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> References: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 3/8] ASoC: meson: switch to use rtd->id from rtd->num User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Date: Thu, 24 Oct 2024 01:29:27 +0000 X-ClientProxiedBy: TYCPR01CA0028.jpnprd01.prod.outlook.com (2603:1096:405:1::16) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB12111:EE_ X-MS-Office365-Filtering-Correlation-Id: 41ff83b7-a897-448f-21cf-08dcf3cb4cd1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: GZw4wy7oZEAvzyMpWxgyjG5+YdmU61E7LBTrH9Ne83GH1uqoak3bdWBeV4xUfeOQejD1ljOKxlUD98GAR0HxxQ28fRgizOqto55pulo4FafFSru4+WutXBpn02pQCRG1U+pC5WLjgLrQY0KOeD3YKzuJRUWnIzLI1b2cb/4a87AxAPqihTGkparjOBFpJ943lrYfNT1ca3F8/+K60spFWiUBlYWobmACkR5nlFDcc0Tv38umxmB+0zXiLlBZK7WR+nbldbeJz2aYKTqBaj5aEzs2y/wM+WElc5UnkEcVH6g3ag2Ec0SJtXthEghoFZRWZXD1fwI1LrGWd6P7uNDOQGp5dDj8mDO93wdhhYPtUI4NzpN2ewGiXGW8mWgDnwYTCmjliI24+3ITAHJCh9FyxexFwlCLcVSzWJWGYdtlw/8oFS11SAkDR8m2kYq5MGIAXA9zFWYfPonRm1cXBOHqeVBSylYgtnB0OU1VsD7SlRnSiJBvfpR+jM+aY6YfoUSvukDAdyIJ94ozq+beScittN7IFF14nDE5gc1nQu8rsmiDz3Ghx21FD62bamcq3a9hzaTkqYUJiKkfBgPgUiHwLNBXugHJlbyDgBfD9syuGoOcHiviiafoj14BJz8HZm+ffSx8LXPITgx46JLf+a+XqwGhayzSHwayNWYKkppQFTNTFYwNiVzLDqfurPAb0F5+cm0sIkMwTpG6ktaD1KF8usMlE68N8R50ik4Reh+1g9T8tKva7RAp2K9cPEMvXn3WOkE1itu7Fw/nexFnYKFsjwNe4SUgFrwyI67AdO99pWaUf/y3KuviggMph6Qh160SjDZ4N5r/SkEzuDhHI3ttN3IjaTdwggVwuMEU+ohmdOpjpv0HVvk3KlXdUj/SRHimKi8JeH45e0JD8cpUepBGsx2HXIMUwPZV7IKJO6wkLY66AOAOin1O0/vsGZ5qENwAuhRshd8/w62rCXz9XDz2OvmINbL8J/Kjpf5nFiWB+wv+osecsCzIrMxQ9gd+h+VzbBfyt44Nm94bUWxCdHR+yBf1J9NlqjQPDrbDMKaqaNw9wjSk6DjhI4+YPC/YcgX+ztnnw0UF3I5JVVYIBQre0AnvF7sJzevimZtiOI9PDMh2QeIUqtido+i+4V9Abiyz2P7V+BRAutZtbWBXalptH443RnuWp3E0w7xKWNB511IxyqpfUtluy6o6erTlCsMAatglGR3JuI5+ccNt3pablObrhBg6zaEWxRmIfJdcseLqplaYTjDWNqsbpVQc6dX2aLjvhjgl31F/uAC+f7i9e2U0f4QEjlOn3d+4kg2Fz7FNaV1hlONq/Fzt/aaE4DLVtSTSb+Did8zYJxveYTToWsY4E7HwNp/PmKHW8exIL4gFxOGAQCN/Um+XfHafIQtG X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(366016)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1101; X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8EBmqRdVuEBAGWraTsmcf+AasYIwGeCIcqdUIJSifhxgfNC2cfTVqmOTazHyjk9NZWZszaBo8WNdbtC/MphqWhgps/WtT0iKK5A89cdjHtrDzW7UWwdPNvl68EAymGv7IRhbnDz7ms9NxQ9I7Wch85QS2Hq6+xiBUd9vTH+2df4Q5u70pQao50LjISYPWh2YKhtNPBlZfQXStKdt4/JqR4UmItQ74qxXW6WawGAFdnJXuaDK/mG9ZuUyQbskIy/+rmqjlc+Nf1r3/PZvbUrL6h+N0GjNYbMKzg1LkTvwNdTKQws3KCLHFK6zGaf9E+QSTz1mzuF6RX/fSWeVjxt1oJ4ywJEyQKZQIWr/k4iyX7CrEPku2wncmYO3CBZ6EwnLQ7dhm9WaTfCnKX3CM11aWkme5O8LFJ/AZUa5/35IuF3cm0CHo0o/S42vCZaG/oERQHswUU0FQgFFzWOd2kwAm1Yl694G5wV/Ogsac6DfKFm8P5KJJq70/vhqC39vXyWahnONjtSzE3xHSCYEP6JP4gQvYJGljtXk5tmTNy4JmC7I+tfCehjOMKDSZ7jgRCWwmUOPTKo0tPXeCSL11FOXBqr5+Y+ouB0T2K89JoS7trp6rU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 41ff83b7-a897-448f-21cf-08dcf3cb4cd1 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 01:29:27.3238 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: n++L8d7tl/gMzl4KnwpWzCzRLSfVtmq594oJGTY1Dr5T8av/7EyPx7VuawcyoaztSyg9/cjdnr+PTVCwsIhpJg+pvEvhrG2SxiDFi4NpP0AbXjdbnN8LoUhvZGajDaxa X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB12111 Message-ID-Hash: QJUZLMGDJGDL4UEHRQNIRNFT5B2JLTAY X-Message-ID-Hash: QJUZLMGDJGDL4UEHRQNIRNFT5B2JLTAY X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Now rtd->num is renamed to rtd->id. Let's switch. Signed-off-by: Kuninori Morimoto Acked-by: Jerome Brunet --- sound/soc/meson/axg-card.c | 6 +++--- sound/soc/meson/gx-card.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 5ebf287fe7004..a2dfccb7990f3 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -43,7 +43,7 @@ static int axg_card_tdm_be_hw_params(struct snd_pcm_substream *substream, struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card); struct axg_dai_link_tdm_data *be = - (struct axg_dai_link_tdm_data *)priv->link_data[rtd->num]; + (struct axg_dai_link_tdm_data *)priv->link_data[rtd->id]; return meson_card_i2s_set_sysclk(substream, params, be->mclk_fs); } @@ -56,7 +56,7 @@ static int axg_card_tdm_dai_init(struct snd_soc_pcm_runtime *rtd) { struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card); struct axg_dai_link_tdm_data *be = - (struct axg_dai_link_tdm_data *)priv->link_data[rtd->num]; + (struct axg_dai_link_tdm_data *)priv->link_data[rtd->id]; struct snd_soc_dai *codec_dai; int ret, i; @@ -86,7 +86,7 @@ static int axg_card_tdm_dai_lb_init(struct snd_soc_pcm_runtime *rtd) { struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card); struct axg_dai_link_tdm_data *be = - (struct axg_dai_link_tdm_data *)priv->link_data[rtd->num]; + (struct axg_dai_link_tdm_data *)priv->link_data[rtd->id]; int ret; /* The loopback rx_mask is the pad tx_mask */ diff --git a/sound/soc/meson/gx-card.c b/sound/soc/meson/gx-card.c index 455f6bfc9f8fa..b408cc2bbc919 100644 --- a/sound/soc/meson/gx-card.c +++ b/sound/soc/meson/gx-card.c @@ -32,7 +32,7 @@ static int gx_card_i2s_be_hw_params(struct snd_pcm_substream *substream, struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card); struct gx_dai_link_i2s_data *be = - (struct gx_dai_link_i2s_data *)priv->link_data[rtd->num]; + (struct gx_dai_link_i2s_data *)priv->link_data[rtd->id]; return meson_card_i2s_set_sysclk(substream, params, be->mclk_fs); } From patchwork Thu Oct 24 01:29:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 838786 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1EAA3D0BB4D for ; Thu, 24 Oct 2024 01:30:58 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 32C20DE5; Thu, 24 Oct 2024 03:30:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 32C20DE5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1729733456; bh=ZEel4dCfYkKOtOGjtjgJDsj6QXsQA2/uS5QOI/y+vbE=; h=From:To:In-Reply-To:References:Subject:Date:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=M0YeKw/ZEZS95cs4m+HzXZVtSCGawA7+63VoKWztLDHGmIX0edCgVc3e6JIGHuj2O YssGqfZQgM/1nlsFg/ZFcpXvDQAnAPMuzviHQXnhdVGWWcCZYwrgR387WcQMgp54C5 iKShGGmW90AJhE6O2gtuBdRl9ngSnKm/7Sxc4/ng= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CE639F80612; Thu, 24 Oct 2024 03:29:59 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A0A6CF80611; Thu, 24 Oct 2024 03:29:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B427AF805BA; Thu, 24 Oct 2024 03:29:41 +0200 (CEST) Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c405::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E03A7F805AA for ; Thu, 24 Oct 2024 03:29:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E03A7F805AA Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=UiHJxibo ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZYbBA8en3vfKtGu30WZM7u79DOWz09H0LLHKQvvfLGNtBjIcFsIv1YbGnvmJHdmwhAFhGLyAVRvIfROquKoQombvxFuW/NJTVSzk1b1CBTpkRvCL/u4PmqjBYdwBygg4LFSDrRw2JK3h2Qvxh0nbM/KQG7KVYbqFtsDP0Km/s6dc9YqqHP3cAwOLgUNvdDu5wGZcmzdllv19c9y0z19Wxr+ETY3eHcrEvJ7SrRG9HdAaHWE+c6pYGA1FOtYPHoKXFIuNc2wdy9t8Tkw3NirUlqig1jly1fBJzLUNp7lFxn1SSiXAiiQKAevGk36I5/i5VGsxnAagrl3ZDrXhz58Ahw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KZuWl+fMEfbEmrArWO7jccAklK7yIStKk0HLBhTH9d4=; b=HxNfGIDP5tIxBJ2viGLKXTPAPXziHh4zGSNvahIz4Uv36+qZ2V+CQ7lBIC11qbTrGjJRPgpVzy337Z/6N3uiZj0rBNzbc1Uke2zUkre3P23FnHtoJmcfIfFKk/XrcOS9W+F3L/F8zvBZyS3bddVOQGyRCTVx+3ha9WljLBQSIJ8XumrFwqAThnvECrERW+lEFS1vfkGofjzbnD2CqTOJW0bUYVHDQKMfv9NHvWENWvaqpQ7Ur2Wp/BcwBNWwx9gT4w94eDAo/U/iu91P/9LP6YJIEkuE7aUzhoG90W4a+O1w50m8lKmH32dRb1JLuMZ2d8hl+eNLFdcw5885XaIkeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KZuWl+fMEfbEmrArWO7jccAklK7yIStKk0HLBhTH9d4=; b=UiHJxiboA9jPIYlPSlpa0NpIJyh2uW15/nyrjzPy+Gc2/Pdf+6fMNgXnwE9Pt+7yNPbqtliWzN6s8b+RcsuMhIirMTCgBEGcPgwpY7cJpao/FZO0ia1GndhuxhOpjAHGxk7K+djoJ1wDsbrupw0tnJAhg1q3rx3Ipux218HXU3Y= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB12111.jpnprd01.prod.outlook.com (2603:1096:400:43d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Thu, 24 Oct 2024 01:29:34 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.8093.014; Thu, 24 Oct 2024 01:29:34 +0000 Message-ID: <87v7xib85e.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Lad Prabhakar , Liam Girdwood , Mark Brown , Neil Armstrong , Sascha Hauer , Shawn Guo , Shengjiu Wang , Takashi Iwai , Vinod Koul , Xiubo Li , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-sound@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, patches@opensource.cirrus.com In-Reply-To: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> References: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 4/8] ASoC: sh: switch to use rtd->id from rtd->num User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Date: Thu, 24 Oct 2024 01:29:34 +0000 X-ClientProxiedBy: TYCP286CA0188.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:382::17) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB12111:EE_ X-MS-Office365-Filtering-Correlation-Id: ef657516-fc58-4e46-0c00-08dcf3cb510e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: hKl64GLYwVvhY8bRVCObvPtJb0gwCqBDQdFFKAwK+k96VD1hkp95dsIEPVUmisgeTb201YrcFknMX+r2eKdiQO+VYIkp0H40Z/ViJ5I50heCfYyYoUff0pfqVpp7vsw8+h8atanS3Kxak0BB0sLmgVC1WVFf7OeO9LW4CzHf82vTyS691kDZ5QgBoFE6CZQFcHIOc7UMnq5yxnJ/9+bv1tSUhLkQDjSF5VGp6yZaXuAqB3lG9M2i6iuqdAC+LV3iPgSwaYnUOJFupEePa5QF2KRw2IATxTwOzaaonviqKLyt+QkYBmD7T44OC+RHCh4g9dPDOyu5aZoz0KzEDWavAh3gKMt8ZPwOcMCY0lx1pefDrk27718aj4HBjvJxgCmXeT3qqij0BbESfEp63kfa/7PmZOCwG7ulCoSBi0t3bd1w/XE1Ce6r98lgt7A/1fswHqMiPC2yIeaXX5WP0cvICGlUXbf12n7Nhqqrcf6mxQSUblB7wQnPSG3kgC38szQh1PTwmBd3/nta/iTYp80lYxjQ+aDYccyLP4c72C7b8BiQarawQN1ayTw5RQKkhe89WYLEG/WmxAz608mMgS2+GgzVK8S2qOM6SHVWJ93SZ0jqGuuVSTALmdkOCHnNmMdwjqk7lnrM0t7dmzjLJ422PfJRvwIZgJ3jluzX4nPdN9HGs3nJjEF82/n8E0ZS0kZ3Wjhpk+cmNCbCjkqVPnD4w/lCL9bST50xyCE2KX9EEFf3VYyceg4BI5Ys6G5r+8e0cIQXzfJ8e/M8mTOmIP645cXRs4skTzYiyLBd3jorAylnhjQE6MuxcGJF7gRdIGRG5P8sY0TWoRKsI5ghwX6LfzoOGe6tnNl0Gx10KLTbBR57VBhw6u0A7U4ZJ4v2M3LLDZMMk/rGzgvJ+NWCQQUspA5SztmwJeK5rYu7Zpx3xuh+6ht15olk8N3l1SZ+m3WY9vDMIXw5/wsU5DAN0LbSpwnQRQ4rVdO2+e/mC5/8MlcqurE1NIPJ3tdxNnSBYVBR0C0CbyxtQJ2zYqJBmnDRQmgyhRj7nPTYIg2kXY24UkhRxwFBs9xD/kRqRL+KnC5Xg+NgryFQkJgsqau0KgJnPBQZ1Z8cc4zHb8eQBYmHWMVoeTkDUqcimklvssBUyaw9S3HLvN0q/3+qlDwXxanUB+ndn4gjZGGTRwEYvlVLFf3rHbZR3OxaJNTflq6eLTTzxNIlrEZ1TckZNwPj3fdWgP8nP1Q2uI2iWcjxVP6dQpSXNh+PBSEl94MlEF1rTRyIlI7nYbWCehxsTGotgcWALgMPSubOjM36mddY/mdZ3KIBZaqxCE7L9qCxT+kTuw+PjiGCPfzvv9de8TbBAgAR2Naojslf0dJqAHDGjRq8oAjf3aCpbUon+8bWk20dWLtt X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(366016)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GcW+L4+aNWprSDJXTVS0gYTu8Myl5yuOAWid4H6JOR8P+ZQV0cS/AaXxdNJmfx5jjvjRRNCoFD/bfH/+UQ7jTqodUiKQK+/GeG6byfv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Po6ekWFIjl6FbNHBDNKQBAXPlO8VbtfBt1VOzbVF/1doo5OEzZ1YE809WUh/p4ybc9iD6EZX0wKvhr25R0DiralEY8J0CJZhgBPl+tL4ReLb0+a02lxqK24bYI2djkZs7qGBm9m2EMp5WU3hG56qaJgXOeWEOd59W1X/IYvxOzYb6AHHKWAAcCOFCeOtRZmi9i4Jvf3skHStN0iPaqzRnWjA8qo3A0mDLIQIfSxZPutb2G4KsiTMjenW0roX4cvn/9a8mgN2OOI9LzvsVwAiJUoai/TXVug0AvBRQ51yTyqoEGkztJTbIoVQ327Kek7LfT0i8OA9FvPYbktiBhL2dF+vxUeQtGpb8JPLY3iJwKCkj/BMwhlQvRDuWkkTmrlAJJMN3O4ISEtZqn1pbMCnPmJ2HjwX9Nksyg+jMNHOuLfnZdZ9OSM4YTfXr/oXr9nzEw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef657516-fc58-4e46-0c00-08dcf3cb510e X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 01:29:34.4500 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tFcU0mIaNG2NPZSVTCOj2PA5iYpJsANj2IuHzd54W2JRhArcLVvi5cAGemQqOKMBoISvHhdotolpVkJQrO6ogwfaWFj0hY3eSHftmNGWJF5pHnno8GeLodDhXUkFZkfo X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB12111 Message-ID-Hash: BBNF6KKALOSWD6STP6HUJGBNTVGL5RDZ X-Message-ID-Hash: BBNF6KKALOSWD6STP6HUJGBNTVGL5RDZ X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Now rtd->num is renamed to rtd->id. Let's switch. Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index c32e88d6a141e..e2234928c9e88 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1843,7 +1843,7 @@ int rsnd_kctrl_new(struct rsnd_mod *mod, .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = name, .info = rsnd_kctrl_info, - .index = rtd->num, + .index = rtd->id, .get = rsnd_kctrl_get, .put = rsnd_kctrl_put, }; From patchwork Thu Oct 24 01:29:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 838126 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EE307D0BB4A for ; Thu, 24 Oct 2024 01:31:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 40A03E80; Thu, 24 Oct 2024 03:31:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 40A03E80 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1729733470; bh=yZZduivFZBbkiDiSfzFsaCGg79Npry2FzmsMdnRvae8=; h=From:To:In-Reply-To:References:Subject:Date:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=pLA5WlWyiwqIS5VUDJo1rOSvYnVWLpILehLLRk7hWBEBtn2uqIxRZy8Bu8GmYqbl6 EXBY/LP4GIr08oqnysy22JWelQ11yDawDlpDF1JvXsYJ0nnzKI1cI80xnCz/P6fc/s 8EZJ3zrVcRK3nJ+DosI/ecV0MWQumoinIn1Sdfl8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A919BF805FB; Thu, 24 Oct 2024 03:30:13 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6386BF805C1; Thu, 24 Oct 2024 03:30:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 61120F805E1; Thu, 24 Oct 2024 03:29:47 +0200 (CEST) Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c406::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B988AF805D5 for ; Thu, 24 Oct 2024 03:29:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B988AF805D5 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=OtDp1W5I ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i5d7IDAhEvJNC48QqybnH2LRV3Ksz5gQhPpDCSq4ttOGUZUuN664/lBAGusRA3npvKxyNyHQzIh4BtOyqa4NUa+zd4OJnrxwGzX/XeW+pjX+9BISSwrBJCFUSHp9GMTdDFlH2vUCHuKIngEJMrVLivhjW/TFTNAzuNDh0I95bUk/e2A4jQkqMFb7BFBQxYBs0Tnfb/Cn8jr5nkG7/nK6ZhGcBBI4SaiPwqsHxpc+bBnsgRawC+xNyJuR5gcMMdgJjX4V0dpF3QYewOXxQyHgslPTTAkf/EsRWeA8mjpm6p0pEV8ZhtwIirehlLgENZfTSwJhDDaOswCrNAaxw4wUCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+nqcruCmoUEHhDAiQIcvXihICbcnhBd2jxrHF4wLhwo=; b=OWWPvVj1FIIvR45f+i2wnBwSExXKeSWaz/MvPefQCEKShXAen9+/29M2FiA9o+P9EG7DnAg0XXdw/O+2jfgkGEbyLgP7+RTcoX3cChlxeEyBDrgBUWiC1sahFnQm8MsS3kv62ruTUTJZKEjRewu/aoAM0JER1R1PHgofW0fXTU97xlGjcLRsULIBv/vN4joNaPoETuZrxSX4ezHOEQuIFivxwIIrbkIAKhZ8YzX7/sSg+bgv2AUqaua/A8qaPJbf3JU/zTeyz3JxwZIAKGJHji5G3SgQxVAA1t2jt2YQ5QnfpDQ8frfcHikWqL6C6uXdlECZmz3nyUTrMCroQ5fFaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+nqcruCmoUEHhDAiQIcvXihICbcnhBd2jxrHF4wLhwo=; b=OtDp1W5IdD9UOiMo34j9jF1CaKcYSfrrsT+VRpY0aHl8wZIVE91HE24Az+uGRuTofEfs62CKy5DynrWm6eoJIhddomaQgauAPTdspnXc+G6Ej09Ok6uiiFKVwkm6n0EosuOMbc/VGVa76RkYLbX5qsfu19C0j8Weh+y4BLdB1XM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB12111.jpnprd01.prod.outlook.com (2603:1096:400:43d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Thu, 24 Oct 2024 01:29:40 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.8093.014; Thu, 24 Oct 2024 01:29:40 +0000 Message-ID: <87ttd2b858.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Lad Prabhakar , Liam Girdwood , Mark Brown , Neil Armstrong , Sascha Hauer , Shawn Guo , Shengjiu Wang , Takashi Iwai , Vinod Koul , Xiubo Li , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-sound@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, patches@opensource.cirrus.com In-Reply-To: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> References: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 5/8] ASoC: generic: switch to use rtd->id from rtd->num User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Date: Thu, 24 Oct 2024 01:29:39 +0000 X-ClientProxiedBy: TYCP301CA0046.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:384::10) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB12111:EE_ X-MS-Office365-Filtering-Correlation-Id: d532ab22-75e9-4f86-249f-08dcf3cb546e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: xyO4Wbq+W9gw6YlOci9o5XKQ4Ug+qXVmDYaVLp8akknnKSwuOjGhHZy6bcDrFZBizjZbo+tcClXwE2MVR9VMtTfF86vwQNSbh5p0kps83FhXwbUOkBoCLHyqykNVxIBnxXkN0RNuGDd3+Dqd7672+7G3IUPngxTMp8/ATkjx/RmEUwBma2GRBWx9Ga22lbFN6Gcbk69eIzfR/vyle5icUtGHiX8tERaVj6qhBz6n69kyY2olWMykdEcUk4yEmGcLYh/bAuAZHsOP5deiUe0IglkjDiP30+K+4dseTSlwTQE1R+PdOFjvToLtKPXnXqns2QWnrEF/xz6ccxU3MD4daJ0xjjqUeD610BOKc7xfWH2KUSjORso6lYT4/qM3OcMt6ZYxe/n19JzZgmb172fAU3kajWtwSIz0hG2dui5EWM9THgOrztjr9KP2qozcB/xbCseeuH3py5g8NIQKJDyvV0D+W5Ce6EjLTTCiqef9UU8hBP5IMaQ0Kr78mO35I8iS1Bxgxkek7xfxNsoaTz5Ez0NAPk74wdub4+q92mmhi0Fgvvs6RuzTjpxzr8slt7uWFzTs/volCu0vkFblUYTEos5trH+TVJAlRQFnDE3Evfd4RlvW6J/5a+YrKy1yKNQMJyhzgvyX237ShRCtDlXkPS/zOZHkI8umc4UTEt+n9yZ3qfM3CvgGS8fKTJVKxKyeKAB5hWRfiOzJ09DGmHNzfVLlcuQsooRhKF+Srkcte0xW1JyDeYg2OmPoUpNlyv4swHb/QJRSnGYpzX6ID10SkTOhBFshGDTUjRS7APNtzx/mpmOabcGT5Ss7AKE/0Jjvx7TefjGpqGY3EaHFupqmLkuuddWjXXJf4HA/eh6FwmDnj6fsyGh3cnjLzw+6xmAbuonz5ggkBQ8fmcgGt2rNb+0CQQpQhHbTu9+4Y8W2nbUZDqolDoLpyHPpqDZcMGHUsygrHetrWtcHE/PxCmrnEp7U0/vvGperk/E9eDa+a5VCG+FmU4gvB0ieJmhPuuabITErFSeWoy0vIfoXBrqFseLlnp3gc8Dtq3Hmvgu8cCrH1FCq57+jX62aDMFuhlLWuYfZU1eGAsBGXLNG6gE+rkn4AVwTpHFf/L0UA8iNlbclsvGCXCb3EpjPVeS8NISzgHcZ6jjcfEkxye0Ef86ncIb+YyfnDbsx/PWbs3SuIEVHXy1t+i7qNsXivYe7vfVHcxDdZLx5NmT6GFkCFYCKeC8Er6ZyUaPL21XQ24eNxXW3KR0t90T8nlwXUTZX9zPmbw7LHJV5axLjX4YXIjWYGSGz4inlj1VM0/3PmlsWLb8R+rNCgiWrbGjDpgPcEzRytffR7BtKOoAx9/Vzer1tmFdBW1kcsmTmcPqyhc2ZR+kwapLY3GxNUbS47K3o3G0C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(366016)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7PbPeN/uZlrO75dgsHI99V5meA2j6190zmaUVLDuaAkSo0BlBtbQ6ux668MIkcCFV4V49/aGbT+R0e3hUXSIG6AiTB1gZQEUOhoXYcfQxUMYBGzlvqp7myg93cpuMGK5OZG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JLsqk/tRiIo2N16DrVdhgCyZ8jqSEiQQGBhKu5jHckbPYTvLWVFANdoH/f1drWBShGAXav06sONf9TqdvV5aeelAakkSVHoryQxtox6jZuRhCxDVmGFhSe6CVP7+3W67Xuw5qZVxePKQCXXKn/44TC3J7NDU9UqpKcHkmRXp0rxq6mmPDGfmvBOarGiEv2+xGRq42M7GFaXDbzegVi2IQ+bML08YIKY7cMj3sHZWb5BSF/QrGOFAA7Fq3I5Icsie7nI55vnwJ1QsyWsPali05kiq4PMlzBw8fPIcB6F6BatpSF9L/4cBK07VKgdhOR/RLmnIzE0tKBI64xoVh50YmiWEGVYI4HwPi+69zy0Rw8zr7B9jGBLO5ry53Qzv7atHYhWwkRUX9Vz6j9Dp64Y2/J13YR2zPQHipBY0gA= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: d532ab22-75e9-4f86-249f-08dcf3cb546e X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 01:29:40.1142 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2bR12iHXW8uqRckBGR2h9B4QW0Fz0VV7rbHApvIHCK59QTA/ssBp8foqZw5P+oryUh0F7tMTcEDRfufxID05UpcFdAkBuc75xZLQdVJRgMZusFBWxe7coOQvOluQT082 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB12111 Message-ID-Hash: J5LSO3XALKPROSSHSCEWZKJUKWB5HTX5 X-Message-ID-Hash: J5LSO3XALKPROSSHSCEWZKJUKWB5HTX5 X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Now rtd->num is renamed to rtd->id. Let's switch. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/simple-card-utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index fedae7f6f70cc..d47c372228b34 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -296,7 +296,7 @@ int simple_util_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card); - struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num); + struct simple_dai_props *props = simple_priv_to_props(priv, rtd->id); struct simple_util_dai *dai; unsigned int fixed_sysclk = 0; int i1, i2, i; @@ -357,7 +357,7 @@ void simple_util_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card); - struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num); + struct simple_dai_props *props = simple_priv_to_props(priv, rtd->id); struct simple_util_dai *dai; int i; @@ -448,7 +448,7 @@ int simple_util_hw_params(struct snd_pcm_substream *substream, struct simple_util_dai *pdai; struct snd_soc_dai *sdai; struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card); - struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num); + struct simple_dai_props *props = simple_priv_to_props(priv, rtd->id); unsigned int mclk, mclk_fs = 0; int i, ret; @@ -517,7 +517,7 @@ int simple_util_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card); - struct simple_dai_props *dai_props = simple_priv_to_props(priv, rtd->num); + struct simple_dai_props *dai_props = simple_priv_to_props(priv, rtd->id); struct simple_util_data *data = &dai_props->adata; struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); @@ -628,7 +628,7 @@ static int simple_init_for_codec2codec(struct snd_soc_pcm_runtime *rtd, int simple_util_dai_init(struct snd_soc_pcm_runtime *rtd) { struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card); - struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num); + struct simple_dai_props *props = simple_priv_to_props(priv, rtd->id); struct simple_util_dai *dai; int i, ret; From patchwork Thu Oct 24 01:29:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 838785 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E5B2D0BB4A for ; Thu, 24 Oct 2024 01:31:33 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A1B4AF50; Thu, 24 Oct 2024 03:31:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A1B4AF50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1729733491; bh=0EfI8lpJ/d1M7ToPiGlP4XTTVvuqHz8mMijjv717JiU=; h=From:To:In-Reply-To:References:Subject:Date:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=sYJptphaAFd/NT3HKfcFLj+QqRdEsHs1OQmay3Lb1v8WS5hgnn15RKqL4gUcAXbH2 VNt3G8WoqrxEgLrp+If0ZkyDOvRBjhAinWzdQcLFn+SLIf3x8353XSL8PMO1LBdriv zRjVGkTGhy71YAVjLYtPc2i/Yqivkw912UKQEKGs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0B6A5F80649; Thu, 24 Oct 2024 03:30:20 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 55E7AF80649; Thu, 24 Oct 2024 03:30:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DBFB4F8060A; Thu, 24 Oct 2024 03:29:57 +0200 (CEST) Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c406::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5D307F805EF for ; Thu, 24 Oct 2024 03:29:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5D307F805EF Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=aE6gxYyJ ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=B6sneuqSrE+V0dSuSItrWKiGz0FPY+n01bTwQxmm2cRw4gpGWD6mgDpCHxm2t/ZVglVOpVK2NRDZy4lAxbxyHIFpcykP+X9q2l9r8FX+kxTkwQg/096qYk01M8yvru2VzadJVBUL5WoZ76C8LuIVtpiOKM8T8OtX+eSZa1tD3dvMKsR8aaAWzWl5gW1J+x2g9kLCdWakWLJH4iZOo+qj2Hl/Oru+8dhrhGKSGdspc8pRqtbBz2pW6oSotYdAuq9NTVoALUpfDVLsD2vvlcueODyvaCZ6vqmbxj6K1GBNzPbDnAhvf6PX0lGWN7oiDUX6ZEhksTP7wEYanc5BmfpVDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hbrvkCgaVVaTFZlSwfig2zrTR3k5ccQFevSTjedpV6c=; b=vxiq4Lwue6BJetPnnvjpdEmKCFPKghvj1BE50q2MI2vwkgwDcaG2rj+0j9r1IKiDph9AhX0SGgKmHtMhlunPDDxIwhutUXhEl60Ze2LXZ9nHeHLfA2nJDjFkCJzsNzXkrKUpkuGHhjW3gwpsPiq8datxO38fiEt0gvilAdA3IrSrQEwBivqbBit+KrEL7VoKc6T5suTQdhjryG6ORGmKYx71PdD08Zu2gzJUlSUglvRZrHS4lKNNTsQu6dk2o9ph2qT3RG4/2rrPHQZcMGQ+i57bEVP4ZvpAVmbuedYi+Ps6dgD16X2SRs4Fn5jc/mC+/xdH1VW49hlXZXF5SAVNaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hbrvkCgaVVaTFZlSwfig2zrTR3k5ccQFevSTjedpV6c=; b=aE6gxYyJN1fh7TJ+i+J8pbWoruTfYNRLbt920X5JItrwQNVrCX0hn7eMq2h0kHq5F9Emr6k/GqwI5IvAnNPPUjUlrxYSHBkB7ervqzdYKWiz/oCzH0g/pwowNmx4xoaclCVDmQOfQWovwlZc/WV2BMWnInquC3J3lF2buosrX4I= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB12111.jpnprd01.prod.outlook.com (2603:1096:400:43d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Thu, 24 Oct 2024 01:29:46 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.8093.014; Thu, 24 Oct 2024 01:29:46 +0000 Message-ID: <87sesmb852.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Lad Prabhakar , Liam Girdwood , Mark Brown , Neil Armstrong , Sascha Hauer , Shawn Guo , Shengjiu Wang , Takashi Iwai , Vinod Koul , Xiubo Li , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-sound@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, patches@opensource.cirrus.com In-Reply-To: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> References: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 6/8] ASoC: remove rtd->num User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Date: Thu, 24 Oct 2024 01:29:45 +0000 X-ClientProxiedBy: TYCP301CA0031.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:380::8) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB12111:EE_ X-MS-Office365-Filtering-Correlation-Id: c66f9607-00db-4866-3e79-08dcf3cb580f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: T7eV/pYUjFgbBCZ+TFD0P4FJzI4JmVzKzOwysqXU0DlLeuT5zFEtJB7geazezmc24G80Z2B8awHj7KVMkd/3piYpk8ClKf9EKsROfOrpgzD4x8MxCF0pQYWRj4j1G8RrWQjIPE4aF7jn10o/QEl/eN6K7wukp9u/0waIILwoWs+Rd0+NlvKV529C4mScRKyZYB04CrjoOXRMp6wcqydCG0RsWNUlLb4WgyWkRxF7YsUCNB8To1om/WjX1+wyIMjjtl/OuF4RzwNVoipUm34JW5yMo5V8xWDPieAWY+hOaj3XAxo8Xae+pkmfQl7qtkqvK+0qWNHV7hOrfeNyoLtk3TMqU/D4TBXFTpfJNQSexEy3h5ExN7sXKPZV8gedRDpNJaHwMh1CcJLzQ06+mU+XX9639ybjsrO5S/AfiMkH8KCVN5KPzoUU+278DyRxK2bkJDSE/HM54JHas+jPM3vQfyq7OCknSYQ85EQEwhEt3sjEmXTvmctTL2LNtvPTfPPmkZlO1mAQooGZzIj6JhPluf6LNiIN6V7IPD5R0BcUqc1WzHSKjYZcS55Gi6JAUQ9DgYH6nHIzSIvRs2EMiyFD2L09EASGC7sEUvy2hi8EeDidCOzgvggUAenJ3HA44DLpRUaJaYl219JbkKbE3s5S1hS28PRPE6FwYebfLXyVRw2I+wJKWjyJMM7FyI2MC+B3ls72VPP5zyTSCUaK4vUmDxabdE3vgVahC7yi+VoErmbBHTh1ArkF67kOE7Qt5avvm3uhHLL00pBtkjL1QTyVa1+gCuU/CPSq1Ik2ZxYlYMkCjMEYTcPnuE2wwzGAHeCzLeGjNj6ef/I1NvTyHL+op5TL2c+s9htjgH/qGgmSxuABO7SFCxvwxU9jUNSimhD7K/yabw6WiwtdMzoC9WxQmrpVj1wF4ARZgrvg1oV9s7gVu294cJUJFCTP4AhN39UPefyrVeC5HAa6IAL8iVP0k5tsE/gn4Sdsdlj7LJYC0aqigKZOyMLY5vyNW/A+oTSaWh4+dfrk5ZKhlpB7m9kKfapxNYwuCV45wXmJQkbPw6AazFRLhuakTgSnLeHUBYYyK58QNzsEBcvCNBltPadnCGbZm7I8ipvsFaO+mw0oD9dDmMXkV3IyJ60fEyGqHnLndo03gygQHEV7HDS6x801UbhEcociHtMg90Pf5ewSCaN73DSt9axMIATVOmkPcQli5Q/Wa/l0n1mwCvgX5GYAkwIZYJcXSp5vukZxAAsxb+Vg2YexmAxdD/4eRcs4BvpEByC+fZ/4TuCn9IlomvDH1StMLtv2Rih+foLd60n4EbbLBXWFAdevIglfH4fZQbfSxpMoNDEE7skLuggCGiE5aIMtSEhMoRkfwjrvKOKZFsYKRAP46wXluVq6hTvgurSn X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(366016)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HHu6H28XtGocd5cp3iMAioggVghl5voa2HQBFshYyhmczz1kJIGw3XdQY2jqZ4qm5z5NLigkEfkc8YBWSjM+yPb+OqjjCglOriQP9bbfb9O8SJHoL2n4r2wchSW9SeC6sCs4WlXMFHk8jf4a8ur3IdgU11QjaT+NdVs1/ilR4psHQZIl/9rvZdzsrS0n6kmp9bqj2cCRrP+n1AoOO+551tpgeD91M4YjNMPsFxE5v8H0TKsVvV1TCUczTJUFOFfMDXNL9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nNpImTf20PuHHAJVJcAPBtdQw+i8KL+Nx5KkyOoJQPPJaxIx7fcCX9WHGQQN8Ltq0ZOUdCqV5jP+usBFzHxY+bJm8apHBVL/HdaaHU6pqX9OILmJ65u72OL5G7BhAW4NPhpn/+W4BSt6DAQWYgXeoNbBr2sReu4z0WYkrkQ1goG8GoWtv827ZYU1iyEHMq41KwOLUyUVkfKr+EHSLF1jNluxiC0rk7cTrKk36NBNY5D5wAFuSvQwNFc+2Gunro4yOwUrZyPpZGvCzEK9qPLDyDSeic+mMsjch8sLu3A/g= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c66f9607-00db-4866-3e79-08dcf3cb580f X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 01:29:46.2684 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5xXGUzxlLi+GTMZM7LeCXwt72pERjqZNOgayl/h7FH0TBq7Ui1YNnI7CaW04gXUDASj/P+dpSHo+e1yzlM+pzfBz2SJ4Vr4WXJ+DEPEvWLaADmQ5pySaRdjgOe0hz7gS X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB12111 Message-ID-Hash: XHZMIPXY3YCLHYCFNU5HDQQ5J3ZFC4T2 X-Message-ID-Hash: XHZMIPXY3YCLHYCFNU5HDQQ5J3ZFC4T2 X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: No one is using rtd->num. Let's remove it. Signed-off-by: Kuninori Morimoto --- include/sound/soc.h | 1 - sound/soc/soc-core.c | 1 - 2 files changed, 2 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 9acd3fbf7c7e1..828ab19258f0a 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1195,7 +1195,6 @@ struct snd_soc_pcm_runtime { struct dentry *debugfs_dpcm_root; #endif - unsigned int num; /* REMOVE ME */ unsigned int id; /* 0-based and monotonic increasing */ struct list_head list; /* rtd list of the soc card */ diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 3cb7482791669..233c91e60f0cb 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -559,7 +559,6 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime( rtd->card = card; rtd->dai_link = dai_link; rtd->id = card->num_rtd++; - rtd->num = rtd->id; /* REMOVE ME */ rtd->pmdown_time = pmdown_time; /* default power off timeout */ /* see for_each_card_rtds */ From patchwork Thu Oct 24 01:29:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 838125 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BEDDED0BB4C for ; Thu, 24 Oct 2024 01:31:51 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 27D57209; Thu, 24 Oct 2024 03:31:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 27D57209 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1729733510; bh=hWZDDc+K/kdwffOnLdmbNgnm+RizNKlSGc3PBMvyg/g=; h=From:To:In-Reply-To:References:Subject:Date:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=OkiLvnVNrsGRHJ6cfMsKTdkhmISURLzQBGH22TdBuWqR5E6YCkqR8WRHK0m6/KVIA 2tM+bKO7WxlQA3U/7xs6ayf8enQI1FKigRG6dssaQzP58/T1eTX/htjFkrcOeuO6JB ukJLFmV04hm1bd1ChLg5ISIOOcqieUthaOa24rLw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 63025F8065B; Thu, 24 Oct 2024 03:30:23 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 734F7F8067C; Thu, 24 Oct 2024 03:30:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 633A5F805FB; Thu, 24 Oct 2024 03:30:03 +0200 (CEST) Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c405::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 19EE1F805FB for ; Thu, 24 Oct 2024 03:29:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 19EE1F805FB Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=EIuhz51Y ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iERxb42PB0Fuq/g3UsO33Rw5fUrCdLKZ7WQXR2wmeWytsEg04XJQSnIYwB1DE0FA5M/Zpg/AbAqKEqUBfvQcrTg2VALfkQVTX/0SMNkPa+tPsj7QqEofk5mSDUKSvGUQdx3fbqksyp+sjh5NWiycl9m5pUDuSq0cJqCejoiQB1sbn9is+JvQ5fGp3nXiq5EMS76zK5Cm4wKwpWP8YxoFr5v0i6XAyrGl/RHOebLfUHmPQw1iHfkDFAEaqzZUCTZyP2l6tAhImmeDIMYbIx6p/pKKDGLmBmOTCrh+a/3t53uctZDNuScseWVchCz/5efui75jeOjUPOugPZ0ksDsTgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VmZkwuleJoNuag2OU5otDRqER2R1E3uHWvzEwJOZBq0=; b=aXftLuteqB9NYpsuUoRhohshrnYPXgLTZrHvp+zqQA6SP3DVJdfr47/1SCFOEgb/p2I9qT0l73iM9t0BntD6gUueXGT1XROYzJaiY5jqy07/8gvoTE8WGAqPgwm8r1V+qXkX/FVVuRd6sOFKCwBKFa3ZJ7bxXnGo6/NHcceXuiXsz/SsI2spdO77GEOR+qPlAPDQXV6rIGJIVZT8DK85OH7QhUvnjYkMLJuIrgJg1WvMz0qQ6vXy/yzpFQN/xwwXeRc7xnWe/ySdNMihyFmj14lI7W3Uy7UKJF/A/MfJ5i6vrmR3yWimkcn6wyxy883Cz1HVR6Mw1GlxzY+2uXoBkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VmZkwuleJoNuag2OU5otDRqER2R1E3uHWvzEwJOZBq0=; b=EIuhz51YBQTrg3QhRh8HgUFU3ABWQVZ5IrXEZLJ9i/KvzOoQ3YIHrbIMcu8efYUOYOAt4qBDrZHYImxMtKu0RC4c0zKfrcWQICuqKdglbD4mWWH4Jbnto7obi+mnr1TBATjrJc1WkyQ08m8JFkt94VNex53f3zxJLw+80SS+kSg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB12111.jpnprd01.prod.outlook.com (2603:1096:400:43d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Thu, 24 Oct 2024 01:29:52 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.8093.014; Thu, 24 Oct 2024 01:29:52 +0000 Message-ID: <87r086b84w.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Lad Prabhakar , Liam Girdwood , Mark Brown , Neil Armstrong , Sascha Hauer , Shawn Guo , Shengjiu Wang , Takashi Iwai , Vinod Koul , Xiubo Li , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-sound@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, patches@opensource.cirrus.com In-Reply-To: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> References: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 7/8] ASoC: soc-core: do rtd->id trick at snd_soc_add_pcm_runtime() User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Date: Thu, 24 Oct 2024 01:29:52 +0000 X-ClientProxiedBy: TYXPR01CA0052.jpnprd01.prod.outlook.com (2603:1096:403:a::22) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB12111:EE_ X-MS-Office365-Filtering-Correlation-Id: 56c07a78-fed2-4c21-772b-08dcf3cb5bd7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: sWMo1pOc7Uy+Oig1HHplNBTrQ+tqf5H2nyozbM+M/XU9vaEfw2o0ri9tvH29E18hgM5gwMGUbGKfp5Jh0hQbDlgf49Z1ZXFPOzogD9ThTxuCy66Wt4EehdRRcRKQnCSCH0iYefIsLqBqxzDB9iGh+xNn8Qxb4CQMIZ23+QVkcjVx6VxTbMUOc1nA7rVoaIbOBFS8Zb8BxH+bx+trvKoVbB0BoGs30azT1t4idtOxRxeVF7kmnfandVMo49AfvfQvNhuO2zOsbmYaxAbN88rs1PfHKPN1mllsCQfHBw06+Nea6i8Q/p6bxdFXh7lNsbxC+HuBLcRllSmfihPV8rAzaD+QecTtRI2ryVCwviyKjCC8bDyRKJABabNhYFTyaqNAKa377qvl16P2PX+3cx+znNET79YDAN9vzesKzkm8btizxwTi4zeyLuwqqHyYM01wD468XyPnyCntM7Ll4KWcunIpldW2B9OnCC7iv/aNyQh0nXaMrZ6xnnhqifjttISJc6rotTdNFRdOP5ak04A2gFIXeUrvgsYLYV6QMsjYcQpH8YnOUzdBft1SKzXmYL2QQnfS/Lri7G6laRzacrv5DEhkgJICmGoG1K1u0b0NGw+0Xtkp6rlEBpx4gh+T/0sHn8UOzN2qvODM7+/2wY8WysLVO6TtiksZHnsdaAshp9hKOrqgKIzsGrVewLuQO75ay+mB5JZ3wpIAQoTKXYVh9gS6llMVSDMwoCbxhDn9ph/eB83x8xKFb48E5InYbgHpCt3irZDiDPQkW4rx0ESNY9UVOsm7aVbhVZRzb4cy90H8Ku56EPgPLEn9T+X33zAa7uzQxSWCbxcCI44MvVrNB05R+4wvIn5WQKW8JAafThvjJSDtw0lLQaw2XsI74kk19LHfJxij6UXGqZbxE2EolkWAoYRe4/nDs7r6DZHJeZXmT61KtnRy9kxwCT8xFesZJrEQHvWnSb/gsjcrZ6h/Ux3rWh4QIhsJW8V7smBVqUo+LBhjdkRdgmjnNKLS0tr3H7PzjpZ1UkIf8VavaJvScQ6AFczbkc+dNva596UKkfcQKHiTrOxQQTTA2OXSiGcj5aC20u5AZaXgLybDZTGUerPbs22mFHOA6hx/ExURuRzB8lTkYHBqP1X9xP1QT6Qem9kLvqaL9EoRsqcsdJVyjXmjJcG9Q1PyQ9S+g9kmYEtz+d38jEh7B6sgpisxpxzrbkO2BOidFlIJR1yfntDIP7kYBdU4H5Hd2bvZ+4C7OBBp46oyE6QmDoUr3d9W3t5o1ATTXLS1KZFyqdo56G+9rkND1jSvOlBlG2wl+gKyz2I++RabTnagIm+x+Vb5gAmYnFkQabnv1PmDx6yoU42f7k7NwTQ5/PlC4x56usrZWudOvsmqGKuqJ2dyt1uaRTrs X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(366016)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rK41qo+/5J6faqirKyTcAsXSOWpajz62zM2yWdzYhN+m76L6wxGscuhomoqgaEtalpIr2SrYUDmCp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L/hUThqKuiZLYuJRty6+n7s+m4c2ypkTsUttn7wLG3DYOLXdjI9mO/oMzWhzr0A2UZmnL4AaVfoVouT3Q3Pd7xA0xFAaaUylN3Jud7oYSoHHQDr/AQW74jAqG9WlYqa2giNycdiZxX83m+ks31SMfk2SmZRKZka01iBOAk5twgJncyogO9sKR0RI2CIDgXwgeXopUO7FxhAsvmPeJ0SAfkBSOdj/jaaa5+WCLZ0qK0nXCEoAPTA6cq2xkw+XDrjR1b4UkITmcmq7plDzt+MwxvFyC19r5eXWki070PLUvOjMREVFkopfSgmtuZLD8l/OxCZNa07j1Y3zVdGe5U+YNsz9AqWrTyfHH0fNzdF42vU0eOTpS7wyslwaXlsL9a3NAbi4WZVlHXoTqUH+DV66nlFynztfyxwaB+Mn/yHsGI0TI5CLxvgOlPbj/mt+eJq98cBZQTidA+eIm4nlg5yw78MXgdvT8k0ESpTj4WsMI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56c07a78-fed2-4c21-772b-08dcf3cb5bd7 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 01:29:52.5344 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +VZttcix0XA87LAGsDaf5Z8WXZUNuGK0OoIhdIVqbbJs/fPTXV2d4vtuE/RePVyc9IWQOVk9HI1yW2w8loRkfSiI2Yzc3Yk5DEsFCj2LIV+RN6k+bUnBF5iIoV83ZSjh X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB12111 Message-ID-Hash: M4T5FZCF7GNLMKJVVN6ZQ4FWWMQ2XAGD X-Message-ID-Hash: M4T5FZCF7GNLMKJVVN6ZQ4FWWMQ2XAGD X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: qcom/qdsp6 want to use irregular rtd->id because of its topology. Current code is calculating it at soc_init_pcm_runtime() which calls soc_new_pcm(), and it doesn't save it to rtd->id. Let's calculate and save it to rtd at snd_soc_add_pcm_runtime() which create rtd and connect related components. But, this feature should be implemented by using "dai_link" instead of "component". Add FIXME as comment. Signed-off-by: Kuninori Morimoto --- sound/soc/soc-core.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 233c91e60f0cb..4f0bfe73fe15e 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1166,7 +1166,7 @@ static int snd_soc_add_pcm_runtime(struct snd_soc_card *card, struct snd_soc_pcm_runtime *rtd; struct snd_soc_dai_link_component *codec, *platform, *cpu; struct snd_soc_component *component; - int i, ret; + int i, id, ret; lockdep_assert_held(&client_mutex); @@ -1225,6 +1225,28 @@ static int snd_soc_add_pcm_runtime(struct snd_soc_card *card, } } + /* + * Most drivers will register their PCMs using DAI link ordering but + * topology based drivers can use the DAI link id field to set PCM + * device number and then use rtd + a base offset of the BEs. + * + * FIXME + * + * This should be implemented by using "dai_link" feature instead of + * "component" feature. + */ + id = rtd->id; + for_each_rtd_components(rtd, i, component) { + if (!component->driver->use_dai_pcm_id) + continue; + + if (rtd->dai_link->no_pcm) + id += component->driver->be_pcm_base; + else + id = rtd->dai_link->id; + } + rtd->id = id; + return 0; _err_defer: @@ -1457,8 +1479,7 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card, { struct snd_soc_dai_link *dai_link = rtd->dai_link; struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); - struct snd_soc_component *component; - int ret, id, i; + int ret, id; /* do machine specific initialization */ ret = snd_soc_link_init(rtd); @@ -1475,21 +1496,6 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card, id = rtd->id; - /* - * most drivers will register their PCMs using DAI link ordering but - * topology based drivers can use the DAI link id field to set PCM - * device number and then use rtd + a base offset of the BEs. - */ - for_each_rtd_components(rtd, i, component) { - if (!component->driver->use_dai_pcm_id) - continue; - - if (rtd->dai_link->no_pcm) - id += component->driver->be_pcm_base; - else - id = rtd->dai_link->id; - } - /* create compress_device if possible */ ret = snd_soc_dai_compress_new(cpu_dai, rtd, id); if (ret != -ENOTSUPP) From patchwork Thu Oct 24 01:29:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 838784 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A95E1D0BB4A for ; Thu, 24 Oct 2024 01:32:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 65837F54; Thu, 24 Oct 2024 03:31:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 65837F54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1729733524; bh=iLqPNhNv54ZR7u+m94DbveiYQPx/xmpnKsSCxpQ5LqU=; h=From:To:In-Reply-To:References:Subject:Date:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=LIBgksXCYx2f+tmbRrM0ZhkdlFdt0T1NUZAfSlBFlctbPRc8RLTtcYo8HB7hrs3+9 pNOPlooQPVp4V9IenzIQJ0X0sviucCjz5kNG6wMcklyLChhJihtw3xXhkOQwc54iBA hyUBQvb8YqPnRd9/F1cEdCik4E+Pjn7hihAGxW3o= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 468F5F80692; Thu, 24 Oct 2024 03:30:28 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DFCABF805E1; Thu, 24 Oct 2024 03:30:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0576CF8062D; Thu, 24 Oct 2024 03:30:16 +0200 (CEST) Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c406::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 00AD7F80614 for ; Thu, 24 Oct 2024 03:30:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 00AD7F80614 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=HxyFQegY ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=t+6o/ry8XNS0DQ++8LwjSifMGKo8YFfIWPyr5vokpuuVBlvqFEKWNSkRG3esnuiP2Gncwm/ujK6kvGwpcdh61fuWPKw+iSZ1ie5A+fhBaDamBuea8aDpVleb88/2G9ik/mR2r0QsH7HxsI8RRd2CFT5fKIGmTNE3WheOc5REyTg4Y0766oKlZz00ZMaPTcGNqJ6JgPxWWKF5oRTY+UDE6VVhgIrPmmetQHzR7rClqr/gMl/xWLQKkmkiqhr+LnscDHeLNaoC+1uYFQtX8ivoEP6noMmAf9sBYhFADT7AQRq4a+pbpTcz2KzDn1AUWYk5j8vAcKvwOdN82kBl7y24fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DiCPtb68hvMqTY12hBjqsqiOckeFNI1HfeSGkNlX0Yg=; b=OPuIrdKndE5J+Oh4MV6Bsja0iqM7ExYCd8viXI8rjU2YKCL9+A9hLq/Z5pZvz5258DwJn4z862ZrshTVSoAXmLw7zwPGpo84To/EtEFUEa0Xw1a48OOb+pVtjpS9V4Pyf30nycmIa2eGu9smt/jA6zkodigyyXVsP85BQuDcftoUY0oyMroA3jeORjnS0PumIanGmbseFoIk38gljBREPAcS0AxKEkTbepOxizjVpWwsEmGj4rzn4ljvDyDOhFkHwSUs22NHj121IQVRxvFGWHNkaFj/Dsd1kDppDuySwwZgWUCfVI+1UaqpGbVfM05q9AJfFyB9hOiyb9cvoROx+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DiCPtb68hvMqTY12hBjqsqiOckeFNI1HfeSGkNlX0Yg=; b=HxyFQegY+pUPPl7eDobe+zrbbq4HRHQHFXerni5VCyszXREBKb/jIALAvwO11XBh6Fmun5z739ExMdI4OQ+yDAt6lzPH8l7SS3hOpYCe2d5A8mmyyCfJUR1TadULaFKFVaby8W0D9PuJEaelCLtcHh4nYu4wS1sXqjCG8Dlrk6k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB12111.jpnprd01.prod.outlook.com (2603:1096:400:43d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Thu, 24 Oct 2024 01:29:59 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.8093.014; Thu, 24 Oct 2024 01:29:59 +0000 Message-ID: <87plnqb84p.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Lad Prabhakar , Liam Girdwood , Mark Brown , Neil Armstrong , Sascha Hauer , Shawn Guo , Shengjiu Wang , Takashi Iwai , Vinod Koul , Xiubo Li , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-sound@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, patches@opensource.cirrus.com In-Reply-To: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> References: <871q06cmsl.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 8/8] ASoC: cleanup function parameter for rtd and its id User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Date: Thu, 24 Oct 2024 01:29:58 +0000 X-ClientProxiedBy: TYAPR01CA0197.jpnprd01.prod.outlook.com (2603:1096:404:29::17) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB12111:EE_ X-MS-Office365-Filtering-Correlation-Id: 094e79d7-1ba1-43a1-56a7-08dcf3cb5fb2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: vL5je6wGMQj+VR4L2UtHqhZxoP+wg0iE2+B+TzifCBnAenCnEfy+mh2n4Q7zitWc92EitrsHZnGjRqQcKK6q3IHz9aSiRyJpGlv8P94PGX0cPpcDTFnL+7WAeeqR3W5Rbp00V3kAtNzR2juYs7+UCk05Lyi7xUTDDdexPPsej9+1LverxMyA7epHi1rYm3yBINM91jd7gX1lL2r03JUz0fWLRElqwnAMIOAtK4oHHBS/L15SvwuWcUd8ZcZW1w5IHaGCGb6nfTXr/gRkh+fSavKICcEig3uEY132ES03PQYz84Tv/vuBcqk1srrcrewapdVyamwZJAmOYS5JPPGOhRYgEtpFgNgVZQJqBq4rPSrmXx5ex8KPYQj44TRtHSEz8pXfIzhZCWM3L8FLcgtEZ1N5T/VT/TXm+AD+gyR5nTWWOc61yiQHU6c0ghFy3Rp2octcArYc0YAaRK0gvZSysSYErs5qnaIA4+o+SKE3CccZJjn3zVt8NOcd+rxrhh74QNoMAhO6NuLkPN+ovBJ8pdFBWR2UVM2NLtEznD/0q14w6kArnJtHXIqIibDzbPes4vjA0Rfm0naJ3p+SGC9EI3Dm3usu7vMIO+4jWNwMR3u6fJM30ejAL/M8WN2L4F+ZymtiboO42YMfM2U9tpxlQECeQAtSzV4GpZP1bdkuSD0dOi3cMB1WW09fUPwmwrHKNqfKVEV9Ed/t16NcmyQW4goAlVQiSckiF28Eshr/ONMzyTfXEasjVsh/mb6FPwYlnlcc9penJV3qFKf+s84FiSzVBIm2ZpEdHaSedbOETu3HOnrrFlvgzooLOGUYQyHC3U8KKkwQRrD9yZNR7sL0B1UZYEMFcRsvEKH2pLBtOhMRnfG58LFBqejhVf+rprnYhlyPGgcwNd7sPaOIWDmwI7OKSydIZ90ip02zmRs0nrwM66geHBh6D74hv40NYYyDWSwkrONQahilHBBPoiiANd2fWHZZ5NJURuduGibH0TzjS2So1hK9sfFTVx8NOgV6K+hlk7b021k4SJrIjrNV3O+chMmJxFNRdkg7yrxkvfaEo7nkYepr6eKwA8TMUVC909+q/u8lUcn7ZoiUT0hg0Jgzgu4VX4/4ZNGDp3LONW127vf6eYNXuyJBd+h49JxUHY910E+okUjNPqehtyn6OUiB27uACmVf64FHawjGCM7tiHzjnjmWme+F/kFxqTPJl2T8eOE0YXa1gUs6hU9hvtOwnsa866LezQBWFrb6Gyy+87frx+BMZ0oD9lVAmQ11l8sxE2IHcrF1KjNQFSHH7Rkn1JpzkND4fuaJsL1l9SYWV4+tFcsA9FYsEixCTN/+QHli/P9tJYCoKDidn8foxCwEFy8ouqDgSLkPekfAuc/JVtLbMUufw7rU66+GiVdA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(366016)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: D6z40hxnf/qyF5SzeW48jDaWLr0AG4ujHQrW2ifa5TvQDZJx0h0KUmHYaGxgQnDYJKeoWh6Dl19onnljHwrbLFMBilrPidlqMX/bbqJGZiAf9hAu5Nn2XOweNW5O3rIFQ8Qg4w8wyMUgop6HQ35GcjJQnLYbzq8hYkf8rNtAlenCOp8seOG1Rm4gIwaW/MitbTAvMYWA9duzW//VysPW5+PgZ+NI6EvWy1B5DWknvXmmfnayZMWjcFUX5xVvI+q1d2g5A5qpHKjQzvSDaS4g3Xd8p7i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+RCcaxlgK/kA0LUR7b4OUk8Za41AqIc674WO8XdTFwvKzBuowY7pK5FTP0fvKDdKJdWwRa2sAfTvGWviqgciARTRzQ5YstHTAIiGP+iF9QkJAsDPW46KswF/giul3JFUe2636Rq5JjOF/mx0KNJ7ozAce/OkGs9MpJ4CmPLe6e1jUfy4mvdVqxASW0x5s2I4yhLLIdlz7+bmnapUoxi9NtzHYSWaaO9/N57RQjN9rkxHnTdXBhuiTmgIVRFARChOn03sdyA9Y= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 094e79d7-1ba1-43a1-56a7-08dcf3cb5fb2 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 01:29:59.0149 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rxH+s3W3wZTv63S3yiMdnja0Yb2S9k6WQDc4EguYISWGEk/3JbHP3AROiwEWHIFzTyvQNRfva+JJ88yD+nEl+wxFB7K6wT1N8/gKIEy758GjfDb3ri89KWnKNEHPkAWw X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB12111 Message-ID-Hash: GQY5FT7KXKK3S7SEMNQE3OXCARV2PS2C X-Message-ID-Hash: GQY5FT7KXKK3S7SEMNQE3OXCARV2PS2C X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: some functions had parameter like below xxx(..., rtd, ..., id); This "id" is rtd->id. We don't need to have "id" on each functions because we can get it from "rtd". Let's cleanup it. Signed-off-by: Kuninori Morimoto --- include/sound/soc-dai.h | 5 ++--- include/sound/soc.h | 6 +++--- sound/soc/soc-compress.c | 9 ++++----- sound/soc/soc-core.c | 8 +++----- sound/soc/soc-dai.c | 4 ++-- sound/soc/soc-pcm.c | 16 ++++++++-------- 6 files changed, 22 insertions(+), 26 deletions(-) diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 9dbeedf6da13b..b275201b02f60 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -216,8 +216,7 @@ void snd_soc_dai_shutdown(struct snd_soc_dai *dai, struct snd_pcm_substream *substream, int rollback); void snd_soc_dai_suspend(struct snd_soc_dai *dai); void snd_soc_dai_resume(struct snd_soc_dai *dai); -int snd_soc_dai_compress_new(struct snd_soc_dai *dai, - struct snd_soc_pcm_runtime *rtd, int id); +int snd_soc_dai_compress_new(struct snd_soc_dai *dai, struct snd_soc_pcm_runtime *rtd); bool snd_soc_dai_stream_valid(const struct snd_soc_dai *dai, int stream); void snd_soc_dai_action(struct snd_soc_dai *dai, int stream, int action); @@ -275,7 +274,7 @@ struct snd_soc_dai_ops { int (*probe)(struct snd_soc_dai *dai); int (*remove)(struct snd_soc_dai *dai); /* compress dai */ - int (*compress_new)(struct snd_soc_pcm_runtime *rtd, int id); + int (*compress_new)(struct snd_soc_pcm_runtime *rtd); /* Optional Callback used at pcm creation*/ int (*pcm_new)(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); diff --git a/include/sound/soc.h b/include/sound/soc.h index 828ab19258f0a..30a9d1853dc18 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -486,11 +486,11 @@ struct snd_soc_component *snd_soc_lookup_component_nolocked(struct device *dev, struct snd_soc_component *snd_soc_lookup_component(struct device *dev, const char *driver_name); -int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int id); +int soc_new_pcm(struct snd_soc_pcm_runtime *rtd); #ifdef CONFIG_SND_SOC_COMPRESS -int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int id); +int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd); #else -static inline int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int id) +static inline int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd) { return 0; } diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index fb664c775dda5..3c514703fa33d 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -537,11 +537,10 @@ static struct snd_compr_ops soc_compr_dyn_ops = { * snd_soc_new_compress - create a new compress. * * @rtd: The runtime for which we will create compress - * @id: the device index number (zero based - shared with normal PCMs) * * Return: 0 for success, else error. */ -int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int id) +int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_component *component; struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); @@ -617,7 +616,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int id) snprintf(new_name, sizeof(new_name), "(%s)", rtd->dai_link->stream_name); - ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, id, + ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, rtd->id, playback, capture, &be_pcm); if (ret < 0) { dev_err(rtd->card->dev, @@ -638,7 +637,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int id) memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops)); } else { snprintf(new_name, sizeof(new_name), "%s %s-%d", - rtd->dai_link->stream_name, codec_dai->name, id); + rtd->dai_link->stream_name, codec_dai->name, rtd->id); memcpy(compr->ops, &soc_compr_ops, sizeof(soc_compr_ops)); } @@ -652,7 +651,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int id) break; } - ret = snd_compress_new(rtd->card->snd_card, id, direction, + ret = snd_compress_new(rtd->card->snd_card, rtd->id, direction, new_name, compr); if (ret < 0) { component = snd_soc_rtd_to_codec(rtd, 0)->component; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 4f0bfe73fe15e..a1dace4bb6166 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1479,7 +1479,7 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card, { struct snd_soc_dai_link *dai_link = rtd->dai_link; struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); - int ret, id; + int ret; /* do machine specific initialization */ ret = snd_soc_link_init(rtd); @@ -1494,15 +1494,13 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card, /* add DPCM sysfs entries */ soc_dpcm_debugfs_add(rtd); - id = rtd->id; - /* create compress_device if possible */ - ret = snd_soc_dai_compress_new(cpu_dai, rtd, id); + ret = snd_soc_dai_compress_new(cpu_dai, rtd); if (ret != -ENOTSUPP) goto err; /* create the pcm */ - ret = soc_new_pcm(rtd, id); + ret = soc_new_pcm(rtd); if (ret < 0) { dev_err(card->dev, "ASoC: can't create pcm %s :%d\n", dai_link->stream_name, ret); diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c index 2feb76bf57bb7..34ba1a93a4c95 100644 --- a/sound/soc/soc-dai.c +++ b/sound/soc/soc-dai.c @@ -457,12 +457,12 @@ void snd_soc_dai_shutdown(struct snd_soc_dai *dai, } int snd_soc_dai_compress_new(struct snd_soc_dai *dai, - struct snd_soc_pcm_runtime *rtd, int id) + struct snd_soc_pcm_runtime *rtd) { int ret = -ENOTSUPP; if (dai->driver->ops && dai->driver->ops->compress_new) - ret = dai->driver->ops->compress_new(rtd, id); + ret = dai->driver->ops->compress_new(rtd); return soc_dai_ret(dai, ret); } diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 81b63e547a099..fb7f25fd8ec5b 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2891,7 +2891,7 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, static int soc_create_pcm(struct snd_pcm **pcm, struct snd_soc_pcm_runtime *rtd, - int playback, int capture, int id) + int playback, int capture) { char new_name[64]; int ret; @@ -2901,13 +2901,13 @@ static int soc_create_pcm(struct snd_pcm **pcm, snprintf(new_name, sizeof(new_name), "codec2codec(%s)", rtd->dai_link->stream_name); - ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, id, + ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, rtd->id, playback, capture, pcm); } else if (rtd->dai_link->no_pcm) { snprintf(new_name, sizeof(new_name), "(%s)", rtd->dai_link->stream_name); - ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, id, + ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, rtd->id, playback, capture, pcm); } else { if (rtd->dai_link->dynamic) @@ -2916,9 +2916,9 @@ static int soc_create_pcm(struct snd_pcm **pcm, else snprintf(new_name, sizeof(new_name), "%s %s-%d", rtd->dai_link->stream_name, - soc_codec_dai_name(rtd), id); + soc_codec_dai_name(rtd), rtd->id); - ret = snd_pcm_new(rtd->card->snd_card, new_name, id, playback, + ret = snd_pcm_new(rtd->card->snd_card, new_name, rtd->id, playback, capture, pcm); } if (ret < 0) { @@ -2926,13 +2926,13 @@ static int soc_create_pcm(struct snd_pcm **pcm, new_name, rtd->dai_link->name, ret); return ret; } - dev_dbg(rtd->card->dev, "ASoC: registered pcm #%d %s\n", id, new_name); + dev_dbg(rtd->card->dev, "ASoC: registered pcm #%d %s\n", rtd->id, new_name); return 0; } /* create a new pcm */ -int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int id) +int soc_new_pcm(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_component *component; struct snd_pcm *pcm; @@ -2943,7 +2943,7 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int id) if (ret < 0) return ret; - ret = soc_create_pcm(&pcm, rtd, playback, capture, id); + ret = soc_create_pcm(&pcm, rtd, playback, capture); if (ret < 0) return ret;