diff options
| author | Chancel Liu <chancel.liu@nxp.com> | 2025-11-27 11:26:51 +0900 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-11-28 11:47:48 +0000 |
| commit | e04aab96b3776634ab37ddce6d50a431126edec3 (patch) | |
| tree | fdb5580457e01f8b623a1f04d846f758bc7fb664 | |
| parent | a76e1d951f530385ef8e62ed904a496d3203045d (diff) | |
ASoC: fsl_micfil: Add default quality for different platforms
Add a default quality flag in soc data. For i.MX8MP/93/943 platforms on
which range control is constrained, set medium quality by default to
achieve better audio performance and wider adjustable range control.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://patch.msgid.link/20251127022652.674574-2-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/fsl/fsl_micfil.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index 1ea543863101..86678fee7a57 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -92,6 +92,7 @@ struct fsl_micfil_soc_data { bool volume_sx; u64 formats; int fifo_offset; + enum quality default_quality; }; static struct fsl_micfil_soc_data fsl_micfil_imx8mm = { @@ -102,6 +103,7 @@ static struct fsl_micfil_soc_data fsl_micfil_imx8mm = { .formats = SNDRV_PCM_FMTBIT_S16_LE, .volume_sx = true, .fifo_offset = 0, + .default_quality = QUALITY_VLOW0, }; static struct fsl_micfil_soc_data fsl_micfil_imx8mp = { @@ -112,6 +114,7 @@ static struct fsl_micfil_soc_data fsl_micfil_imx8mp = { .formats = SNDRV_PCM_FMTBIT_S32_LE, .volume_sx = false, .fifo_offset = 0, + .default_quality = QUALITY_MEDIUM, }; static struct fsl_micfil_soc_data fsl_micfil_imx93 = { @@ -124,6 +127,7 @@ static struct fsl_micfil_soc_data fsl_micfil_imx93 = { .use_verid = true, .volume_sx = false, .fifo_offset = 0, + .default_quality = QUALITY_MEDIUM, }; static struct fsl_micfil_soc_data fsl_micfil_imx943 = { @@ -136,6 +140,7 @@ static struct fsl_micfil_soc_data fsl_micfil_imx943 = { .use_verid = true, .volume_sx = false, .fifo_offset = -4, + .default_quality = QUALITY_MEDIUM, }; static const struct of_device_id fsl_micfil_dt_ids[] = { @@ -892,7 +897,7 @@ static int fsl_micfil_dai_probe(struct snd_soc_dai *cpu_dai) unsigned int val = 0; int ret, i; - micfil->quality = QUALITY_VLOW0; + micfil->quality = micfil->soc->default_quality; micfil->card = cpu_dai->component->card; /* set default gain to 2 */ |
