From patchwork Mon Mar 11 11:13:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13588593 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2047.outbound.protection.outlook.com [40.107.6.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE2733B2A4; Mon, 11 Mar 2024 11:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155667; cv=fail; b=RRL+vyaCd9/doN3PWKDfgZFSPMEgM/23iWyNkDC3GIGhuL6/anAbw0T48O7oiGBlwHbxgziyqxFZGs1m1iLI2117Cmiu8nVpwdlZ6G/tmvjdreXd1Kw2FMkrzclP/1H2yNoKzHkVDO3izFcnVpoaYanhEwKi6fKoSq8A4nMOaNw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155667; c=relaxed/simple; bh=EM8XPWbfV0XD9xkdDXT+z0zD2ZyvcHsveuuMSyM7+B8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=OWZn/Ey269detL4DsROuc5U1su7wq/ng/Ls2noigIdQ5U4mjmgIBwg9sPXf4vbxs9EzmHclQIpm4NspEE+/cSgACi+bG5fXoblSoZs2cBSyWsGlOghny2RFgrPoR+mT4hb9Rei5aYHDBMVv5r7DmpnwcbZlYEUdpXKmQLWZEXQI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=N4nxRk0w; arc=fail smtp.client-ip=40.107.6.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="N4nxRk0w" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aGTFWJ/gt29sqYi1zrJJp05c7wnWHgxA/l0HOnsII09+Xl8yusr4cEZ1/2aKcDa96BIcIebQrLeLhwaa4lFSL0UTvJbEWIcledUglXCLu5qCqDaf5Bwvnsnrl72u1nSjZgQHYTg74pusKyXCJcxtVjKE8GzwHQDVACSmXUsvLEp1XAGMf+bNPLIW9FT+CSp+C7OW9kO3cDVzhLNiP7Q/zQ57M457Ceo+XgBMLYUMhNlyw65rRWay9rN6bee2wL+TYzol/hy1aMuHWOVnLAIwfRLIKPBjs+akqMWWXZOYgdX1X2DOd5C5ycsH95oLe18OGLvCyku2raR1zu1tBKsZgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ZuGnluvR2OpU8T+Etj8q5BWSUnnutzKhdVoDcL7VOP0=; b=ICbC18GnA9ojmXdcNqC1ShItYwKsmKHMWMLcL0Y7LbeODywqvaIbQUbYDMhc3nYimpKwT/cs9u5xST95z/4Cppd+6odUL1T8QoOI4UMsGQe7sgxCtDbF+07OCvJWEG7FpvcrBw2tx/UD4D/f4CgaFG4vJUvWcvKUi13yH51E/yIE18zL9Ymq0oFo3SgcJVkpDFdVcE5oLL7SZf1zvNLQ5q+hWK0GGverRF7I/d/YDij5SsRPyB3V2z6KqfgfUyhdX9zMci7R800fopYzP8BRsKVr/m7GS71T5O6rcmxWXsSPhkBMlM900kdaVtSQ62pB0uS6qFnOTyce8uVkyN9f8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZuGnluvR2OpU8T+Etj8q5BWSUnnutzKhdVoDcL7VOP0=; b=N4nxRk0wvL8ilJ9iFqfsMGDsrhLmJVQm4cHkYyBKEPwpY731QDptOtZ8e8+ZQhqgC9kpsemy0BNhs9cOGiTy4HvewMWHUQcox6eS4Gbf/ob74Xx4EmqhPcq4XbQQKo1wvQdgy38KZ1mHUkGtry/Xws51JPVTZfBOJTD2oNYClMM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) by DU2PR04MB9145.eurprd04.prod.outlook.com (2603:10a6:10:2f4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Mon, 11 Mar 2024 11:14:23 +0000 Received: from DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::4bee:acb0:401a:3a01]) by DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::4bee:acb0:401a:3a01%7]) with mapi id 15.20.7362.035; Mon, 11 Mar 2024 11:14:23 +0000 From: Chancel Liu To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, linux-imx@nxp.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Chancel Liu Subject: [PATCH v3 1/5] ASoC: fsl: imx-pcm-rpmsg: Register component with rpmsg channel name Date: Mon, 11 Mar 2024 20:13:45 +0900 Message-ID: <20240311111349.723256-2-chancel.liu@nxp.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240311111349.723256-1-chancel.liu@nxp.com> References: <20240311111349.723256-1-chancel.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0032.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::23) To DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9498:EE_|DU2PR04MB9145:EE_ X-MS-Office365-Filtering-Correlation-Id: 8f8fa551-6709-447b-9390-08dc41bc67a5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o/tLuZHYXuG8C9MXK5G59wPbgZKin8Z0ZcQkyaMBhtA3Wnwa2kUqkuv7pNCq/vFVTShUbsV5R6MrF3dsql9OTxpSWUKqlEnWQYwGAGkg1CGpzuITR2RB0Z1zeXFtefUgH6q4z7nHcvotVsP3C5faxn1g7WrXFPJH6LOwa7a4EFOI/C/07325l/6oR0s5qq4mVLBPK2tnWOwV1Vwh/ioOx40UXVMuiZtPTIxlDE7bKt5BF7wz7fkTctO/H2TP31vIJHu/qf0hqkWuaH1T35AlKp2KA9nH9e9zdG4r+ZG3cYbogq/QYlCw/k7NLEUftz7DeqDM9yXkZQfXVk5lVgclZsXiMN9dq784CMmUzVlyoLCnG2LaTiEoYcVa31WQyT6/HW2SY/Y1VbCtzK/3j6AhGu9/Hd7UuJ2PaXOwU9HzKHu1Gif91vu2UWlK/w6c3QH8U+5jz0W242JVee9/91u6jwb33MppsqUnJDrSUY7m8w4pdUbU8nelZBFQmdQ1PcVlev9iIJ8x/Cd85X5mCnkeTvenBotFGuJg8eKd2ebesit1hmvy12Z8lP3+S31vGXUNgJyrwMSoafbgnPk7AfmkL7yW65JeZOlozu3RuVeteMqh0yXsxhxYrNVr87ecVyORHbScfCQSlfUMyqzwidagXoUYsJvvEClkUl4qfyHd6PyACSu0QDSFwb3CR2nfVerF4/gA+6fFLOwqaX4u9+NpWyp/fUXvhSZCpI5T0kRxXkE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9498.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(376005)(1800799015)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hjc12WX3V7nnHxYtY0v0iuygbKjqO2i5zuzAEpIz7qn+/Ls38m1XpNNPzbMnNgACHdbgUbMvfdcy/cD2dR6RoH1a6ZUplJMPzErjZlY3MUob9lZkmtHKKULSw0h/usnDBjRaLRd/zZTokkmUHToiFTDqNljfOYBy4H04lx2jtMcNAS79yMVuomcuuh1T7oQfjuij4Q9OR2DGJCfjW4SSlHK+o+5v9g2AcJ71dVjXKv9u3m+p2pz5fDUy/FgU9xG2c8YFiuf+6qCBnEwsD/oq7KWWNJ6pAPHvW4bkc/6N3xxr13xaAjhNrkZOFMsXhVYmflYJE50jhmv+vrcDa/ghDu84LVA+PDd4X7ZbYrzyabio1DVZDF0Sw2hTv/UV1Fehb5mvrQ9I++gxsZ5SzpQADHZ6WOvyAKE7cbv7GuFEIQkbC71hUqw46+HUfo55qcd5p9vf8f2QFWYlYIt2DgdMr8WUTraZ+gcb/y+w7J6HPSBgtZtOwfzSNf2wp9Sjzk7VdPgNpnO+TH9q0uqUHUd+aeZi2zi5Tc7PnWBeu6mJLsKASIjKw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-447b-9390-08dc41bc67a5 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9498.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2024 11:14:23.0308 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LWBCPrjjSWFYeFb/dQG/7LNYIR+U3CWErzypn0GE4hbOZlvhICnQ/TmEO9iKxnvZ3sdarvF5ufBlQ0o2Y821pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9145 Machine driver uses rpmsg channel name to link this platform component. However if the component is re-registerd card will not find this new created component in snd_soc_try_rebind_card(). Explicitly register this component with rpmsg channel name so that card can always find this component. Signed-off-by: Chancel Liu --- sound/soc/fsl/imx-pcm-rpmsg.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c index fb9244c1e9c5..b84d1dfddba2 100644 --- a/sound/soc/fsl/imx-pcm-rpmsg.c +++ b/sound/soc/fsl/imx-pcm-rpmsg.c @@ -732,9 +732,6 @@ static int imx_rpmsg_pcm_probe(struct platform_device *pdev) goto fail; } - /* platform component name is used by machine driver to link with */ - component->name = info->rpdev->id.name; - #ifdef CONFIG_DEBUG_FS component->debugfs_prefix = "rpmsg"; #endif @@ -822,9 +819,17 @@ static const struct dev_pm_ops imx_rpmsg_pcm_pm_ops = { imx_rpmsg_pcm_resume) }; +static const struct platform_device_id imx_rpmsg_pcm_id_table[] = { + { .name = "rpmsg-audio-channel" }, + { .name = "rpmsg-micfil-channel" }, + { }, +}; +MODULE_DEVICE_TABLE(platform, imx_rpmsg_pcm_id_table); + static struct platform_driver imx_pcm_rpmsg_driver = { .probe = imx_rpmsg_pcm_probe, .remove_new = imx_rpmsg_pcm_remove, + .id_table = imx_rpmsg_pcm_id_table, .driver = { .name = IMX_PCM_DRV_NAME, .pm = &imx_rpmsg_pcm_pm_ops, From patchwork Mon Mar 11 11:13:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13588594 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2052.outbound.protection.outlook.com [40.107.14.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA25D3C467; Mon, 11 Mar 2024 11:14:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.14.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155673; cv=fail; b=QEDAIoMFEXVfg2bIN3FHZBEQsw3adbU7RqbbLB8uumWQgACYPxJKuc4toi2LcA0JEbMNwndVthdNgN7R7iH8eJUGrTpEuA/4oLqymGhpphbxHoHnWB3unaKCpoS21q1p9EIuHM6XExcRoFsInTKdiokZ1C/2IrxoWD7C57GB3Fw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155673; c=relaxed/simple; bh=HBmrhhEuWxy3hoO5iNeDkh8W1qQNc1bOWF6AbhCMw/M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=d8cqGF+12Y7AtPHpIJHFu21jiv+Dl3r5iUqAztwUxiHoAYdoZo7l4gue3AhO4dspejRPpKwCqSFJ2ub25tUd/WCWeP4S9fSxJXAHT7Nae1RdKa0gcBWUVM6iaZyvpjRBCgY1/UlkFxNavkix+Hyi3VPxVg+4vGHWSUaCNd16uKU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=EVCuDCVk; arc=fail smtp.client-ip=40.107.14.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="EVCuDCVk" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fMdEP0eMkUcU11PDBdAw4rbf247ZZywF/OsJsF+sK7EC7mG4Mk05QnMWHtEUDETG1rXXj9z+WHug8GszHFSyhg9HuifyY1cleomf6vI9VJadPqkUeon8/NT+xzD1WTlpE9KuYCl29Y3I3Tpxh7+cdFwyrdaonm8LxGK1Uw1IOZPTrLjvI2H/WDNWrzzrQQPGX30AjEM2fUYyYsCS6PDm0JIL82f/I/nznNMUdi1zHS/jEqrKgi/c0hCJDvQOIRwoQuAxjRLqNqDB7v9X+Eynqt731WqzJHX5jYRWa7YjOx1IF0+d3AyLNiX4dkEKy3uVNNQ4WefX4xMM/azOrDVZjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=usFJflqaAIQAVMktPObw+rK+eyJhCtZONibE7XKKYLg=; b=h2+rlVEGd2WP2rin3of4DofefILKICr27XGKPmPta5q9ECTmNdIJPOYznQ8EYJZ9qhicpv9bC57lebSKjEFB9MD7f/V+K8mDH4br+ScQPqA3fCxgkhKnvPCgu0zZpqd0rJOnbth/aftpvKotPRYO/WyWGAouacjpGxEPx/LHbArB4LODw2hXYofr0XLzGfREiXaNYQYmDY5unCu6qYZt7bCGKk7B9yziJ1buCH1lAgeRP7xwh4pKjbNqGZtxAAt+PaWMqaSj/StA6uuXKdVxtYIYGiXI7OlFK1aL/u5zBLyUAO2gxaQETaN6Yv1+7lykkg2zChLk3KAKyqokVgJTGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=usFJflqaAIQAVMktPObw+rK+eyJhCtZONibE7XKKYLg=; b=EVCuDCVkVl2z2NpRUN5jhckIDBw7HugWuo3/EC0zXo877UDhGAAY6Kp/Zzr3vFiXFHIvaK0s0AQ8KYv1N7/M8Aglw6h3RHkr5fUgMAExE6Lxn9NTmCXxRZKA4H1/fdVxZrDzAvmegXCBo/i2Vt5e+NU5Oixb0yOlF7MYmORsHGI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) by DU2PR04MB9145.eurprd04.prod.outlook.com (2603:10a6:10:2f4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Mon, 11 Mar 2024 11:14:28 +0000 Received: from DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::4bee:acb0:401a:3a01]) by DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::4bee:acb0:401a:3a01%7]) with mapi id 15.20.7362.035; Mon, 11 Mar 2024 11:14:28 +0000 From: Chancel Liu To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, linux-imx@nxp.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Chancel Liu Subject: [PATCH v3 2/5] ASoC: fsl: imx-audio-rpmsg: Register device with rpmsg channel name Date: Mon, 11 Mar 2024 20:13:46 +0900 Message-ID: <20240311111349.723256-3-chancel.liu@nxp.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240311111349.723256-1-chancel.liu@nxp.com> References: <20240311111349.723256-1-chancel.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0032.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::23) To DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9498:EE_|DU2PR04MB9145:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e6a5f85-312d-4608-7aeb-08dc41bc6b0d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z4YKP//FkGWJWjXedlif15mYH5DI9SOZi4o62qPaCuRvfyTzgNJo/KKUB72fkTxyDcF6/IRQYhbLEZxt7rbtAvoTOPsIrcfZ573zfvrqAADJvUEZ6dg26I5JFAbx1BSdxR7D/Vz5Vei3w9m1WbKavBb9VXS5cEy3SQCoLUZeYpxxZO2fdmzb+URdSUr880VouEMzpbDXY/043HlDBweW7lNSj3lFF3PmoLJ7+0oZFnj4FKacW9nkWyNnijvjJp5wx0e+jDzrbPoFsdunwxNX7bCPjmvyq7W+w//nI/e18jS8PgG0dAeOlBaymiy81NLom1zlsBWiMxZY5XdpoCAcZ56w0/4W6NQvA10vRPf7yUAhevY0RWVydivXq/WptRzvoCDGXxesBITeJvYW4+5yDqTZGK0v7H/NIfWQvy9tCDgfD0Qynn9Ui123kO1LurL/LqsLOH4zjVSZfsUkNOoyBhAEeQeKh4jLwH7LsxMEzbvwS5RtuPUG4GRVa4ss/rFD4xCmliP1rp39Lku/9/7aA7xLXlwvKyoZlyTFLi2p8zR2xNN9sB6X++qEb7vbcvhOFoNFFLM9F/7KsSm+TrjqzP+QwM5xhJ7nuLdkwbqk2AvEEUSgnm7tjVjJpovNURYoEif4xvvKLebpuLvq3aez/+cSwk/n1JGNjkxCy7THKl0pPh/bDWnVcZmJv6t+KczyqW9uIMFaWDKmEtq25JwW8ptYhMSznSXtwZz2rVSO8uU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9498.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(376005)(1800799015)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bfNzYetF4HRvJi3PD1cNSNd1V41TcG2Co8pqBeCdhItP5WL0/AN7rDR1Uf4YCeP6lPbExuhB+z/7Qvq3GOBgs8bZtIuVMPUKw0oPZnCamY7XD4DIl+aqLAJfU7U9pPFcri+R1a1Fn9EfuR5219KEeC9vOnoaw1EIxXB/b9vwB4JAoG1iyOQh87AL/GbIRTXGgwjUBz0uudiBDYeTEcxcKX8gSxUVTEKFeSWA1cEwNwQJ6JDcH5wsVQ7hEifDeuM1VFYMfgSSa7S3tRtgtMWaPuPV9puiXvJvkOUfZjUi3g9df25OyOc7dfKZJXdfJJQaqaoW2DPGwkM/ODqkM1TmdDHtxbpXgwfaKpy0ZLVhvKY0f42h9pt2O1oXqIUMjmqNsD6mG/hMNp52cRbwyS78KSIWedRQJ3qBbyzJ3RqWa4tbQ20tJ8LA2kBlcH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+4HYyodL63ts16TtH9Ag3ssjs+zDAzoTVPaCtWU6S3ZdqjUwdwG5gv08mrTy+bRBkDYID6P0LRVHxoZ/XCVLRG3m X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e6a5f85-312d-4608-7aeb-08dc41bc6b0d X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9498.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2024 11:14:28.8908 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zkv8/kGI35tjvf7e2fd1gUl4RdGlFQy6+un4sTrSVk7wH7K48dxlPQZ0dMKtC/ZLdDMQkkbkfqLwkPi2U9e58w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9145 This rpmsg driver registers device for ASoC platform driver. To align with platform driver use rpmsg channel name to create device. Signed-off-by: Chancel Liu --- sound/soc/fsl/imx-audio-rpmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/imx-audio-rpmsg.c b/sound/soc/fsl/imx-audio-rpmsg.c index 289e47c03d40..40820d5ad92d 100644 --- a/sound/soc/fsl/imx-audio-rpmsg.c +++ b/sound/soc/fsl/imx-audio-rpmsg.c @@ -87,8 +87,8 @@ static int imx_audio_rpmsg_probe(struct rpmsg_device *rpdev) /* Register platform driver for rpmsg routine */ data->rpmsg_pdev = platform_device_register_data(&rpdev->dev, - IMX_PCM_DRV_NAME, - PLATFORM_DEVID_AUTO, + rpdev->id.name, + PLATFORM_DEVID_NONE, NULL, 0); if (IS_ERR(data->rpmsg_pdev)) { dev_err(&rpdev->dev, "failed to register rpmsg platform.\n"); From patchwork Mon Mar 11 11:13:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13588595 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2040.outbound.protection.outlook.com [40.107.14.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 418C43D546; Mon, 11 Mar 2024 11:14:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.14.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155679; cv=fail; b=XQyRgDYpjk77/ZVRgvIs/1FJ8qipsGHDMthFG28nmshfO1GlHNgegjNaGPH8BwsVsNSRkFuBRMhCmBGYA6Sd4KKvdLxGf1ovdOki3bfIg50qKBKq6XgWsIC2Dm4ynTQuIzXVRfYQbuJ8ohPwBeQm5UZyJsdWt7olrlOs1ZJAKv0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155679; c=relaxed/simple; bh=RsDkI5GlRealG3XfhGBR0WsvMeEDEmZK3qXsIOZoKio=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=BqikaHoVcNrUa9Zs7hMraTBjlTL/yOHGIeRiXSwK0J8+OIu3L9oAX11fEzYGNVPcnqjhBnQk0sL4WF4VjylqLtKHnyKqh09AJ1/ICnws3V5yZUTbhIUx1S5n8FDo0dPSdgZBfT79fe0CV7pWpnvcsgNeNXbGa6geEP6Vk7bSiQg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=rcVgD0KX; arc=fail smtp.client-ip=40.107.14.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="rcVgD0KX" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kVXRzCZwyaIa7ewGzC7C8EmVT8hjJP3pcht3+DYj5CuiARyfGgF6nzirZNSqi95jeZyVXDPlMPfY8Iq0B1uagmnB+4c7AfTtft6ijc9/lHvNVQ0F42DNHKIrYBVyHsSVah0Qk2stjY738GNrASPYJsFY1VC87hSdtJ00V7y/xuKwbvpoypNnwh1YSREEv589BC/sMp2ZMhSm9sQrX0Ex8mAHxsKO2S2S3uMDPOqX+V1N2Me85quSzEi4fPycRiWJNxzEfFwHfo0w28QdVWXLVefnakkG27ywliw78Htji4wsMipMqR9tyv6WC+HFy2ray0c6f1/lB3Q4Oyk5qgJFyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Oq+9ih4N4PlGzWqjRA4TbHrwiNaic4itHjhTLfn3qt4=; b=C27Hgc9e7gTVOMobA8+fEh4086hxgxitPwXsxBFblf2U8576JYJkCyfLPxWQhNjaPeQ+UHExQ2UvTTYavfxQJYd6Z0/wk7JdD63UcYSz5dc2KFEo1/aOhoNBRuks1EB0CU1zzblLKKBoGx7ebJnE8ujWsH8i+Vis1J8ZnoPYQaAfDhsB52oTJs3CRZnrQX8aFmXZ9CZTRReJsDvdswxgDgRv/hOPhX6Y4bRKaTSisbE6JZvZOoIVZnIfTjuACUA3vXHkHnQb7nHqFqbklLeuAnCYmIXdQA+TbnKP+PN5qUvuM/efQHjij+olQFpIlr1bDj//6yju0vSXMIT2/5pYpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Oq+9ih4N4PlGzWqjRA4TbHrwiNaic4itHjhTLfn3qt4=; b=rcVgD0KXFho/KClJeGK8zXXPeH2zTJI8tiYSN1kyqS9ZibYbgMvSRIIpN07PJCLG0cTOIaN3BNd1pxpnApyY+sc7BebhaomuUjRtRH5KPxigLww6TEbrHF60lptj7a0N3Ib/wILSRdZIv5H7JUUUrxIK7MfHkcVTGt7hmMeme9w= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) by DU2PR04MB9145.eurprd04.prod.outlook.com (2603:10a6:10:2f4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Mon, 11 Mar 2024 11:14:34 +0000 Received: from DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::4bee:acb0:401a:3a01]) by DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::4bee:acb0:401a:3a01%7]) with mapi id 15.20.7362.035; Mon, 11 Mar 2024 11:14:34 +0000 From: Chancel Liu To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, linux-imx@nxp.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Chancel Liu Subject: [PATCH v3 3/5] ASoC: fsl: Let imx-audio-rpmsg register platform device for card Date: Mon, 11 Mar 2024 20:13:47 +0900 Message-ID: <20240311111349.723256-4-chancel.liu@nxp.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240311111349.723256-1-chancel.liu@nxp.com> References: <20240311111349.723256-1-chancel.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0032.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::23) To DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9498:EE_|DU2PR04MB9145:EE_ X-MS-Office365-Filtering-Correlation-Id: 818634b5-35f6-4a48-ef09-08dc41bc6e5e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rP51D5sTwYvm7ujbSRSklNgMcpULRAlHHwhaboxLzwcfkEOzayEpQ6puoH3VRln1l0g8uVcwlJ3iOUuqRNn8Ru5zr8Cnh+rug5BqEZy3OV4nL/+XmdLXy6zdhS4hfJkhC3OkU7uhFemLphQYNv6xcffyRQ5LGOrAaX46FgCmPgZUCnOizJnZN4Sxwnm6a7X2Tnza0XeSPA9UVsjIzQPov3OhrihQz5ClGCoNMI86UlZkfEbJZssAsPAFH5bfJozU7JjxsqP2X7HE5UoIyjmZijBOl7pDHr5rYHFLDnW1UxOF1fe6Rr4dXvocqRJNvvF8XeZQ0E4scDWAk+jFJa9Ag5Rm2xb2VPb4dOTuZw3OOJSwcE5iox9WoZ7amuejxAT8+RMPB+kk10nhqg43g5ocGtnTB2mc+u39YpmqlmAFWOo+1JBaj5lDcPimv4nro33/1JbM7CzZ4VFO0kC64UkHsvwyNp391sA4d6dkll2nxXezB9N/3IXrhpM/hDX5YyJeXwtDre7B/DMEviCKdbfeRul82WeWKuTHCQabtSGiSbO7Sx4u0dAJ3QCUavmKvmmbwysWNpl/Dajl5IpqTjfWvSVBOvYrQnAdR94ApomoZFjYRmCv1Ley4D4yG/MbtyL7pPLQS9F51jZK7JuzJFyuQ24cQvDYAoFiPdAWjiUkPx3FqXALZjNDcm1t4iBpTG6ekoQ72VT1kXt4HXO1IvDJy5jVDXvDxZ7H5Rp6phzs930= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9498.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(376005)(1800799015)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jHbFeeABRlAKx2xtl6hZ4KxrD8eqUlaD8uW/Due+6GIx9QbDWi/XdRx37pkwvz4T7r9Yni5TboDMXneFYTtsmlP5EuSfBhFG103e2lAnSjNYdIQX4yvkLx9lFMcQNEGICdmJx9k3h04s/JC7ogTbHBmO7a5/IyfyUZr5C8lRjeOdmRPWGlAA/1uBbAZmGqDgp/9DBjOXfiKVzDF6IXNH96q7CO+vmwqkCtrT6LRMjoa7lAaCvDY6cggHa/f7lgQkGUchD0LNtjnCPswVlOysRvaOa4BcvDak5j9r/rPMAYzGCuafbV0VQrUeiFcmsotH6o738nf4oxKcM65YwWnqHbgy1DrZeIMGzuVw7fsFfXvlNJr0BfwvfzHSaD7RJSW1KX4XpF3cOal62Tn+AY+0OHvb42RU7p9MfzdphA8oG2hnssuODAme8NWtwFthbaz90dlBxqA3Do9l71JHqu1PHmAqaFxCneZit8q75aMTKw0b5xDuMm75rerqrveRxVMoizfs8m+F1+a8x8N2yKPz2aqNZxa9T9nDR5GjJqf/ooiFD46KJ6T4INoyDbxXWYkVjTCZsg6KOxxia9PbRhXIJgqj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c41bc6e5e X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9498.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2024 11:14:34.2881 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8NYbpR1uwtobhKYLxgST7xU5tJm1QcIniMBW0dMbiXOLtSHkpoMvsiEUBMHjm3zBIsL0qygPzklqDLl+JL/hvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9145 Let imx-audio-rpmsg register platform device for card. So that card register and unregister can be controlled by rpmsg driver's register and unregister. Signed-off-by: Chancel Liu --- sound/soc/fsl/fsl_rpmsg.c | 11 ----------- sound/soc/fsl/imx-audio-rpmsg.c | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/sound/soc/fsl/fsl_rpmsg.c b/sound/soc/fsl/fsl_rpmsg.c index 00852f174a69..53bd517e59d6 100644 --- a/sound/soc/fsl/fsl_rpmsg.c +++ b/sound/soc/fsl/fsl_rpmsg.c @@ -240,17 +240,6 @@ static int fsl_rpmsg_probe(struct platform_device *pdev) if (ret) goto err_pm_disable; - rpmsg->card_pdev = platform_device_register_data(&pdev->dev, - "imx-audio-rpmsg", - PLATFORM_DEVID_AUTO, - NULL, - 0); - if (IS_ERR(rpmsg->card_pdev)) { - dev_err(&pdev->dev, "failed to register rpmsg card\n"); - ret = PTR_ERR(rpmsg->card_pdev); - goto err_pm_disable; - } - return 0; err_pm_disable: diff --git a/sound/soc/fsl/imx-audio-rpmsg.c b/sound/soc/fsl/imx-audio-rpmsg.c index 40820d5ad92d..38aafb8954c7 100644 --- a/sound/soc/fsl/imx-audio-rpmsg.c +++ b/sound/soc/fsl/imx-audio-rpmsg.c @@ -12,6 +12,7 @@ */ struct imx_audio_rpmsg { struct platform_device *rpmsg_pdev; + struct platform_device *card_pdev; }; static int imx_audio_rpmsg_cb(struct rpmsg_device *rpdev, void *data, int len, @@ -95,6 +96,16 @@ static int imx_audio_rpmsg_probe(struct rpmsg_device *rpdev) ret = PTR_ERR(data->rpmsg_pdev); } + data->card_pdev = platform_device_register_data(&rpdev->dev, + "imx-audio-rpmsg", + PLATFORM_DEVID_AUTO, + rpdev->id.name, + strlen(rpdev->id.name) + 1); + if (IS_ERR(data->card_pdev)) { + dev_err(&rpdev->dev, "failed to register rpmsg card.\n"); + ret = PTR_ERR(data->card_pdev); + } + return ret; } @@ -105,6 +116,9 @@ static void imx_audio_rpmsg_remove(struct rpmsg_device *rpdev) if (data->rpmsg_pdev) platform_device_unregister(data->rpmsg_pdev); + if (data->card_pdev) + platform_device_unregister(data->card_pdev); + dev_info(&rpdev->dev, "audio rpmsg driver is removed\n"); } @@ -113,6 +127,7 @@ static struct rpmsg_device_id imx_audio_rpmsg_id_table[] = { { .name = "rpmsg-micfil-channel" }, { }, }; +MODULE_DEVICE_TABLE(rpmsg, imx_audio_rpmsg_id_table); static struct rpmsg_driver imx_audio_rpmsg_driver = { .drv.name = "imx_audio_rpmsg", @@ -126,5 +141,5 @@ module_rpmsg_driver(imx_audio_rpmsg_driver); MODULE_DESCRIPTION("Freescale SoC Audio RPMSG interface"); MODULE_AUTHOR("Shengjiu Wang "); -MODULE_ALIAS("platform:imx_audio_rpmsg"); +MODULE_ALIAS("rpmsg:imx_audio_rpmsg"); MODULE_LICENSE("GPL v2"); From patchwork Mon Mar 11 11:13:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13588596 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2070.outbound.protection.outlook.com [40.107.14.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C668E3EA62; Mon, 11 Mar 2024 11:14:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.14.70 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155684; cv=fail; b=jwkGYaWRN50iOwGgnFMVG2n/JJA5xnNY1B61Eu5SwjMEwVcEdIpOcqVEQnxrbheVX2lbjqKO5mk5Ai613MrhNpBega6XdZMaDxqqcXbQVGCQ+bgVr2ZiPn6QFet2GaBSAldxts1G4tMIPd4d3h1QL6huk50k+juTb+0oQIuKWMM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155684; c=relaxed/simple; bh=DT0s6IY0MM4BRe22QryOTNrqx6N71DIITT+VNP2vQgo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=UjZfiFHBqglreruCV1TTt7Q+poPnc2GX/Gp3A0Pen2esfxY2m7Lz4lWzTaaxu2EMuC9Pe9VuDH5TsqhgiQfRFJqfilWqjVcQHmlWLEXAXTqkHn6FOX6fG2ecX3MZOWIYkfnxUAnAzWJnYFE0Z68TuUxjc+neuJV45cZ26kWZcR8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=tAHqJkQx; arc=fail smtp.client-ip=40.107.14.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="tAHqJkQx" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cPzET3DBqD5sQtKdECsm6QBYG+GAwpw56ZtGzm+X2aVZEJCWGy8YF9spEDgu1djp3tkJbBC172RLYI9Swbnd3bV6tsLd4vNKbsYHrjwTKIJDv3CFBEMi1RFQFfXLHz2aGbSE+SLM52ovqjUCpDL3vsjYTN1qTxSf96Dva15laN2GX2I3Baz+R4OoSiPDJXwqi8HmRWFLupo3HVoErT+ppOYCxmTVR8i3/SQ/R5smte3vIu7qA8LC8HQkASRLFrkBGY1f9mWW59lSFgVEpR96eUHcQ6jIpl/uWFwxvz8/aYY1KHw4+n8gN339jeh3uFVrqCJ01qIu1zIOHSU9+Eprzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Ti+VBv044mAHayjE+En1j+sknmsBI96or1om/+ztZD4=; b=Pv6NofW3yVcOj77rwbOCYrhDFX3q2s3eep4HVzX6nNjG/K3lgIBgZ+w/M1oMYzUBds+PgRcKiT3oj7YNFssMMi1kGvULkz4Mj1gRtARKT/ZKF1EE7dUvs8kuRsmyqsMq+672WN4FcF0mhzuhxz4RJmUqRph3C2LQMwH79O6KIgYxchCYvGXeOykYzFqBwUg5xf0Y1wL5pZC+cNS+OFTHoPHKNhvgxqJggTzTs4Ww1EBIdv/gge7Ka77mOyMZ7YOvYesQbPx5U/SIiUFTrk1cB+OgRx5iIY8BEhZN9nbNqjYsPckbSOVhfIxE1eJPZ2O0MBjP0xQsc+OJbUxmEwXFrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ti+VBv044mAHayjE+En1j+sknmsBI96or1om/+ztZD4=; b=tAHqJkQxWMUKs0l2WdGA1iIXbP8jbyMqGRk9lwDpZi7XxMK5LrCiLYt5kl1E5tnZy97M3XABXqS6/oa25oU50ylqfvRbNdL4wQHxLkWmR04iiRC/ihjXzuY3i7x6mll7zSKDBn19z/oXQylphe1HAy40MTFVd7JgWftD8x/3vms= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) by DU2PR04MB9145.eurprd04.prod.outlook.com (2603:10a6:10:2f4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Mon, 11 Mar 2024 11:14:39 +0000 Received: from DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::4bee:acb0:401a:3a01]) by DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::4bee:acb0:401a:3a01%7]) with mapi id 15.20.7362.035; Mon, 11 Mar 2024 11:14:39 +0000 From: Chancel Liu To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, linux-imx@nxp.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Chancel Liu Subject: [PATCH v3 4/5] ASoC: fsl: fsl_rpmsg: Register CPU DAI with name of rpmsg channel Date: Mon, 11 Mar 2024 20:13:48 +0900 Message-ID: <20240311111349.723256-5-chancel.liu@nxp.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240311111349.723256-1-chancel.liu@nxp.com> References: <20240311111349.723256-1-chancel.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0032.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::23) To DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9498:EE_|DU2PR04MB9145:EE_ X-MS-Office365-Filtering-Correlation-Id: 86a0d48e-40ae-45aa-bd3c-08dc41bc7177 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fv7kDjMv0wIvnCOkKrzrqtLIgl1XwZj3RgZYwrmntB/bmGBU8MDoSxpQ/zSDKec2zP0QiVr01srCAp+7Vn3gUoXb8QvGIxMu7jcHPHkhpdjA3ejPQxY2f5Rt9FYol7mn6ue2/HVdscYvaih2ljQ1kBcKj/TQ+JPUM3xM0wy0PHlX0J22L9vg9myPlxj0yC12NxzowBrW0o+szxoOHr+KbOiuWPxP00Gg5vJSIhG2p7fFVg9y7w0U1dmdb7e4a+5pNW+Na3KsZ/nV+0yuPzNF4n7pKI4mUradZ3/PyZaYoWbKRXjSwjSjjLnLs1UVPZn2PprM1fjL8otSaL+Np9N7WUGq5StnfFgUk8m8w/QMha9uxvQYUUZZqlOxMqU5IuU4nwkBg/BKyXO+tYyTund3TRsiT6pWAuSINUhiJq8WPVcn92mmA7yi3dbLYnnqAC8cBWa+LDiGBtEzJH2Sofg+SHu62FZO/bRbFMq2GnOCRHJWf6vTdL5fs0bwpt9PjTpyf8UNextaheB/Xg638yFeLKKjjHlfOpbcxMPw5IxCR6N8epfKdz6lQ7zU4rF6D/0XHa6E98yPpdyTrPK98e9tpyGBlxBhgKzU74u1SG8S6TXCFy4m/DhYnIiTBoPhKE6loq0fkT6QLIum7K0/r81v7dvmc0JrvCS/W30t6PZK+3KEBdFh0xqpq3QUaQp2z0Dzucy8ZpG+YSkyFXu85IULgRuKN6OAFsBicV43BaescSM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9498.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(376005)(1800799015)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0/MzwoJyVVds3Gppc/mUhHBxN3BthvxUgSoWFueGG7DVr7yN25I/LuNWdPfp4JGhfY4lGmk+OpXqtfg5D9ha3rulmFlXTHjza7IbFF2NZDIjqHxx2WI05eEDAzn6jqEWoXUPd7AQ1pdOF2wen897zyfr73tUlR0QPGBJm2Nqe/TjwAvN4EDOoXTOF4L6anYjyJg/yz+TJkQc7j78JcMg17wJ6qDdumHb7CBINiJL4T5VTW/zmeGw/7KGOnh2WccX60m9WLDnscCsVyVJDSJV1IYypQP9CrYg02ALswpJDS/59frNPDFuD7rOAQ/TYpJptjs8gmpNGAOukl90AxELyI94mFy9GVR60Gjx16D61PiYxQzmmweQ6IvzQMxsUu2tSqRw+apumvf28s9TPtVWfQSA5N+l+jwPE5AI+7mKeajMYMkO7jVGd3ZCCnpgfDh0l0b4C8ADctTcuxn2m+rnKwQBZacW4gpSmn/iH88Zclz+5YqrPttm8qzo4LDb3ZZXXTPbZJWlALsSk85bd+CtDr9rJ+n8V5xQcdJlkcfkAAl9I3/0pmcP7EKuc1m5B9R4oN8C9Is7DqBECz8WI0qb7OoodClGrSyFRE6DIyOHKbaHf6yzw1U92WCusFHhsndP0p++bO1awbaMfFvoTfI1iB8LishvGEenSSeRMmIgHsZ7OELq+5XF2iBkEdr4a84rL1LFaCLX7tadifJ8Xax4gaReTiYfKAKMM/tNNn8R/NHw2Y0V8/dXrbeIOpE6RTGUWSgfSoXJIc4+ZEtHhFKqpSVzuehBPMf4mEr2EW3zLFThabK4ruiqClo0ba0a9NNu8VG3o04lhggkcRVIx/aim1TqzeCjM5NsLN4bVhbcc30VsZ3XsO1XCkFidHJRRyugBemMNpEajo9epqnBvsHb54ogVSwJCNy9WkHCslk9LeO/A1g0XUMQySM+YCSbCNnV3RN1YnVYmsF8vk823wb6ECbbj1h26PrXhh8hKaB5GcJLCplYb2zVnlbcJFn+OoruMO9PJbpw65pgPk4HRLTOQNmfgSef+lE5eem3Qb//So7YQLNvY7qfHEyaRCaFgVygzSkQyNE8ysJwhqEcmJpFS+6b+FXuNtGQDgw/pAjTwIpU6WsCx54rR8qEuEvCvY4RlRWr0t2Q5vzbDif9XbX31jeBxT+yqHGDAeqbcwFzSnWcrXxPyjsoTm6gD7x90SLdtZlbWwoqeftMHDCVYuL7aNjYeY/zFr/gWRrmXc83GSk9cNTE9llkw42f8tdsefLxxLkdph6MrcBennwy/w3GyOrS4U50kGVYyDAOV73ZN4jR0/SlzRurdZPe3LjFPFoorJAbd2+oqEZ2mHyrSjmQeBPrJBNYRGtd/A/JCC3Ex/92G76yU9qOi2Ax2mgfIq746ufkOAwOf0yjWIQDHhU1/pGfUDtSAqGhdgXH5Yps4QFI/i2+A3T0yEJRgpwZn+gvqqkrKHEIlGs6bjvR0Im9ILbDepKMj+tMod0Rjy4oXfjOG18/d/AlrAPOXn6zWcQ69TkUXQBRjCsfZzFrrEjZCH+TerFZoKu1I9Txcx6S4BzEZj+NA/yJYhtIANZtX+Zm X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86a0d48e-40ae-45aa-bd3c-08dc41bc7177 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9498.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2024 11:14:39.6215 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UGSJ/iTPyaggm/AfurHMImwNdfffEBjxwRtMCTwXsedWB/eOd8hUQ8q041l9YNUqui+kEefPQ4khNVKwsKMabw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9145 Each rpmsg sound card sits on one rpmsg channel. Register CPU DAI with name of rpmsg channel so that ASoC machine driver can easily link CPU DAI with rpmsg channel name. Signed-off-by: Chancel Liu --- sound/soc/fsl/fsl_rpmsg.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/sound/soc/fsl/fsl_rpmsg.c b/sound/soc/fsl/fsl_rpmsg.c index 53bd517e59d6..bc41a0666856 100644 --- a/sound/soc/fsl/fsl_rpmsg.c +++ b/sound/soc/fsl/fsl_rpmsg.c @@ -135,7 +135,6 @@ static struct snd_soc_dai_driver fsl_rpmsg_dai = { static const struct snd_soc_component_driver fsl_component = { .name = "fsl-rpmsg", - .legacy_dai_naming = 1, }; static const struct fsl_rpmsg_soc_data imx7ulp_data = { @@ -190,19 +189,40 @@ MODULE_DEVICE_TABLE(of, fsl_rpmsg_ids); static int fsl_rpmsg_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; + struct snd_soc_dai_driver *dai_drv; + const char *dai_name; struct fsl_rpmsg *rpmsg; int ret; + dai_drv = devm_kzalloc(&pdev->dev, sizeof(struct snd_soc_dai_driver), GFP_KERNEL); + if (!dai_drv) + return -ENOMEM; + memcpy(dai_drv, &fsl_rpmsg_dai, sizeof(fsl_rpmsg_dai)); + rpmsg = devm_kzalloc(&pdev->dev, sizeof(struct fsl_rpmsg), GFP_KERNEL); if (!rpmsg) return -ENOMEM; rpmsg->soc_data = of_device_get_match_data(&pdev->dev); - fsl_rpmsg_dai.playback.rates = rpmsg->soc_data->rates; - fsl_rpmsg_dai.capture.rates = rpmsg->soc_data->rates; - fsl_rpmsg_dai.playback.formats = rpmsg->soc_data->formats; - fsl_rpmsg_dai.capture.formats = rpmsg->soc_data->formats; + if (rpmsg->soc_data) { + dai_drv->playback.rates = rpmsg->soc_data->rates; + dai_drv->capture.rates = rpmsg->soc_data->rates; + dai_drv->playback.formats = rpmsg->soc_data->formats; + dai_drv->capture.formats = rpmsg->soc_data->formats; + } + + /* Use rpmsg channel name as cpu dai name */ + ret = of_property_read_string(np, "fsl,rpmsg-channel-name", &dai_name); + if (ret) { + if (ret == -EINVAL) { + dai_name = "rpmsg-audio-channel"; + } else { + dev_err(&pdev->dev, "Failed to get rpmsg channel name: %d!\n", ret); + return ret; + } + } + dai_drv->name = dai_name; if (of_property_read_bool(np, "fsl,enable-lpa")) { rpmsg->enable_lpa = 1; @@ -236,7 +256,7 @@ static int fsl_rpmsg_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component, - &fsl_rpmsg_dai, 1); + dai_drv, 1); if (ret) goto err_pm_disable; From patchwork Mon Mar 11 11:13:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13588597 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2057.outbound.protection.outlook.com [40.107.6.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71E5D3EA62; Mon, 11 Mar 2024 11:14:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155691; cv=fail; b=SA3lluv/CxyR2Jq/Ag4Z9/wBQQWTMJxgdn6X7My6k5lUhV0kG6gA14FOlNcDoWziXSMiBw18p+jOVcwa/F/LZiB6ytU/i7vp3YsGljfurbIj4sLLAw0CVzb0rirKb3hjpFFnJPQopk//Dn5decqFyPrYQx6Te2dOFpAG0G0z4J4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710155691; c=relaxed/simple; bh=6f5VVsuXLzkQpBZgrHGdRJxTGLiOC3kfnAm//3z9e5M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Lb3qQ969p6vpH1zaI2gvmz7Kj8Q0JRIdqRoqsXj9QWorA5SQqhJct6l0nuPsmQUPx+zJgR8cFMdeouDJ9xqy8QU1VrkkQflEi42c5/yXCyqkaqjPcmrFe13XWm1sTR4+VAdn0jVXYSnfv8LkIETytns/VOfy8a5SXHgDLHavTS0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=drjX1bWp; arc=fail smtp.client-ip=40.107.6.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="drjX1bWp" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oPK5leh7gLQEuREzNWsrpaT/mWabDVhi6GMH2cuhzwopwCGGFw+a3EkNSlz4/B3NCobon6mXYma8frgEDCOBwLbOV3CWSARqZwwSAeATQnh4XfSvDSFEvkjSYUdG9xtxkNIvW75pi/oJgk1b8Dswt9ZrrzZDRROQ3CG8H9/FJrJrQVxA9K1J0pE9q2xj3oX6pecUoDk75uSY63NvetdhT4gf5+3341MKzYR9K0zqVeqNKhybUAtGm3z2DWydXFtkYNz2CdLCCnCiSnA6VJ5zcUc+j+UHcHc/WiZMiuRzYkBYs7YKnUOwTHkJtxFsqxQHztjfru1Izwl16dkWs8PdYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=CaP8RKoyNqXGxOJY7gl5KarHmyUtzc3rg//cAW3HNCo=; b=iq3ibI5wSZf5nil4X85qGqHYbfm01Rsq3WxFvz/0cTxDItEnL9ztgqrpcPK2l6fap9EOwsYU2ugCXlnd3HAQI8QbOLGM6SjBeN8ZkbeICDKbsamL39468ciaaT+6BARyLXUmTQOL7M+GPVY5bqutxbYBEhnCUQ2QFTZRn0kjCEk34+s/nXmf9m1x7CbMph145hzMnkmxhV24Rhg+HJkwqxwC2lWq615gdiLRa3KVcDHOXQb7QLx3pB9WJdYG01K38ww/bUFXnFu/JX1K9iYS7PL2K6ZAM1HFrT8tqhWiUPiZ6po0xbQW5sJCfsAm8cofe0RbBUhhCxKdLiIqu1Fmrw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CaP8RKoyNqXGxOJY7gl5KarHmyUtzc3rg//cAW3HNCo=; b=drjX1bWpf/zQ90NB+Oc1YxpbXRy2FGwE9eyv8zAWXIqexI+WDxMC5U9R7W4UGVJZqBW2XupnEG0QClzCvfgakrvr/Aya+zrlp17zLbCCPBTk582jWpqQDB41SDJefcHhdYXORMG1JRzKCn77ImBrCVOgf9GlfQblIy8nSd4LaDw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) by DU2PR04MB9145.eurprd04.prod.outlook.com (2603:10a6:10:2f4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Mon, 11 Mar 2024 11:14:44 +0000 Received: from DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::4bee:acb0:401a:3a01]) by DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::4bee:acb0:401a:3a01%7]) with mapi id 15.20.7362.035; Mon, 11 Mar 2024 11:14:44 +0000 From: Chancel Liu To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, linux-imx@nxp.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Chancel Liu Subject: [PATCH v3 5/5] ASoC: fsl: imx-rpmsg: Update to correct DT node Date: Mon, 11 Mar 2024 20:13:49 +0900 Message-ID: <20240311111349.723256-6-chancel.liu@nxp.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240311111349.723256-1-chancel.liu@nxp.com> References: <20240311111349.723256-1-chancel.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0032.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::23) To DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9498:EE_|DU2PR04MB9145:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b05619b-2107-46fb-c346-08dc41bc74a6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Fdd5Ajd84kqY8vyNDiO7Gu6jjRISWKMdsHKBlYj1WBB5PPbBah3tOxRBBnXa8YbujafhjrXmTYY9HD4YYaBwC/WmiLUMc6q4CDR7U9Sav+gKzT7lUNlGw5j8JyI+6919LpImQU/Hpt89+juNggub52jpFTCbzNdl9T8nzh1wDNqWleFtiGbC5I3KV0PTnYvku3xhA2kEVGcgiXGFoV3u3o7SkVnQHZ+fhaj8FFMc7WuZl4eeuakwnwMbG03m71rP6q4VgBnygLVRF6esEUYCRP+MlOuRDtSiHRVuDNEbJCVAbDEN40A+P8Si9hRelRw/qE+hfFWtig4YJQd+MtqpzsHiaC/5HJvMtNGrwuSlq3fr07CtR7DJMsePt9W/C8rvwEV+Oh14h7Nbzh0IzIArkhEaSEhPrAv0dZ0FHAO01Ax1iNhBw17kqf+cBG+RwOt2lNs2ZexSkKeb0vellS+XMQWh3bPAlU9D9DwS3PJ26KR/xJ9cPnraS5flLRJcs0rALnWftTPfsw0ZzFBNDVSGtwSaXNl5Q20oq/k8wr5WrWWj6pSCTFO99sTGq9trc/WqFRBkLo7Grd3JaDrp+MCBKr8CzbluyLpHlfQ3KmwIk43CMOwBcrnOm2dVuI76ijXW6UJtlrvZLt5o+ZsdqxABqIBidRH1JXGQ97bhg7jJzcZ9nSc6DRwfzezr7LGaKiglJGn0ZfXUrF85pBSJugvY80uRtBXgtay/e8Y91rV/O1k= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9498.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(376005)(1800799015)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: k+2Nn6xXQU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PeP0VUYYglGTPo5Pgd9d6O2j+SMr3rJhCaLsIla7r7E4JhdNgskcKet6fgZ3zqa3woGhwX+CHtFa5p+LauJxTEmXsiEB+O0MBpB6rAFKz0bJ8nBdz3EQVTJOENTuEQyzTbRv0h3OVFBFXdZwX1vidNU3p1s3tJi5uXowD4n3ZIIdXPiyFdaHzCvTKjfg0GbexZodqJGbOMJc0jF6ESTNg7FlQ5/fomK1825rCDGmF4EIuymniC8YXhZDtNpNMLL2Qx4hf+YBoe0cxM9btJcGJV/3qG8KJLOlazuMybIl1kJOeBLtCuRKzl06MUTnjR/ntt8AarMu6swB0BrXOvEFNoS/EruaRn1n9c/XcvGzlnjHbrZma8dkBHdBXaWkOz67nVyy4SR6dAebjO3H2FAwpjPur2bpEtJ1dUYHs7ncDScGOZdBd49/vXeb6a2X+qcCgk86PBtSkRrfWTdz3zKV56ERAct3v22B1c6SQ09YJVXaXKr2CrlN33bRiD X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b05619b-2107-46fb-c346-08dc41bc74a6 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9498.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2024 11:14:44.8279 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TnuXlIR2zjIQh3anNEhtsjIHWIjTVyVNRh4xKyeptACaOtoEGdyQXBOOOnUirX85gpYtRcznypCd1GGwMRDv7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9145 In order to support register and unregister rpmsg sound card through remoteproc platform device for card to probe is registered in imx-audio-rpmsg. ASoC machine driver no longer can get DT node of ASoC CPU DAI device through parent device. ASoC machine driver can get DT node of ASoC CPU DAI device with rpmsg channel name acquired from platform specific data. Signed-off-by: Chancel Liu --- sound/soc/fsl/imx-rpmsg.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c index e5bd63dab10c..0f1ad7ad7d27 100644 --- a/sound/soc/fsl/imx-rpmsg.c +++ b/sound/soc/fsl/imx-rpmsg.c @@ -108,10 +108,8 @@ static int imx_rpmsg_late_probe(struct snd_soc_card *card) static int imx_rpmsg_probe(struct platform_device *pdev) { struct snd_soc_dai_link_component *dlc; - struct device *dev = pdev->dev.parent; - /* rpmsg_pdev is the platform device for the rpmsg node that probed us */ - struct platform_device *rpmsg_pdev = to_platform_device(dev); - struct device_node *np = rpmsg_pdev->dev.of_node; + struct snd_soc_dai *cpu_dai; + struct device_node *np = NULL; struct of_phandle_args args; const char *platform_name; struct imx_rpmsg *data; @@ -127,10 +125,6 @@ static int imx_rpmsg_probe(struct platform_device *pdev) goto fail; } - ret = of_reserved_mem_device_init_by_idx(&pdev->dev, np, 0); - if (ret) - dev_warn(&pdev->dev, "no reserved DMA memory\n"); - data->dai.cpus = &dlc[0]; data->dai.num_cpus = 1; data->dai.platforms = &dlc[1]; @@ -152,6 +146,23 @@ static int imx_rpmsg_probe(struct platform_device *pdev) */ data->dai.ignore_pmdown_time = 1; + data->dai.cpus->dai_name = pdev->dev.platform_data; + cpu_dai = snd_soc_find_dai(data->dai.cpus); + if (!cpu_dai) { + ret = -EPROBE_DEFER; + goto fail; + } + np = cpu_dai->dev->of_node; + if (!np) { + dev_err(&pdev->dev, "failed to parse CPU DAI device node\n"); + ret = -ENODEV; + goto fail; + } + + ret = of_reserved_mem_device_init_by_idx(&pdev->dev, np, 0); + if (ret) + dev_warn(&pdev->dev, "no reserved DMA memory\n"); + /* Optional codec node */ ret = of_parse_phandle_with_fixed_args(np, "audio-codec", 0, 0, &args); if (ret) { @@ -170,7 +181,6 @@ static int imx_rpmsg_probe(struct platform_device *pdev) data->sysclk = clk_get_rate(clk); } - data->dai.cpus->dai_name = dev_name(&rpmsg_pdev->dev); if (!of_property_read_string(np, "fsl,rpmsg-channel-name", &platform_name)) data->dai.platforms->name = platform_name; else