Message ID | 20230104023953.2973362-4-chancel.liu@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4930756wrt; Tue, 3 Jan 2023 18:42:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXs6a00wZIWzhBVNpCCHIZlLGqswGMGgvYw3hB9vxYEUDKfj/YZEM6r5jXHQLZ1ZmsT3ws/0 X-Received: by 2002:a05:6a20:6daf:b0:b0:76a:51ab with SMTP id gl47-20020a056a206daf00b000b0076a51abmr62853937pzb.26.1672800139294; Tue, 03 Jan 2023 18:42:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1672800139; cv=pass; d=google.com; s=arc-20160816; b=YblXgW9E9L3+4BUMQzv1xQHXwX+k0qyw5OwEANDNlgDk6FaZPXsX7+roI2+lvZWDxm hXaKUTWEv76+zHhc9A9JEH+Iz8oE300SePilMZVn407kX275A9hgGou0nMhLdH4G7fh4 Y6hEJ/oD+q9lb+dC2JPdyrpSeN2+D6qFtEnSuOoM2eHi/zpG0VlBUCdgvou+yxmuvQMA yEUYyAUzYdSDgukjcSBT5m0vZ+hf43n2cFpq9TEjFe5TxEKrCrMG6nQyb/uz3VPsitdH voA9YGthuPWy1oxf0AQkyWsUVbPqz5e3h+/m7eMgAMlocwrawBuxintc98OqSKzak555 EE5g== 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=jfqqfKq+p5L47STbaiUShceGluBUv/TPjceQ6WfftIM=; b=aqvuhWZU8EGrcCUCcVbMExGugpJP690S7kV0jAH7Le1dk/VFADGh6QGgwQpbTXPKw7 v2Lwukfj/xQnePQhg6kwful3UOTQrHYid8JlFV864i2hv+66lKFM01QrSVOYJd5ZfXED IN//cmLh128bxsDTXQqBx9HZBBXc1jP/KINpZK0sVIsiPqDLUbGlKTVUp3Ic0+Yfarr9 ZmSIQFb3eH9dI7NK5j2xZlf2v6uX5zPzRjjAOG2Vc54nfrhc8x4NQgjdTIF0zy1y1xMk l4qgetPsLCeGYrqwAUjVDiAA06q1I+5UCWWjBlmpKFz/hmlrBBuB4u4zQPR13zMCsny3 pFzg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=lhoeWhxV; 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 v19-20020a63d553000000b004782b471222si33222385pgi.223.2023.01.03.18.42.07; Tue, 03 Jan 2023 18:42:19 -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=lhoeWhxV; 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 S234505AbjADCkj (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Tue, 3 Jan 2023 21:40:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234251AbjADCkf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Jan 2023 21:40:35 -0500 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2073.outbound.protection.outlook.com [40.107.8.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF30225D0; Tue, 3 Jan 2023 18:40:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JWrQ1v8i3t/NN2rzP+vRPtodLcUkVkvY9CMQ8MLAuZRMdy3wO7d6teY2zIeDGhd5CdeJ9uZTc/ZT3TlzfsIGQW/TNUE4jzoeUlq1e5VmBQllG2jou4JlmSW42Vzkr1kpPJPm13scQv/K4/0+trppL6If6m/r1oW7h3WJcak2DjpOP+ED3z5fhNDurwavZRfjCJztrU1n+U58UboGn5a3H7BQy5W34D5vM/BsHQqR+/BNgZ42T2VMKsJ1kMD/5g0RfwTXR019wAUVObgs57Ye092IbocqUbwnX14mOdhBYe7PPWd/AkJfTDE1rH1s3yVFkdUTKbM2BIPIGKVy3xe/Ig== 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=jfqqfKq+p5L47STbaiUShceGluBUv/TPjceQ6WfftIM=; b=EBxI14q1YL4DazbFnFhDO7iWb0nQ8ZYWaF5NutNqBQXIj3eOWcitSJaiumCZIH1lWn+Xtl2X0q2Ueh6W6SGxA+oMIBLDVKR0sU7QX0ly/EYUSrokI+F9saTjmwZrGD5m4KZVJJEuhAkFumkS6n2nfbfJMSElvou1s0Fx16xyf/vB19nkp9wfGgpbd4w7hppVfqHZOed64jqnMMRwikTpLVxdc/zJsQkDsX49YTvBgW3OmEsGGSwPvugQCn7umfSbIPPfdcFN4KQTWNJRtEjzHOgu8R3cmFqOlS3+eTjlnVLVdEff+gDWF6JB1nIUOtZIW1e2tNt/WN5YzBhj/HoxGA== 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=jfqqfKq+p5L47STbaiUShceGluBUv/TPjceQ6WfftIM=; b=lhoeWhxVfwBtJ9Ij2fWglthZe69BPN1bALFBfKoPHlfxtAGe9vzrCrY0GvPnpvRl3Q2YNyS7FPiFa8dqXDfHtmy7JzeK225wFXTOReFs/FIAPZxCzG/E2TAhBtgccV1JvpSIWBYbKwILEaoILyGwhll8lbwsEO6drdnsViWV2Zk= 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 PAXPR04MB8491.eurprd04.prod.outlook.com (2603:10a6:102:1df::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Wed, 4 Jan 2023 02:40:31 +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.5944.018; Wed, 4 Jan 2023 02:40:31 +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: [RESEND v2 3/3] ASoC: fsl_xcvr: Add constraints of period size while using eDMA Date: Wed, 4 Jan 2023 10:39:53 +0800 Message-Id: <20230104023953.2973362-4-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230104023953.2973362-1-chancel.liu@nxp.com> References: <20230104023953.2973362-1-chancel.liu@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0130.apcprd02.prod.outlook.com (2603:1096:4:188::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_|PAXPR04MB8491:EE_ X-MS-Office365-Filtering-Correlation-Id: deb709da-4e7e-457d-f6e6-08daedfd0c1c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2y5t+7/Zfok6umTtS7E7NBqtige4x8338vyycTDikSGMTyDd3vBYuvQAwg20XgFA83dVjrJKvKfJaa9gajxqqIq4dWRNgf7WsCGY+a9cciMAECiz2k+yJox+ZNO5D5fO/BtcfernsO7EDcbnpRfhU702E1L1yytmKLqMZ3b6CC5/xL/F0y8NxC4PRpbUG5aRUK9fgQKECd+NRrsYxez6OLvekBQch7ldnQ7a7afIw28PjJ4hTdIMVDaSUNclgMv2Bn5NpOXTiQzaVZS7EJ7kxOGw75j9INgYiuU8eQLlZ+Z4FbhQCFFS4MbmiBqX6QQ2Wctz2k2acRSnhMvyn4xX77LUy/2m7StwnMFTyHFdPschEfHItXgpmc1zvyCUab0l1ACilT35pGTCGtH2fpwCuaCgdbQJDedewhwAP7lMUf7Y1DbjcHgJOzQHT27YF9JC3EIUwUTvAXX8VjbK8rIs3ssEugyNazQhMvRoxRbtHajLjG+dyhZaAQW44SG2voqjtG8lYIQk5BIiINeiGt9QTO0ynj9uRPBnrYvSdYercNCCC6W9ELGIdavj+OSeibNTkxFiqwV14k8RZKytWrZUvNqD5y7n8QpYXjv897UmQ8jvY6zdJezu2yZOS29xwKjXrpFoehkbbEq9B7+ENkuN+tUwusxG3W/CZ+zR6RoiOedTZA9qi+zHNv6JfoWDxmm6EefPA/zfFsJhbC34MOf89A== 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)(136003)(39860400002)(376002)(346002)(366004)(396003)(451199015)(8936002)(7416002)(41300700001)(8676002)(4326008)(66476007)(5660300002)(66946007)(66556008)(44832011)(316002)(2906002)(6506007)(52116002)(6512007)(6486002)(26005)(186003)(478600001)(6666004)(86362001)(1076003)(2616005)(921005)(38350700002)(38100700002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZEg6KyT26XnxtLUr5ruWoIxFCwr42QOYmsuE0WV8Y1SnyWljZPpjz3GvoNifqfTyoRaWhta2cGQG20JmEdpNAD9PP1b2gjv6ZFU9SvzQDJ7szU16cwtN2FpZNXBeX2YhpCqiOTxyQupr1nuzajgM0DbeI3kqcpBwvb05HRI/w8gATHbGjU/85cknXeSVnAnnzw4F4yGNskF4qSfTVKfF/tFgEtmPSL/9ZWfpp0uqq5B9nEhJKqSc4ZyHIkuGaQtbr2o/RiBHI8pf/B441GercUypeQt94B8mHadj+gSNy62S1WE8TVYDOMqUR6k1dBQx6yw0H9S9tKedEqpEUUxcJXdU7Jr75e1mW8zQ06fneoZb17sgXTUmVKQLUVYy2UIJ3334RiImp9XlIGUJYtb5jvroYKnQsLt0hCarvEQ9IhTNe6OmXh0W6lA1t+P2y2Ghd3sgSNEXs1Mnx8mCquz2ROPevBkUniK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TYy+bXGtzkt6exUT0lx/fu7e X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: deb709da-4e7e-457d-f6e6-08daedfd0c1c X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4211.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2023 02:40:31.6298 (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: 1m3vuzFTrsF5hhBP9WhWG4dgbzUxj2jlJ0P/d9mFvHjoTNA3eBOU22diDLhhyrHQ3TtfoVYp5gHJCHqM5ex/Ww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8491 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?1754058079086685159?= X-GMAIL-MSGID: =?utf-8?q?1754058079086685159?= |
Series |
Add support for XCVR on i.MX93 platform
|
|
Commit Message
Chancel Liu
Jan. 4, 2023, 2:39 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 b794158a7876..2a78243df752 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[] = {