[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b220ba87a89cd4d0d876800efac9bb761f98bd70.1583039752.git.shengjiu.wang@nxp.com>
Date: Sun, 1 Mar 2020 13:24:14 +0800
From: Shengjiu Wang <shengjiu.wang@....com>
To: timur@...nel.org, nicoleotsuka@...il.com, Xiubo.Lee@...il.com,
festevam@...il.com, broonie@...nel.org,
alsa-devel@...a-project.org, lgirdwood@...il.com, perex@...ex.cz,
tiwai@...e.com, robh+dt@...nel.org, mark.rutland@....com,
devicetree@...r.kernel.org, shawnguo@...nel.org,
s.hauer@...gutronix.de, kernel@...gutronix.de, linux-imx@....com,
linux-arm-kernel@...ts.infradead.org
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: [PATCH v4 3/8] ASoC: fsl-asoc-card: Change asrc-width to asrc-format
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 <shengjiu.wang@....com>
---
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
Powered by blists - more mailing lists