From patchwork Thu Sep 19 12:11:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengjiu Wang X-Patchwork-Id: 174055 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp927491ill; Thu, 19 Sep 2019 05:13:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxItnVCHxLTQEd9zQ2g/84cxTWVvv92xxCQiwq3cdNQ9AHdeOp6nN9si8pco7lyfttm0sNh X-Received: by 2002:a17:906:b6d0:: with SMTP id ec16mr13947792ejb.206.1568895223613; Thu, 19 Sep 2019 05:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568895223; cv=none; d=google.com; s=arc-20160816; b=Qo/S/ECwXZQyytaaL4WdPFcLDgen4ExDna+xR06W+0E6CHcVp2D00YbUrJPrICUAyD Jk/P8r0Ybr9iCC4idJqMBOnMpZOPVxD5k3oOK4qbfdrhvGT7EPRi+54wq62hyOQtBuar fsh34IFsOKQPzl9OChd6twKOTTrNDwwa8rGQdvDPs2mNdAWqyheergqvUSC9qcyc7a9f noukbzFaSu8aNhRzht903H86N1S6P1Hdm5dcB0oGxmVUlTyZQvrJxo5vKBvGf2yfUMJ5 hoS9G/T25hUFalagwTCFqLRisZGODRq4/CJd7b8RdMJfdnxItJv3Nu7m3Ro+LhE2LJ3x 0gBg== 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=Ll0cZE5tqxg/EZlavNEPdlEmhKLtqwNmbsUoJUSra5Y=; b=ymH7q1PG3iBZYeXNO2MaBETbl6jPUPxPKwbVMDZi/0l9qBwN3tr1crFJlqCGMyo2Yi F9eR62v0egipFsu6Re7Mkw+VxC3J0RgjyFFPbCrK39RMqfVJ1Cnqjsx61lyk6NR8DmmJ sezGDD8NbDxHKH8ifseO4ucG7jSeUk31iWpwnC+JIxUa0+ZUZnKotFHLuwMeD639KsUM rbNUO/jh4gbeiu3zsRX3c9MQ7GtpcfpQMXJswVonY8KBGamjeTLWLNILROCDONZBRhfg PHbQhLPQNPpLXZKXARm9W89xJ8Ofde2qprszlaTh4QD08Dt/Id8Os4tUbpt+i25pkxuE 7Tjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f45si5110758eda.345.2019.09.19.05.13.43; Thu, 19 Sep 2019 05:13:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2390283AbfISMNi (ORCPT + 26 others); Thu, 19 Sep 2019 08:13:38 -0400 Received: from inva020.nxp.com ([92.121.34.13]:45788 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387417AbfISMNS (ORCPT ); Thu, 19 Sep 2019 08:13:18 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id CCCA71A03F0; Thu, 19 Sep 2019 14:13:16 +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 D4B471A0084; Thu, 19 Sep 2019 14:13:09 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 8FF7C402E6; Thu, 19 Sep 2019 20:13:01 +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 V3 2/4] ASoC: fsl_asrc: update supported sample format Date: Thu, 19 Sep 2019 20:11:40 +0800 Message-Id: <5811f393692a7668564fd4b9ef5708c1e3db8dc0.1568861098.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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- 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",