summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_micfil.c
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2020-01-16 14:30:24 +0800
committerShengjiu Wang <shengjiu.wang@nxp.com>2020-01-20 17:08:13 +0800
commit1de3e8edd923648fa7945d061ea727eaca6d348c (patch)
treea2e0140288692eb6a3a879e207a526cb8b7397b1 /sound/soc/fsl/fsl_micfil.c
parent93a53a2f8b5c4b76b5ac5c6ce0ddd03d25289b1e (diff)
MLK-23242-2: ASoC: fsl_micfil: Add support for imx8mp
The new features are: 1. The output is 24 more significative bits in 32bit slot 2. The fifo depth is 32 entries. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_micfil.c')
-rw-r--r--sound/soc/fsl/fsl_micfil.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 817ad689fa1b..db6a154b113f 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -70,6 +70,7 @@ struct fsl_micfil_soc_data {
unsigned int fifo_depth;
unsigned int dataline;
bool imx;
+ u64 formats;
};
static char *envp[] = {
@@ -82,10 +83,20 @@ static struct fsl_micfil_soc_data fsl_micfil_imx8mm = {
.fifos = 8,
.fifo_depth = 8,
.dataline = 0xf,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
+};
+
+static struct fsl_micfil_soc_data fsl_micfil_imx8mp = {
+ .imx = true,
+ .fifos = 8,
+ .fifo_depth = 32,
+ .dataline = 0xf,
+ .formats = SNDRV_PCM_FMTBIT_S32_LE,
};
static const struct of_device_id fsl_micfil_dt_ids[] = {
{ .compatible = "fsl,imx8mm-micfil", .data = &fsl_micfil_imx8mm },
+ { .compatible = "fsl,imx8mp-micfil", .data = &fsl_micfil_imx8mp },
{}
};
MODULE_DEVICE_TABLE(of, fsl_micfil_dt_ids);
@@ -2321,6 +2332,8 @@ static int fsl_micfil_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
+ fsl_micfil_dai.capture.formats = micfil->soc->formats;
+
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_micfil_component,
&fsl_micfil_dai, 1);
if (ret) {