On Thu, Nov 27, 2025 at 10:27 AM Chancel Liu <[email protected]> wrote: > > 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 <[email protected]>
Acked-by: Shengjiu Wang <[email protected]> Best regards Shengjiu wang > --- > sound/soc/fsl/fsl_micfil.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > 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 */ > -- > 2.50.1 >
