Message ID | 20221222073618.1064415-4-chancel.liu@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp188721wrn; Wed, 21 Dec 2022 23:44:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXsYPuL7FXZ6gPxcvqi3HOvhjeMisRcoit8a338D1gmwX6FhYH9yTKS2ThZ1dtPHNTAw1/pK X-Received: by 2002:a17:906:ecf7:b0:7c4:f6e4:3e92 with SMTP id qt23-20020a170906ecf700b007c4f6e43e92mr7952980ejb.31.1671695071182; Wed, 21 Dec 2022 23:44:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1671695071; cv=pass; d=google.com; s=arc-20160816; b=WQSysKNI3x7S9UD6f3sySUkrEm/GmzDD8L6wrSTAqgxURAWQsI1+kPOfwq3Tmeqq/m P/reIlB8S5XpmYrAhIEwOMHORCgmsbksczx/7IFwZgIybuCzZT2OGAWq2u3tSu9j1FKs nUNl4WX2X4Kl2jBxZn1Gn+Pe/fbeqUFRbcfb/CQ8q/ixpqR1XDes+1IjRGRr+rzFhYtY cZ7XK6MxO0AaN+ssT/FjLZVBpisHgS+00j1c7cv0EJbOU/Kec2qyMK7a6Q5eZ1QUwZVu DPH92bzNGyq8mTXc4ZUDA1S+Pe8phHwuQt3VxuMkDEDVb/rdcCAG+EuDZ8dciE0bG24o jetA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hegXW4IkTRNCp/QL2Fb493fkmLJRkeLVs83hlQZq6Ts=; b=pbY5IUFn2LusJ7CAV0LsVXAHLgWwZ0ZsLe2u4PqLjJzVh+N3/ABwQUuvI/BZ4mnyzZ l5bxNS3ZXRv5HTLYR/LEIHN+QZyt7XgBR/M7nmhKzYUfXtLRg+QKgeJtKfMr6IKwW++x XG+g1JarKag1Ti2DtWnRdGhc8EwUmXq5nqTLlFx0FxccoQKqgoMqGrrzj5rvKM//SRMd xB/HqzZ/dBiIsgbLkWDR1idDJULHRKjj1yzIeGZdAAD7NzSY8USnCpjA0rMnDMETTW+h Coyit+LksKhr+Js4rFp/AmaMukKBpompLcnc8MZeI2HWD5xIMJ/8dxQ6h8UQx6BYSv5B j5lg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=RAQDSDDx; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i23-20020a1709061cd700b007c0e15c30b0si13464628ejh.777.2022.12.21.23.44.06; Wed, 21 Dec 2022 23:44:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=RAQDSDDx; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235084AbiLVHiZ (ORCPT <rfc822;pacteraone@gmail.com> + 99 others); Thu, 22 Dec 2022 02:38:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234973AbiLVHiG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 22 Dec 2022 02:38:06 -0500 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2085.outbound.protection.outlook.com [40.107.249.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4210323EB9; Wed, 21 Dec 2022 23:38:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EFhYMSk22jKqRO0uqn5xQO9SuciKMZzV2DSW2dI7Xb+WiM9TmY5ALZw68JQrDzB8UFnxQ8fsmYTzPT5NgGmpUa/F1IKfdwLzUrkgoEEb46JkkUj5ZMtLMkL9pslOK3IofXvxLRcnKbFa6w/rcGak5zYpytSHhImQsM2Wgllj1ld8oCaXbhmSLY/JVQ1q4ZHJjiD5xXTDJkUtWRJuMeVY/17a28cxkiEDtcYtNGxraJrrhb2DnJd4GGT6ZrrszseNzioC+NT4CZODlYsIzKsQ2+aCHwSzgnvie6JppBugNN51rCWxg4EWElx6NUh6crzFsT4bP9/UvwddOJs5ijOeUA== 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=hegXW4IkTRNCp/QL2Fb493fkmLJRkeLVs83hlQZq6Ts=; b=bl30NHTxP06i66mMGjxBNzRP8bhGlHR7RwErOMoy/T6MEZrI7m1QFYlshUxsB8yR+3Wb46L6ReOUL15a22yWsqyb1wSOCBuhw1XLOfwRZRVhHDTXb4XRjNOQkpmJvfNKq3cM1rO7P85ODUiB5APKCC1O1qJ0PdgrG4Wis9SswCq+VsnoYweSpVqbz+ycYXVNyNw6Mdwa4OwaFGVnJk755oNTfqAhi0J2HN6v58aK8Qslq3iE3h2I8SIDNKLIYZQe21OhgHaGK4fnUemOwE229o7Lq2o0ynPmleyjJrrQaGcdzehLRMCuMPK7zH6ZI/t2USzYoxumVGqSRS3g/cJ+Vw== 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=hegXW4IkTRNCp/QL2Fb493fkmLJRkeLVs83hlQZq6Ts=; b=RAQDSDDxOcfDRKGXoixEMpoH09r/0sXfHQDbHiM+1DOkZGElhzXFt1yZRNw+llsDgw8QJNo4vWdjxrPNaZRIP4erGwLfvCbTAkg5YfHNrTzGcjFhILbpi15+s85u0k7APNwnr3P6tPevtBzHPTZSF32ujY4QpF5+pfv5iRsnIv4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (2603:10a6:208:5b::30) by DBAPR04MB7272.eurprd04.prod.outlook.com (2603:10a6:10:1ad::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Thu, 22 Dec 2022 07:38:04 +0000 Received: from AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::c1e7:eafb:408c:6ae5]) by AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::c1e7:eafb:408c:6ae5%4]) with mapi id 15.20.5924.016; Thu, 22 Dec 2022 07:38:04 +0000 From: Chancel Liu <chancel.liu@nxp.com> To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, perex@perex.cz, tiwai@suse.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Chancel Liu <chancel.liu@nxp.com> Subject: [PATCH 3/3] ASoC: fsl_xcvr: Add constraints of period size while using eDMA Date: Thu, 22 Dec 2022 15:36:18 +0800 Message-Id: <20221222073618.1064415-4-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222073618.1064415-1-chancel.liu@nxp.com> References: <20221222073618.1064415-1-chancel.liu@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI1PR02CA0035.apcprd02.prod.outlook.com (2603:1096:4:1f6::8) To AM0PR04MB4211.eurprd04.prod.outlook.com (2603:10a6:208:5b::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB4211:EE_|DBAPR04MB7272:EE_ X-MS-Office365-Filtering-Correlation-Id: 3dddba45-6f4d-4a02-a9a7-08dae3ef75d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TtIcRh9jAShnfrGotjDG1GvYwIkjkxg4gGvUa+hz2rdB8NQ6B9rREtHj8PJRd8DzPRzjaa2IqU2skf4t1AO3E2gGsnOP3l5uNJSB+FpuFAjr3WHbo+KB52jqr07UzH4hrlXSkS6KZnNSi58MwGdO6g8wpAOBAdVlB0C+LP6/Ym2SHPR6zvqSccmwrQ19G8qwXPevC6r0ycqbzSLc1MeZe/7EU/Ng9F6F7RbW3LF/PV/VdYFxD+HlnpFsQ6QZCZtTSD+zwe+zCha4wcpHiawErMq9Me5+WNOH8uh4+ap+cMfaLgPHXXQZ5GyaKe7Ie/s3xag9rBIW0svl+sc1oJfptrT8VlJQ8fydamyp5GAeBgxDlaAJgDTOqOOgFLipCkthAIox34BH7n4iiyMsvupnQIaxsKY0JIsinugRZ/7pHYgt2UD/nqZtmJQz5aWkYBgmiLiAlRVKm0bs/2S6lghwDDqNck9HITBjxJgDZ0Ta4gKbzyJk4wtIMCA8GMRrTcxWcR1JDs6/tZ49ik2j5zmDQGan6EaOFhVluath8c0JWB2kuRG1/tfM/EO8oX50xL/so32+p2hQe6LFeVp1asqXXxmGpQ6WC+fLTlWG7vFzlJvqGiL8YiKj9B/S4K12KPlj1TpfIqBwxX3xXdjd8d6SkE0fTiOJOzPjJjwCeXXJxDBNFhcYbcGde4brigUSpZSnUcYrZxtcjIVlvzGqb4CmzA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB4211.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(376002)(346002)(366004)(136003)(396003)(451199015)(41300700001)(2906002)(8936002)(4326008)(66476007)(66946007)(66556008)(44832011)(7416002)(86362001)(8676002)(316002)(5660300002)(921005)(6506007)(186003)(6512007)(26005)(38100700002)(38350700002)(52116002)(6666004)(36756003)(2616005)(1076003)(6486002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GUhl0JqA6d2FRIiGdgaS3631MzzIoSAYV8bR2fwKkszq+byEFoPY/+Ie+bbCI98Wj/AZX6js8DCqHU+Bf1+gUONqN94jrCtMcnZQTgrSYwdKx5n2hBnUipvRlTBPsEV4o5MzHjmyZLqOcTv/pAr5mqeBopaZaUprXuBZa4ZEKcXS/IkTO5vZuKvIKLAEsM/70C43+RcHFmqrQI3SQ4md/GITGORcQ2v7+7jIblQKD/4Qc1MHRcyQ1qrUiN0CG35Qaw5FPMP80Xt4pIH+wUvXX9KaDuXHQz5gMK0oYBUcQJCTCSt6PwDLUSt+fsb61shNgLqQ5sns9gVeec8ka4iAAbLqUVxOg4g5OD/EYV66zrJr9YGe9W49kjwGHuOb6pm2jiszR62OqLJD9fG3Gpy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j4CrTaIvTx68RzO2C1++BaH9opQPVI/WNEboddiCdshzGntmJQgAmjvZUtkVu1JiMhAu+Q1+X6xTQ9vbESkkreyCaqgedDWOwv+1q6c6y3Ad4SPC+ZK85EFQCfPaWZo219eh X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3dddba45-6f4d-4a02-a9a7-08dae3ef75d8 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4211.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2022 07:38:04.3449 (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: wPCPrFZw4HP76xFMDrE2NAHU/MMtmvN3lejUQtKErgLS6u8jbhnYZLc5HRru1Y9FcUfP2kUnvfpJoOC9WV2luw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7272 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752899330525955185?= X-GMAIL-MSGID: =?utf-8?q?1752899330525955185?= |
Series |
Add support for XCVR on i.MX93 platform
|
|
Commit Message
Chancel Liu
Dec. 22, 2022, 7:36 a.m. UTC
eDMA on i.MX93 platform requires the period size to be multiple of
maxburst.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
sound/soc/fsl/fsl_xcvr.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index c87ae864df77..bb03c04bae9c 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -22,6 +22,7 @@ struct fsl_xcvr_soc_data { const char *fw_name; bool spdif_only; + bool use_edma; }; struct fsl_xcvr { @@ -538,6 +539,16 @@ static int fsl_xcvr_startup(struct snd_pcm_substream *substream, return -EBUSY; } + /* + * EDMA controller needs period size to be a multiple of + * tx/rx maxburst + */ + if (xcvr->soc_data->use_edma) + snd_pcm_hw_constraint_step(substream->runtime, 0, + SNDRV_PCM_HW_PARAM_PERIOD_SIZE, + tx ? xcvr->dma_prms_tx.maxburst : + xcvr->dma_prms_rx.maxburst); + switch (xcvr->mode) { case FSL_XCVR_MODE_SPDIF: case FSL_XCVR_MODE_ARC: @@ -1207,6 +1218,7 @@ static const struct fsl_xcvr_soc_data fsl_xcvr_imx8mp_data = { static const struct fsl_xcvr_soc_data fsl_xcvr_imx93_data = { .spdif_only = true, + .use_edma = true, }; static const struct of_device_id fsl_xcvr_dt_ids[] = {