From patchwork Thu Nov 18 10:07:47 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: 12626475 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 326A2C433F5 for ; Thu, 18 Nov 2021 10:11:51 +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 86E8F61B7D for ; Thu, 18 Nov 2021 10:11:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 86E8F61B7D 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 550B618C2; Thu, 18 Nov 2021 11:10:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 550B618C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637230308; 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=AEPyKYcc8/bOrfwJxn/LA6TxFtWVcDB4RzK3+Wy5xW6GdjN1nYg2TZ9zJOCwc6JxE RqqZupHm9iIHd68x/VRKWQ7vpw6hadOMV5pM5Xtdk1oAH8IuC0Yd6sxLXyoimJ0CKX WhAlM6I3aE1Kzv+tSGHesFvW65UjOMdnt/TBArAo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 305EAF8051D; Thu, 18 Nov 2021 11:08:39 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F4144F804FE; Thu, 18 Nov 2021 11:08:33 +0100 (CET) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on062c.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0e::62c]) (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 C0F03F804D6 for ; Thu, 18 Nov 2021 11:08:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C0F03F804D6 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="Is3xwVFx" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f/cCkFYZhxwMpBjlCDJQek8r7PjE8dSQ+pb1AaRsKO8kGWkfC3cdDcsGVCpjnqZAd1xqMZoEWgH6VBfIaBfZMc+vXr56JI0VfHJNLF159Qa3r4h8yOPQCNozDQF6xY6ic2HDZyWLoUHZgN6Kk/eRrcFe2mB6+MkP30sejej5XnUlyTo2WUb9vVOzU1GKDXusee3Hen9ZD1gfyFW0reRdwuZa9ACsT4TNFE555GMDuPaU/Olto9f88q8SGiwq0ZRx/E5FaDGByGltg2QUhzfje2OwKkUzrj142FLTwSqh2+2GfDV1bGajQuumiwBMeuo5DmTPzxvTnIlw2vu2erhCfQ== 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=T0/1DSjlz42/HgEmbsZsbifvkEfb5eOr+VcJtp0tA6YatDZMp5u6sUlmSQvdsOc0fo48EoT+igwzGDGneb8W+U1BrElyUioJgnXyVvdr4JAZTLLfl/D3yzlTZEmwkP0OE5flHJLil04KMoWG6xwsasS7dvOCk9ZObGacibcvBzeshLKs0R9zww4LK/Ne/eDiqqhwr6S9a3Bdd9c+H75kTS+pWW1V+hlnAe+2H566bvR2JKuau2ZkuIrAozYVRFs1SWzjOXXuqIBZBPnOYND/+VwBVCD3uoy4d9gtebIGxn2/wPRWw2w8LPVj3SpeAINt7qwjcFLqoTBJZAhIIQD/DQ== 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=Is3xwVFxiEU1h8vp0fsYjjleJNIonUKyg9/cFhc/5GNh/pfT6jRgW97tlFhA7nfBtZMxyZWREABNgDRo6fntl+WcF8Cbg8mXrdxjT1bWAqaElSvkKtvSTqKSXcaPCj+2Y5gEDVqYDKyRVL8ehlWBCGkD5l0W484XyQeLPB5NHCo= 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 VI1PR04MB4285.eurprd04.prod.outlook.com (2603:10a6:803:4a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19; Thu, 18 Nov 2021 10:08:19 +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; Thu, 18 Nov 2021 10:08:19 +0000 From: Daniel Baluta To: broonie@kernel.org, alsa-devel@alsa-project.org Subject: [PATCH v2 6/8] ASoC: SOF: mediatek: Add dai driver dsp ops callback for mt8195 Date: Thu, 18 Nov 2021 12:07:47 +0200 Message-Id: <20211118100749.54628-7-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211118100749.54628-1-daniel.baluta@oss.nxp.com> References: <20211118100749.54628-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: AM4PR0902CA0008.eurprd09.prod.outlook.com (2603:10a6:200:9b::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:863d:d4f3:969f:6fa) by AM4PR0902CA0008.eurprd09.prod.outlook.com (2603:10a6:200:9b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Thu, 18 Nov 2021 10:08:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6fa336a2-d635-4222-2cd5-08d9aa7b5869 X-MS-TrafficTypeDiagnostic: VI1PR04MB4285: 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: ugQn4vJJfLzhVzXIj+7ZDCJrFPMNt4UrrzWEYEPouYlOy0ATC0je/I/+98DOF2v+Q8lhRXwzyx2btY2DrHYFGHDgaqopYiTixeMDxnu1RhG6Hpaf0yYgEABVWXwusZZ+kmATHz3JzZ6v1eDpI2cu1HP+r4y3+EjVsy2FxTAGxu/KszsDVOBPN4Xtph6HmGJOGcpe8z9jmuH/6vAHyqK5DpzCB6BZ51hlHhYRsf/LsBjqCBq0a2tCS4l5lk1gUGIYeHF7SjZyK60FFMZXlJtbmJLq/fBQA6scKliCe8bmbCdjy70YG0N1vJPJLFZlT+V0B5SSp3P2vjCMJH2yPkE0RCiuJjxkG2INbd/W5qfoSFFLla8QHOuZ/yLhrjJd33NKNfJFQ8Iu0GyYfuLxbp6vgYdISmqPfrPOzp5A9aqfDTqObwhOaTG3E1Ig1g9XJ7+7loDrCHK1cgZJ9uVTrRvS2y8tLbUE3Oey6WRDceTWleoisOFJrf63NhmQYJAl2wBNW1XajpFPZ7ebQsO4Rb6MAbrzXwRqJgtCH+R8SvIPGCE8CdqtqDeY/fmVQoPgY6MK5nqx5CYCapHrB81QDS9lWhViGBS5yLTavvzUFbsfK7F9hKpYi7HRT8BsQNBrux77NWdwg4DchSdRXg1xPbNFyw== 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)(186003)(54906003)(8676002)(2616005)(4326008)(44832011)(86362001)(7416002)(38100700002)(316002)(508600001)(2906002)(52116002)(6506007)(6486002)(1076003)(6666004)(66556008)(8936002)(66946007)(66476007)(5660300002)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?KAC5MUHgLrdNuGKSsepXZdKlT1hU?= =?utf-8?q?8o/XMVuce7m96PV0AgV82URO9LOA4NAzWHptatsPa7HKx+JK8K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USTuLdEpJvt4yfioJ5hJBl?= =?utf-8?q?EssZl+ssXPQ0oSJp2YRTRtDEm5Mdmcg/h6yo7RYKwoFR9YDoQpJsd+OFoar4YvBoJ?= =?utf-8?q?KuXFZZwXxIWUXdMLpgUqs/6HDBYOFm5HgYcy58OsvQ/sz8RCm+QSW8Zk8rlzHfaEQ?= =?utf-8?q?der+3+cVyNBw87l/t+WtO77TrNmKcwp4e8pzU2qOp7y7Y2eUi9jR/ubQ5pAopxy+A?= =?utf-8?q?6CVzjDEVIwHzdRqUpWnV7pmCeKFOvljQZ/4q+iGJbVUNPYm+yfQSb5DXjh0XxiQwr?= =?utf-8?q?7Uq3+3IQochJGzy2zEaadWBpIhwt3FLltqczNNdCgSln6H8n2W9MbjzqxDNZoPegE?= =?utf-8?q?RtglhjOYpwe2kaZATZBVvDiM9hmMNMkWJ+qvp2xdiA+hEBdr7MBEUmUqViGUgfumP?= =?utf-8?q?VATK5qLcPDYGHdzC2faeeiV86+SOLHOmuJUu87/GyVWtw7RlXktHsrrhZflaGIxVy?= =?utf-8?q?5oUpX3/o9xtMLRS1tLG5uK9C/een6VQwB2tbVvpde0wHvh6NYyzmZYtunEqeQOaWM?= =?utf-8?q?q/EdKoUa3tmzXCMQWGTr8yrXYbwFOVIs80qvvTDzdEb2WzUIaO+lmsvgP5f69/uJR?= =?utf-8?q?W4OQylaSppW2Gw/w1BsrsOPxM7rheqy+BQJPcwblBlKd4UBKo10PKLp08VTIvSNYx?= =?utf-8?q?nYQb0T2EM9sqxwr/WZdklYrdEuKn3EsYa9REfBLEqPO5RSFc3/e0Ro=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6fa336a2-d635-4222-2cd5-08d9aa7b5869 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2021 10:08:19.3111 (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: mw1okgv/b+UL46B6IWFKv8VCDYMgqXp5MLbgfGuQtbVPTW8GEhaAw6zf/b1diNaidRhcJ19YVINDLiRvkKk3VQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4285 Cc: Guennadi Liakhovetski , daniel.baluta@gmail.com, Kai Vehmanen , lgirdwood@gmail.com, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, linux-mediatek@lists.infradead.org, Ranjani Sridharan , yc.hung@mediatek.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 Acked-by: AngeloGioacchino Del Regno --- 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 |