From patchwork Thu May 25 12:28:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 686430 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 3CBF7C7EE29 for ; Thu, 25 May 2023 12:30:25 +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 AA1C3200; Thu, 25 May 2023 14:29:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AA1C3200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685017823; bh=X26WXzE4/2WrqzAzYhAQquKMaxlBOzuTu7FvMl6rPrw=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=CwvMEAGeHwjSR3vsLyOpMNLI4C3SgZFDs42LB5ZsL5+VibjqmAElQuYCBkHS4FJrk Bor3ubMDdepwfj9JazHEfZdYfv+lXYulgN8QOUWNqBSr1Tq3s1YeOa+ZWm5ojgArSb ty4ZS6agUXpsZAQ76qP3K+Mrna/p5XOpj+uRHHkI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B4B6FF800DF; Thu, 25 May 2023 14:29:04 +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 C8308F80053; Thu, 25 May 2023 14:29:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E8999F8016A; Thu, 25 May 2023 14:28:58 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0631.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1f::631]) (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 6384BF80007 for ; Thu, 25 May 2023 14:28:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6384BF80007 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-NXP1-onmicrosoft-com header.b=hMUcMxKg ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LSIXEm8Sh+7mIfY0J8ay6DePO1GPji5YAQqUw63qBg0zdO4R3Uc+XFjHI0mwjvGm9SDTC4HLFlFwWkWNusL2zqhZIQ84MEsL10y0Y4InSDqjWaJS0lVHijAIkQpm6MfS9SNDGlXvq1tZzvmtAAT0ZaMVQwXg8kDAf2gLJ5VY3NWv3OKxc3QQXsJ6AkRtcitpoI74bzxFXAa8bwVBY++2gMJf/1dopOSmfze6He8bBU7IXFTU6tAK6M3Fh0coVMSeUv6a/IN0ZH0FF1ZneOB8b5b9Ie7S0FX75KRcryL/wPW0cjLFhC6tU76hb6bVAKAlu0SirtEy2r1YbCz+AkSAyw== 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=n6ZNMSkR/btqJPZF4LEQM2FDLnN4kLgLCoFV5dCTOkQ=; b=m6CiASLcbIZoaQ8PQ1WWzf9EZ4f7BZskGBfrtpdtL6OY/buST32qJKO47ZF68WxQfx+GIDPOUkm1/NopdtecWNRLU37U6jKXS/luZmF27kyBvGGmSdFwjqRt3VK25jibJ9gvr7YE0pQTXqCELXgZB6O7XCLK+Vhu78YqX/mQ5Jjv7JiqcoxNiKQqWKPYWqiK2o+fMdfX7seIxZJdg0E5XROxc1HJFAT8vmt/ZzzkljFLz5dE4O/ZFjPKthm1arTQOuzqtyXdTfsZ6slNIIS+a/pVD8WZL9pBg0DSqlxKWF86Ogn2xNRplLhzsxA8qc8/vLMx/GSLo069s+fu06gwmQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n6ZNMSkR/btqJPZF4LEQM2FDLnN4kLgLCoFV5dCTOkQ=; b=hMUcMxKgf0zu12/0Nxp0wj6CcDqGmzbMpXjdg5lb2gyFlMPM4q7gyKZU3LOhQSSrpG9bDIX0UfKrJoIIFgsjaT5asD7EFTK/Gr32rtrjyaqy17fDY84Tfz51GMbNUtFixK2QnY8CK4rDxdOOFpeh09XdB9ygANK36groyUuK4ZE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5151.eurprd04.prod.outlook.com (2603:10a6:803:61::28) by DUZPR04MB9783.eurprd04.prod.outlook.com (2603:10a6:10:4b0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.16; Thu, 25 May 2023 12:28:50 +0000 Received: from VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::42e1:4216:edc6:52a9]) by VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::42e1:4216:edc6:52a9%7]) with mapi id 15.20.6411.028; Thu, 25 May 2023 12:28:50 +0000 From: Daniel Baluta To: broonie@kernel.org, alsa-devel@alsa-project.org Cc: pierre-louis.bossart@linux.intel.com, lgirdwood@gmail.com, yung-chuan.liao@linux.intel.com, ranjani.sridharan@linux.intel.com, daniel.baluta@gmail.com, kai.vehmanen@linux.intel.com, linux-imx@nxp.com, linux-kernel@vger.kernel.org Subject: [PATCH v2] ASoC: SOF: imx: Add OF machine descriptors for i.MX platforms Date: Thu, 25 May 2023 15:28:37 +0300 Message-Id: <20230525122837.649627-1-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: AS4P251CA0013.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d2::18) To VI1PR04MB5151.eurprd04.prod.outlook.com (2603:10a6:803:61::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5151:EE_|DUZPR04MB9783:EE_ X-MS-Office365-Filtering-Correlation-Id: e5108cb0-743f-4e53-daf3-08db5d1b97fa X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qaSkmuk3uGqhrDvbdN0vggTe/TEJ6zfpOraXl0mdRPC4EuEqFh1bw7/ZrXaBAnGBQU7b9rGDVvM2B+Th7VdGQmXkTYpCDbWpHwPWVvhY1D+mMdP2yHQfcHRrZaZDy2JduZIywMj7c0ZcNkt6xGk5cUqhIZk0DDaDMhYM1c3vwXTIGGgxhrq7vxgNv6QlvgFf1hFQc+Z8VEI5S7grBJetmGv8JCfT8ibcu+iCwDPo2klWwAL/WpGTHv2Crn/gChBF7hvrKB6rjmx2t1U0+xxVSx79pmfdSJ6Btg8q8D0yDqB9/KMa1XVOsJ8PdpPqeJ9CEKZXWKLinp9EjLo5QCzMoN1vmQkPCn+2HZG4AnTC5WGtNXLm29tlnKO44dUtsYHLIcud81YkfPnGKbhOEby66GZLD1hIRGJrgf7PdUnGSWDBYbx68jKOQT8vEGxgYhKUtwRsFGy2+pFjLVCfBNRSh7J17xbvZMc3fwLItPU4eE5cfg+6hTYKyP5JuqO5+Ao2W8UJqfgEVYglhPbrbIhncE2gI89wCGp7nIvwifGFU9dqrd36bS/WaI7x5dsX0woZlCPMTkhVPolBzUHXNhXBqqVz8wBva57yqzzLaLL4f7Hs3xDvKaGDmOFiKq1Rjoze X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5151.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(366004)(346002)(136003)(39860400002)(396003)(451199021)(86362001)(316002)(4326008)(66946007)(66556008)(66476007)(478600001)(52116002)(6666004)(6486002)(8936002)(8676002)(41300700001)(5660300002)(44832011)(2906002)(38100700002)(38350700002)(2616005)(1076003)(6506007)(26005)(186003)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: B2zioXVHaFBaQ8rGhTbB71AqQ/wV/tAPzx/xYE23potqrCjfgpoUabedN9UfbfP178mLBqQN5cbc5fal4MprTw0pIBV0ZZASegyTqhX9qz4JlBpQeY0THuOpcIr9Ivvu9055uVWwSC46O7mciVqJEbsjaY1FXMiuy4IeP9AC7TzT+1o+3QUgqnIvZVq26Mj8hccNiROW2PX6S2tZuyPBxMG0f23ASOcXV0ZzmkLItytOPY+mCNLLXUNZiP4NPd9LWCqhX8IuQop9yyNfA3C0ELfisp2D6fQOqAz55Xyjc4kw3GTk1SSNbu/r6TscVfTwcF1NgZ2yfEEoB2jl5E6VU8x1x41Pr74P0J6Iq7sz/oz9cj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axfZ8gO24ttJYB72M7xl0AO2I3BWtxf1devl0R9a22/9kcH2lhxkH+LKeivZuCqeWXp2MBbEmO51iSEW98NE7zXe16ZupJEeaQmLXqUFcD4PNem2sO+wSKwLdaeFW7GCkfa3Upc0eDKB2xYBhObwukDUdh X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5108cb0-743f-4e53-daf3-08db5d1b97fa X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 12:28:50.0186 (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: RaP0w6VgH1UYi8wD4jmaEcSzf/iNYMuzbjXlEQKq2kFy5KrLpl4Wbxk99byVfxN3klAV1E6eWlzS1qAoN8Q7pw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUZPR04MB9783 Message-ID-Hash: UOKNJEYVO3FW3WMTC2R34HST6S2SQWBM X-Message-ID-Hash: UOKNJEYVO3FW3WMTC2R34HST6S2SQWBM X-MailFrom: daniel.baluta@oss.nxp.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.8 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: From: Paul Olaru Covered platforms: i.MX8QXP, i.MX8QM, i.MX8MP, i.MX8ULP. These descriptors are used to locate the machine driver and topology filenames. Note: because the compatible values for the boards do not change between the cs42888 and the wm8960 cases, I have selected a common topology filename, which is intended to be a symlink to either the wm8960 or the cs42888 topology file. For uniformity I did the same for i.MX8ULP. Signed-off-by: Paul Olaru Signed-off-by: Daniel Baluta --- Changes since v1: - rebased patch on Mark's tree. sound/soc/sof/imx/imx8.c | 16 ++++++++++++++++ sound/soc/sof/imx/imx8m.c | 10 ++++++++++ sound/soc/sof/imx/imx8ulp.c | 10 ++++++++++ 3 files changed, 36 insertions(+) diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c index 2844d9a8040a..3c9f0cfd8218 100644 --- a/sound/soc/sof/imx/imx8.c +++ b/sound/soc/sof/imx/imx8.c @@ -608,7 +608,22 @@ static struct snd_sof_dsp_ops sof_imx8x_ops = { SNDRV_PCM_INFO_NO_PERIOD_WAKEUP }; +static struct snd_sof_of_mach sof_imx8_machs[] = { + { + .compatible = "fsl,imx8qxp", + .drv_name = "asoc-simple-card", + .sof_tplg_filename = "sof-imx8.tplg", + }, + { + .compatible = "fsl,imx8qm", + .drv_name = "asoc-simple-card", + .sof_tplg_filename = "sof-imx8.tplg", + }, + {} +}; + static struct sof_dev_desc sof_of_imx8qxp_desc = { + .of_machines = sof_imx8_machs, .ipc_supported_mask = BIT(SOF_IPC), .ipc_default = SOF_IPC, .default_fw_path = { @@ -625,6 +640,7 @@ static struct sof_dev_desc sof_of_imx8qxp_desc = { }; static struct sof_dev_desc sof_of_imx8qm_desc = { + .of_machines = sof_imx8_machs, .ipc_supported_mask = BIT(SOF_IPC), .ipc_default = SOF_IPC, .default_fw_path = { diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c index 1243f8a6141e..a4050f6ec263 100644 --- a/sound/soc/sof/imx/imx8m.c +++ b/sound/soc/sof/imx/imx8m.c @@ -470,7 +470,17 @@ static struct snd_sof_dsp_ops sof_imx8m_ops = { SNDRV_PCM_INFO_NO_PERIOD_WAKEUP, }; +static struct snd_sof_of_mach sof_imx8m_machs[] = { + { + .compatible = "fsl,imx8mp", + .drv_name = "asoc-simple-card", + .sof_tplg_filename = "sof-imx8m.tplg", + }, + {} +}; + static struct sof_dev_desc sof_of_imx8mp_desc = { + .of_machines = sof_imx8m_machs, .ipc_supported_mask = BIT(SOF_IPC), .ipc_default = SOF_IPC, .default_fw_path = { diff --git a/sound/soc/sof/imx/imx8ulp.c b/sound/soc/sof/imx/imx8ulp.c index 4a562c9856e9..82fcc672bb1c 100644 --- a/sound/soc/sof/imx/imx8ulp.c +++ b/sound/soc/sof/imx/imx8ulp.c @@ -477,7 +477,17 @@ static struct snd_sof_dsp_ops sof_imx8ulp_ops = { .set_power_state = imx8ulp_dsp_set_power_state, }; +static struct snd_sof_of_mach sof_imx8ulp_machs[] = { + { + .compatible = "fsl,imx8ulp", + .drv_name = "asoc-simple-card", + .sof_tplg_filename = "sof-imx8ulp.tplg", + }, + {} +}; + static struct sof_dev_desc sof_of_imx8ulp_desc = { + .of_machines = sof_imx8ulp_machs, .ipc_supported_mask = BIT(SOF_IPC), .ipc_default = SOF_IPC, .default_fw_path = {