Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp179285iog; Fri, 17 Jun 2022 01:15:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1unp+n2n0ZMOEsFQVqOBmkIIc+WWdf+346CmPS8ZbUP8TR2zt+KlpWWyj2eefFhGhjHCyjk X-Received: by 2002:a17:902:a9c7:b0:168:ec21:2e25 with SMTP id b7-20020a170902a9c700b00168ec212e25mr8518987plr.24.1655453752634; Fri, 17 Jun 2022 01:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655453752; cv=none; d=google.com; s=arc-20160816; b=e1g7Du5UljAwwc1HxxRGEAQG0sXl7hsP9RIxQlc+dAr3gFTNB9Q5eWabbkDmF/F/Ht 2CQBi9nIXMNCTboeT3AV2ewo6rWh4kOk/pj/NXOv5iY+y8l5jmAJHvNEHfnbhN59bvYI uSXkAwBqDhQqzJ0SCqm5WClBo+F9srFpbxccw6Rb/mVJNc6aAhui4EbKEmIvtZfRj2GZ CLzJ4tFUaDGn0XyNsBOZy+mi117OjL7GbZbBAagVGHNhpkj2ArAww/YABuHdb1jN5M1H eEnkJ3KaQssumeY3Lc2CuoBL03u1vAUyT0Deuw6UbonQr9Nqmdaf6CYdWB9ktP2cS2a7 1C0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=Wg/YcStKNnmiTud9EOXn7GQ0Wo94BN7/I6QXbMedpWM=; b=CKwfoJuFSs5MvntU7ymFyeU1xg/kLdX5rr/SxhOSai2UEC9eDPj50kvwiUCfpnCuSx PcPSfNeFMlyQf2eupOl2QaIkk0fADXm+yFWragI9vhJA4jWqp4kNE29HCN/HpMkmGMkV LkzKFu3YJvbPEfXH5lKb5J9AQQ/VMuo+Z9GPh4/REW8qtsQoXe8buFa7miXbCnJsci8i 42HQL/voWTBYCSDrun3f8lJ3Ib3Gpqsqj1lnMC4KGHjboVDpIXIewiE1N9HdQIqu/lME TJlHjhImi0vFbFCgumKconbShsjOJZiowWqm3hy0USljqxIutRJjtJAI6J95CH5SvEqr B9Uw== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lk9-20020a17090b33c900b001e2f1fdfea6si9884617pjb.164.2022.06.17.01.15.37; Fri, 17 Jun 2022 01:15:52 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380751AbiFQH7Z (ORCPT + 99 others); Fri, 17 Jun 2022 03:59:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380702AbiFQH7V (ORCPT ); Fri, 17 Jun 2022 03:59:21 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E8DB5A2D8; Fri, 17 Jun 2022 00:59:20 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D230E201FAC; Fri, 17 Jun 2022 09:59:18 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 87E63201FA1; Fri, 17 Jun 2022 09:59:18 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 293381820F45; Fri, 17 Jun 2022 15:59:17 +0800 (+08) From: Shengjiu Wang To: nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, shengjiu.wang@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, robh+dt@kernel.org, krzk+dt@kernel.org, devicetree@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/7] ASoC: fsl_sai: Add support for more sample rates Date: Fri, 17 Jun 2022 15:44:33 +0800 Message-Id: <1655451877-16382-4-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1655451877-16382-1-git-send-email-shengjiu.wang@nxp.com> References: <1655451877-16382-1-git-send-email-shengjiu.wang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org Add support for more sample rates, because PDM format bitstream has higher sample rates. for example DSD512 format, the bit clock is 22.5792MHz, if the word width is U8_LE, then the max sample rate is 2822400. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_sai.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index d11ee3b6f163..9d2828b55c07 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -30,7 +30,8 @@ static const unsigned int fsl_sai_rates[] = { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, - 88200, 96000, 176400, 192000 + 88200, 96000, 176400, 192000, 352800, + 384000, 705600, 768000, 1411200, 2822400, }; static const struct snd_pcm_hw_constraint_list fsl_sai_rate_constraints = { @@ -763,7 +764,7 @@ static struct snd_soc_dai_driver fsl_sai_dai_template = { .channels_min = 1, .channels_max = 32, .rate_min = 8000, - .rate_max = 192000, + .rate_max = 2822400, .rates = SNDRV_PCM_RATE_KNOT, .formats = FSL_SAI_FORMATS, }, @@ -772,7 +773,7 @@ static struct snd_soc_dai_driver fsl_sai_dai_template = { .channels_min = 1, .channels_max = 32, .rate_min = 8000, - .rate_max = 192000, + .rate_max = 2822400, .rates = SNDRV_PCM_RATE_KNOT, .formats = FSL_SAI_FORMATS, }, -- 2.17.1