From patchwork Wed Nov 17 09:37:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Daniel Baluta (OSS)" X-Patchwork-Id: 12624231 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CB61C433EF for ; Wed, 17 Nov 2021 09:47:28 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E56B261BD2 for ; Wed, 17 Nov 2021 09:47:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E56B261BD2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5995B187A; Wed, 17 Nov 2021 10:46:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5995B187A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637142446; bh=uRywt/6Kyw3A59jrRjOw0vqU/slQPz8+odzpqxuhGVY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aZtdVzP4D+vv/V/AS68iWlqRggwhcMoe7cK0lxR0+H+fOwuT9chZzfb8ujeY3fTmv 4GwAAnkm+T81dJ5ZI4KcPO/9OfkpA6pEEmgSPcILhgV/PlDtjmP7xGOk+pd+Cv7CW2 79dTbqtge3L01V95iajkLZRlZSI6FL3zuQmXOHsg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 787F7F805E5; Wed, 17 Nov 2021 10:39:03 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3B563F805C5; Wed, 17 Nov 2021 10:38:59 +0100 (CET) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40061.outbound.protection.outlook.com [40.107.4.61]) (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 C1065F8055A for ; Wed, 17 Nov 2021 10:38:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C1065F8055A Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="GlNNqE/s" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ezVj+2ApiMp8hgbf/QZCBfHhjo6jphmEK9GEFs+hHRJ1NyUxz8je+4ikLSK9tsArB8jTUINlnELAbOPvBgNVr2CZFCkenp26KWgaVyERdayNUaseqpuQpYPBKSymvvmOdeQ37P01wtOJ3XVDS8H28GFy/GrhtJ4Ea9KS61mrij4A+t6UE6Lh9+j9fZBZCIGD49Ge29CwBdBkVfAPpO1mErTKp9llD30vjtvBUJXMjCvdJoRgudgrH3/pUhxmjamnuPiG7HEfXYfxJ7FyScI9DLi3ok9tqDZod47FHkDqTnrlyFl56vbbR8lanOmtNQWAVXt1/39ZFDcgM6PwOin7RA== 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=LfCMsRTQHWceFWu6tp44o22ZVYte66A8Zl2PxavSv3g=; b=KPLmVvZj3uK4N0dEa0dUshMljywIaJVnQ+eThDydjMcNDvu7HCw6Bb4TfEu5ekkOGE2XmdVgbhpONC2Xe23UG0B/D5/fXlCQiP3a82SwLehpkM/4sNFZrPJ34HuunjpvW5pEoOZR2oO+EN4xPjX+geixdwNreU62FKz7z/auk6qthRFEt1d9lSuMefr6FNTl2dmga0E1QYlGe6xLidN/6stmKIqrqMj+y36m+3gRdXlsM1ghepfMIxngfV7IMW/xm9vUAXQzuHtbnEAPVsMMWbJTY+0VJsAghvq4CKY2W7xQfR8obkeIuEHLYd9rvd3cE3Q9RSTvvKhIhavoenYWhA== 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=LfCMsRTQHWceFWu6tp44o22ZVYte66A8Zl2PxavSv3g=; b=GlNNqE/sqVJ8p7AkEJPm4AfnHntt/te3ioyBkunB/ghf8vglqNB4wVH7y/XSn1zBCx1wFtz2aNB3ZEUD4+VllT/Y8If08BIHHjWvunVNArLZ/BMeq2g5F460hLKQGZUlquRTm94Wfha08vsf6p5Vy1JvHLWhlvVPyycX15TZ74U= 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 VI1PR04MB3039.eurprd04.prod.outlook.com (2603:10a6:802:b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.16; Wed, 17 Nov 2021 09:38:43 +0000 Received: from VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::85af:f8be:aa99:ba5f]) by VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::85af:f8be:aa99:ba5f%3]) with mapi id 15.20.4690.027; Wed, 17 Nov 2021 09:38:41 +0000 From: Daniel Baluta To: broonie@kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 19/21] ASoC: SOF: mediatek: Add dai driver dsp ops callback for mt8195 Date: Wed, 17 Nov 2021 11:37:32 +0200 Message-Id: <20211117093734.17407-20-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211117093734.17407-1-daniel.baluta@oss.nxp.com> References: <20211117093734.17407-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: AM3PR03CA0060.eurprd03.prod.outlook.com (2603:10a6:207:5::18) To VI1PR04MB5151.eurprd04.prod.outlook.com (2603:10a6:803:61::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2a02:2f08:5706:b700:22bb:b216:ffff:73e1) by AM3PR03CA0060.eurprd03.prod.outlook.com (2603:10a6:207:5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19 via Frontend Transport; Wed, 17 Nov 2021 09:38:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1d1bab77-b396-4347-3129-08d9a9ae09e9 X-MS-TrafficTypeDiagnostic: VI1PR04MB3039: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1284; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z7z7H1V/j+B+31OX0YXy60oALEGOjxRJy123gF3QCAtd/zp/ncJvzsTUAUb+wDOSjjILgqwIKNLVw9tOak3UV6E6DP9fESSLH7eD8joh36gXGTL/W9iT8iHwCVO+TcNcwaTXdd3hFmbmBF/Zki66SQKEiWeGevlQtK0ZXUuiBUJoezKJiTGe/w/9k2dn/dpb9kfEp9ktJFR6Fli7AnpYPlxvZC9ng1XT0Pi41vAZfvCpe3wJovIqHyoQu9rOfipUwIW/+EeAdiZELBNV5EtZI6yUUni4AcP1sxGfE4TNDq+iRVhKtaskiqrIiCAa25bxVwLf/Gjxe3ZuhI4u5kuR6b6lz2lF5s8faHGv4Zc1fL/yd9VRh91d9dmt1IQNAVCiZmy2GHkZ03lwGLg0GU7y594CiTOmpAs+tfGHvZvdSvkRw9AQoMawYjl0bjtVWb8miHJnDLON2oqjlc4zUlfwLoaeQ/IhdPW/0FNSX9yqMx/MGpSOUQssqJK2AlSvENnY8W9kYh7lHnuMaTPjXSbmqqEoWL/k77czi++jkILSvrGrC6Csh1sZEwL34GQVUSfnWsmarmJQSijZYZC493nifUyeZblbqMm7Jep4I7c5PEoQ5uAoSBPtNCF054q+ccJnvDu7dke/uRT0Hx5Coyuwyg== 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:(4636009)(366004)(66476007)(186003)(6666004)(44832011)(52116002)(6486002)(5660300002)(66556008)(6512007)(6506007)(4326008)(7416002)(2616005)(8936002)(8676002)(1076003)(2906002)(66946007)(508600001)(86362001)(316002)(38100700002)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iml4dRi0pyO4kkpYfqGjHR4eJoM2?= =?utf-8?q?kdDGUNd8Vt6TCvxLthOU1dXm7hDRjxnVFUuGJMzZzYM7qaBRZVQ4Nj4a8qXTM+4v6?= =?utf-8?q?mM77oNm8FyBpaXvCbLvIoH786Vbx8F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s/8VoKsprSXNRgDjRfe3s?= =?utf-8?q?Bcs30l41WsVDhpTHAN8N1sMjr7eMWWCsQaEeEBD8DyTC4PH0q9nksXNeMKZ+kzC+u?= =?utf-8?q?P2qSrYz2Rouyy4+NYTXiWh3zaYEPTMUvOdCMEZ7JiE4uDGzkyc37MSjCgT6yfDcb1?= =?utf-8?q?6mUxFM8n5CDGi1hvqkhNM4rqK8+YhPIfK4yK1y1h84uoP9usuyzCC2HhXsFoilhT4?= =?utf-8?q?i9xIF1/OvpYvGP/GvyqCvZhYFhzcD8llzlVCjrNEKBeFiqvBqljMDorvrXoMZh+8J?= =?utf-8?q?8xNdK+W6namMoEg61kfF5c50E9X0v+YlHe1ilmKy5sAvgb4xUacVHGbwE9upn1kc9?= =?utf-8?q?Z+u5J4S6A/VK7cFsDXzjcmt7wcBNzJsARXgb3GQnoiS/Gp2CCzZcwteVpGHT+TLIv?= =?utf-8?q?DbwRObr67DEI44ehG/obqxesWNLKOwP21fpMOy3i2GnVQEvsKp6QBYV+SXmmD1lBu?= =?utf-8?q?RoZ7hhRd/JMdqzgPVPknmtmy1/8TTtOcoH412MdmA6O8ChrVU6ZP8Jl/vGRVWJmgU?= =?utf-8?q?Mm6NgEWSdyx6HyzGE+cNUjJJwrsAXjwGcBj60wuKgVqnmb5oHIAOXazhXtAdfeb8E?= =?utf-8?q?CyAZLpTRNBQtio8Jk4h+kk+OuC8vt89UasyAdFlFHlcXih3rtMgc1w=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d1bab77-b396-4347-3129-08d9a9ae09e9 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2021 09:38:41.3612 (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: 3wnpoTM/La2mN3Kw27ZHLRVMK7LFwHYzj0jwQ/JG/j/J5L2MG8aysdFa+NQwJCYOQB5JUzoaQ2Rie6wkdXUumA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3039 Cc: Guennadi Liakhovetski , daniel.baluta@gmail.com, Kai Vehmanen , AjitKumar.Pandey@amd.com, linux-kernel@vger.kernel.org, =?utf-8?q?P=C3=A9te?= =?utf-8?q?r_Ujfalusi?= , pierre-louis.bossart@linux.intel.com, lgirdwood@gmail.com, Julian.Schroeder@amd.com, linux-mediatek@lists.infradead.org, Ranjani Sridharan , Balakishore.pati@amd.com, yc.hung@mediatek.com, vishnuvardhanrao.ravulapati@amd.com, vsreddy@amd.com, daniel.baluta@nxp.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: YC Hung Add dsp ops callback to register AFE DL2/DL3/UL4/UL5 sof dai's with ALSA Signed-off-by: YC Hung Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Daniel Baluta Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Daniel Baluta --- sound/soc/sof/mediatek/mt8195/mt8195.c | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c index 88da6c2de070..99075598a35a 100644 --- a/sound/soc/sof/mediatek/mt8195/mt8195.c +++ b/sound/soc/sof/mediatek/mt8195/mt8195.c @@ -299,6 +299,37 @@ static int mt8195_get_bar_index(struct snd_sof_dev *sdev, u32 type) return type; } +static struct snd_soc_dai_driver mt8195_dai[] = { +{ + .name = "SOF_DL2", + .playback = { + .channels_min = 1, + .channels_max = 2, + }, +}, +{ + .name = "SOF_DL3", + .playback = { + .channels_min = 1, + .channels_max = 2, + }, +}, +{ + .name = "SOF_UL4", + .capture = { + .channels_min = 1, + .channels_max = 2, + }, +}, +{ + .name = "SOF_UL5", + .capture = { + .channels_min = 1, + .channels_max = 2, + }, +}, +}; + /* mt8195 ops */ const struct snd_sof_dsp_ops sof_mt8195_ops = { /* probe and remove */ @@ -329,6 +360,10 @@ const struct snd_sof_dsp_ops sof_mt8195_ops = { /* Firmware ops */ .dsp_arch_ops = &sof_xtensa_arch_ops, + /* DAI drivers */ + .drv = mt8195_dai, + .num_drv = ARRAY_SIZE(mt8195_dai), + /* ALSA HW info flags */ .hw_info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |