From patchwork Fri Sep 27 01:46:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengjiu Wang X-Patchwork-Id: 174569 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp2862752ill; Thu, 26 Sep 2019 18:48:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeWFdCQVUwzz/spf/oCefxBNPtjGhXBdXz6+HpOi7RCPHIHAQkJ6I7PK8AiAmn5CjsZu6g X-Received: by 2002:a50:979b:: with SMTP id e27mr1950804edb.173.1569548899811; Thu, 26 Sep 2019 18:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569548899; cv=none; d=google.com; s=arc-20160816; b=cEDiDzxuOUGsrrS2MqDqTO6d3NQk3t1IZamDgTsEFEPfQAiUpssl2h8LDMTl3NkMXx HIPtaXhP2tSAp19/o5rib7wTQXtqXDmG7b5JumWSg8NHsC/9sIHLFh+jubz4w1NLbwoO rp3aqlwxUmHoXXr5XFpjP0wzNRepd0drvQa3km+7mSptk7+Cq6xC0RA3MY57DDIfqEs4 w+rnBhphxSpbMOeh+kaUxAr85uP/zbaIjP5z7MrZKIoVQpBPO+Vcj1cYhZsTgW57nPfx MFsllI2hRoaL1pkNB1M3AEdQv8SqTdRoJDfmPbUP1JulfesJzQu2Z03gU94FcaZ0sibU 0sZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:to:from; bh=n3VsU1aBN2cfEJJpHMaELkGxoJWaJdn9iiz7yJFQ1jc=; b=d2u5ML+vMaccOScG1Xl9SZn3EzixQHo0DSTTD+N+/dGpvqCfv47NTuE8/wo33rCrGR bxnpmDT6mcr3pzrpSh2PoVb4bg+z6GCcgMZ/ItcV0+owUDHl2brJ7t6zu037l53zc7iX KFonwPuPt9DQ1NFMUSPwmErpogvJRl5uJxKKjND/Shltdn+2XBbq8j44sIubBQyZ9bNR LXSCPRdkEYmaQJ6t2FFDUUG0oMShoDxCYs6xORntXJnHDaKhxOXeJNjCOenRuqi2+nWI oK5Gt3Sg3+SpW8wnKlXKD0/NLrGpp16EPbmuSl/X2NuBrQPQvVH+VK7dF3dsG9k4hThL v7kA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f43si721390edf.422.2019.09.26.18.48.19; Thu, 26 Sep 2019 18:48:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1727505AbfI0BsS (ORCPT + 8 others); Thu, 26 Sep 2019 21:48:18 -0400 Received: from inva020.nxp.com ([92.121.34.13]:51024 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbfI0BsG (ORCPT ); Thu, 26 Sep 2019 21:48:06 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 943BB1A0AB1; Fri, 27 Sep 2019 03:48:04 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 22ED21A02F3; Fri, 27 Sep 2019 03:47:58 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 0A8EF402EE; Fri, 27 Sep 2019 09:47:49 +0800 (SGT) From: Shengjiu Wang To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, lars@metafoo.de Subject: [PATCH V6 2/4] ASoC: fsl_asrc: update supported sample format Date: Fri, 27 Sep 2019 09:46:10 +0800 Message-Id: <45a7c383f43cc1dd9d0934846447aee653278c03.1569493933.git.shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: ClamAV using ClamSMTP Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The ASRC support 24bit/16bit/8bit input width, which is data width, not slot width. For the S20_3LE format, the data with is 20bit, slot width is 24bit, if we set ASRMCR1n.IWD to be 24bits, the result is the volume is lower than expected, it likes 24bit data right shift 4 bits So replace S20_3LE with S24_3LE in supported list and add S8 format in TX supported list Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen --- sound/soc/fsl/fsl_asrc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.21.0 diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 4d3804a1ea55..584badf956d2 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -624,7 +624,7 @@ static int fsl_asrc_dai_probe(struct snd_soc_dai *dai) #define FSL_ASRC_FORMATS (SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S16_LE | \ - SNDRV_PCM_FMTBIT_S20_3LE) + SNDRV_PCM_FMTBIT_S24_3LE) static struct snd_soc_dai_driver fsl_asrc_dai = { .probe = fsl_asrc_dai_probe, @@ -635,7 +635,8 @@ static struct snd_soc_dai_driver fsl_asrc_dai = { .rate_min = 5512, .rate_max = 192000, .rates = SNDRV_PCM_RATE_KNOT, - .formats = FSL_ASRC_FORMATS, + .formats = FSL_ASRC_FORMATS | + SNDRV_PCM_FMTBIT_S8, }, .capture = { .stream_name = "ASRC-Capture",