Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp979136ybf; Sat, 29 Feb 2020 21:31:11 -0800 (PST) X-Google-Smtp-Source: APXvYqwiFnBdDameYYKKZEiNNUCIEvLiH2n46sHghEehVzaE11sIbIkE6V55J62deH633fqRamQj X-Received: by 2002:a54:4106:: with SMTP id l6mr7768269oic.76.1583040671421; Sat, 29 Feb 2020 21:31:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583040671; cv=none; d=google.com; s=arc-20160816; b=kejqY5+h9r0gdv/MNBVO/aJXCbmHuugCWSsWr7W5cxE06si9ilWnIa3DtsriCbB1UC n7TUIQOOC+7Y/KzHDbPGKw2nse60Dr15osOLK8ENlT1sSG9teDDRX32J4rf94GryH31L dgTzGpR6+eOEIQd1iI5TXsks/sAeyy66xxpBhdmLTnTTtYZfl91dIAfVX0qav9mJjBRr zW7EifMfHPzd3yu6XFLlysQk8roJJPfMgQl5wJo1xU64Js+4xgTovegE/a+iFB2/aXwv VH/OQLLYa1ep2HNFPIB6EgCDzYFY2WYcIPJ0aeaTUv8jwFUFZy2gfyVMmcvrWWRmgC9y 5r2A== 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:cc:to:from; bh=u9oy0ZFtCLVUl4EZW8MQmwIBKsT+2ublR0xP+utr2pI=; b=cIF7WN92SF54b/yd50+OC5QbF2bCPgtynuFWqUx7/bQ8DhEh0uePSW9x2GDH41ZDnR dPcnIDOKPPMMOla5Kpw2PUb7zAfQbwZu8fkjbD1vYDp0NZ+R/k07gvE6A8D1He5oalUQ AB9gY4WayA8G52jTdRdVNbegXOa7O3bWKQrGJWthx7OsUkc7KBQ9209h4DAtTsYjhXIL qAY3tPtE22Xmt6lFWrFs9PiEXQg+qmEK+nV/DavgZDL/8d21iRdzf6JpDB+Yjvs2+lw6 XCHEsmKZ0UjbnVggigFKj5QWVQmpaPAhjDMqYoXLO1Au6ExLEytML3Oc80DofR9Rzt8a NvVw== 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 z15si4378631otm.168.2020.02.29.21.30.58; Sat, 29 Feb 2020 21:31:11 -0800 (PST) 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 S1727138AbgCAFal (ORCPT + 99 others); Sun, 1 Mar 2020 00:30:41 -0500 Received: from inva021.nxp.com ([92.121.34.21]:56056 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727032AbgCAFak (ORCPT ); Sun, 1 Mar 2020 00:30:40 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 88E0C200A3A; Sun, 1 Mar 2020 06:30:38 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4453320062C; Sun, 1 Mar 2020 06:30:29 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 11D71402D5; Sun, 1 Mar 2020 13:30:18 +0800 (SGT) From: Shengjiu Wang To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org, alsa-devel@alsa-project.org, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 3/8] ASoC: fsl-asoc-card: Change asrc-width to asrc-format Date: Sun, 1 Mar 2020 13:24:14 +0800 Message-Id: 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 asrc_format is more inteligent, which is align with the alsa definition snd_pcm_format_t, we don't need to convert it to format in driver, and it can distinguish S24_LE & S24_3LE. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl-asoc-card.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 9ce55feaac22..ab21fa1cabf7 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -680,17 +680,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) goto asrc_fail; } - ret = of_property_read_u32(asrc_np, "fsl,asrc-width", &width); + ret = of_property_read_u32(asrc_np, "fsl,asrc-format", &priv->asrc_format); if (ret) { - dev_err(&pdev->dev, "failed to get output rate\n"); + dev_err(&pdev->dev, "failed to get output format\n"); ret = -EINVAL; goto asrc_fail; } - - if (width == 24) - priv->asrc_format = SNDRV_PCM_FORMAT_S24_LE; - else - priv->asrc_format = SNDRV_PCM_FORMAT_S16_LE; } /* Finish card registering */ -- 2.21.0