Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1088814iog; Mon, 13 Jun 2022 21:28:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR3RX/7g2vsJJgeboSeGCltpJKkDZ72FhheLBQUubnALia40cq3MYc020We3+WKO699oFp X-Received: by 2002:a05:6a00:1a8f:b0:51c:2f82:cdba with SMTP id e15-20020a056a001a8f00b0051c2f82cdbamr2655785pfv.85.1655180918120; Mon, 13 Jun 2022 21:28:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655180918; cv=none; d=google.com; s=arc-20160816; b=QitJsGcjOQ24g66eQZLBS5xKkYLS1506B3+bsRNsCEK9GH66RDhvtXODRCJSY/sa3Z Z0jFswF2ooJRCMGTJ/YxSIs014kL+t/vbasOsvDLSNqvyxmsEzmtZk5uC6d89krCNV0Z b688h11uiKHTFv5o2/zrPCwH22KiGX7J/pLuWa/zT9XclqjjFOoeYmH+yPivHapCPiBI AIhYiykZGQb9K8fB4erMzIANaYK+S0OshqQc6X0iRuTlykErxwn+vOVQZ2heMG0KYa06 m5oEg/cfBNEeHovrLzBbJ7qIclveZGiYQGcSaQ++wJVvCo8x+CCBAviebIo5wLlbc9tZ +Z8A== 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=BrlRLbdhexjs4fqCDnt2wRUVtV/RC+f4vFk8PEsjLuBovTsbAeIP+gbqiH5NrJ2ekY qDZ3d2sREW0FOfnsndxW/15ufk3m71xwPhz4BXqBWUhnE5+QGXQefqDc5xrS2hS145pw TiJs9MkybC1eSgdTGhgJat/LMuDwF1weuds8xLv7VFQGiAngOg31KFgIdY92ryif4MSg iC/G/GYl+vB8HC9ffoIXZeJiL73VN2p5DxvIUkG5Vj8UNcMWwryIAa3EeHV9tCI4qSCF OQmNeWUgOllNyddE+KLTMjfZyZLk9vp8d8EZWBLqtIGvo0dvEspybzaj0yXL7aXtRdWw qUkw== 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 g62-20020a636b41000000b0039cf6c5573csi11476965pgc.844.2022.06.13.21.28.25; Mon, 13 Jun 2022 21:28:38 -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 S1351660AbiFNE0K (ORCPT + 99 others); Tue, 14 Jun 2022 00:26:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349712AbiFNEZf (ORCPT ); Tue, 14 Jun 2022 00:25:35 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C7B02AC52; Mon, 13 Jun 2022 21:25:34 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A215C2026FE; Tue, 14 Jun 2022 06:25:32 +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 57D96202717; Tue, 14 Jun 2022 06:25:32 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 720D8180219B; Tue, 14 Jun 2022 12:25:30 +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 3/7] ASoC: fsl_sai: Add support for more sample rates Date: Tue, 14 Jun 2022 12:11:20 +0800 Message-Id: <1655179884-12278-4-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1655179884-12278-1-git-send-email-shengjiu.wang@nxp.com> References: <1655179884-12278-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