Message ID | 20250102123335.256698-2-yung-chuan.liao@linux.intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | ASoC: Intel: sof_sdw: Fix DMI match entries for a couple of Lenovo laptops | expand |
On 1/2/25 06:33, Bard Liao wrote: > From: Simon Trimmer <simont@opensource.cirrus.com> > > Update the DMI match for a Lenovo laptop to the new DMI identifier. > > This laptop ships with a different DMI identifier to what was expected, > and also has the DMICs connected to the host rather than the cs42l43 > codec. If the DMICs are connected to the host, isn't there NHLT information telling the OS how many dmics are connected? If yes, then the machine-level DMI quirk isn't really needed, all you would need is a rule that sets it unconditionally when mach->mach_params.dmic_num is non-zero > Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> > Fixes: 83c062ae81e8 ("ASoC: Intel: sof_sdw: Add quirks for some new Lenovo laptops") > Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> > Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> > Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> > --- > sound/soc/intel/boards/sof_sdw.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c > index 9f721b88e606..d054be360d28 100644 > --- a/sound/soc/intel/boards/sof_sdw.c > +++ b/sound/soc/intel/boards/sof_sdw.c > @@ -620,9 +620,9 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { > .callback = sof_sdw_quirk_cb, > .matches = { > DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > - DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "3832") > + DMI_MATCH(DMI_PRODUCT_NAME, "83LC") > }, > - .driver_data = (void *)(SOC_SDW_SIDECAR_AMPS), > + .driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC), > }, > { > .callback = sof_sdw_quirk_cb,
> -----Original Message----- > From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> > Sent: Friday, January 3, 2025 5:47 AM > To: Bard Liao <yung-chuan.liao@linux.intel.com>; broonie@kernel.org; > tiwai@suse.de > Cc: linux-sound@vger.kernel.org; Liao, Bard <bard.liao@intel.com> > Subject: Re: [PATCH 1/2] ASoC: Intel: sof_sdw: Fix DMI match for Lenovo 83LC > > > > On 1/2/25 06:33, Bard Liao wrote: > > From: Simon Trimmer <simont@opensource.cirrus.com> > > > > Update the DMI match for a Lenovo laptop to the new DMI identifier. > > > > This laptop ships with a different DMI identifier to what was expected, > > and also has the DMICs connected to the host rather than the cs42l43 > > codec. > > If the DMICs are connected to the host, isn't there NHLT information > telling the OS how many dmics are connected? If yes, then the > machine-level DMI quirk isn't really needed, all you would need is a > rule that sets it unconditionally when mach->mach_params.dmic_num is > non-zero That is a good idea. However, we also test the case where the PCH DMIC and SoundWire DMIC coexist in the developing stage. Maybe use a quirk for the different DMIC coexist case? > > > Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> > > Fixes: 83c062ae81e8 ("ASoC: Intel: sof_sdw: Add quirks for some new Lenovo > laptops") > > Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> > > Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> > > Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> > > --- > > sound/soc/intel/boards/sof_sdw.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/sound/soc/intel/boards/sof_sdw.c > b/sound/soc/intel/boards/sof_sdw.c > > index 9f721b88e606..d054be360d28 100644 > > --- a/sound/soc/intel/boards/sof_sdw.c > > +++ b/sound/soc/intel/boards/sof_sdw.c > > @@ -620,9 +620,9 @@ static const struct dmi_system_id > sof_sdw_quirk_table[] = { > > .callback = sof_sdw_quirk_cb, > > .matches = { > > DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > > - DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "3832") > > + DMI_MATCH(DMI_PRODUCT_NAME, "83LC") > > }, > > - .driver_data = (void *)(SOC_SDW_SIDECAR_AMPS), > > + .driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | > SOC_SDW_CODEC_MIC), > > }, > > { > > .callback = sof_sdw_quirk_cb,
> -----Original Message----- > From: Liao, Bard > Sent: Friday, January 3, 2025 8:17 AM > To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>; Bard Liao <yung- > chuan.liao@linux.intel.com>; broonie@kernel.org; tiwai@suse.de > Cc: linux-sound@vger.kernel.org > Subject: RE: [PATCH 1/2] ASoC: Intel: sof_sdw: Fix DMI match for Lenovo 83LC > > > > > -----Original Message----- > > From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> > > Sent: Friday, January 3, 2025 5:47 AM > > To: Bard Liao <yung-chuan.liao@linux.intel.com>; broonie@kernel.org; > > tiwai@suse.de > > Cc: linux-sound@vger.kernel.org; Liao, Bard <bard.liao@intel.com> > > Subject: Re: [PATCH 1/2] ASoC: Intel: sof_sdw: Fix DMI match for Lenovo 83LC > > > > > > > > On 1/2/25 06:33, Bard Liao wrote: > > > From: Simon Trimmer <simont@opensource.cirrus.com> > > > > > > Update the DMI match for a Lenovo laptop to the new DMI identifier. > > > > > > This laptop ships with a different DMI identifier to what was expected, > > > and also has the DMICs connected to the host rather than the cs42l43 > > > codec. > > > > If the DMICs are connected to the host, isn't there NHLT information > > telling the OS how many dmics are connected? If yes, then the > > machine-level DMI quirk isn't really needed, all you would need is a > > rule that sets it unconditionally when mach->mach_params.dmic_num is > > non-zero > > That is a good idea. However, we also test the case where the PCH DMIC > and SoundWire DMIC coexist in the developing stage. Maybe use a quirk > for the different DMIC coexist case? On second thought, we will eventually create the dai links by reading the SDCA functions and remove those DMI quirks. Not sure is it worth to change it or even add a new quirk just for temporary used? > > > > > > Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> > > > Fixes: 83c062ae81e8 ("ASoC: Intel: sof_sdw: Add quirks for some new > Lenovo > > laptops") > > > Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> > > > Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> > > > Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> > > > --- > > > sound/soc/intel/boards/sof_sdw.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/sound/soc/intel/boards/sof_sdw.c > > b/sound/soc/intel/boards/sof_sdw.c > > > index 9f721b88e606..d054be360d28 100644 > > > --- a/sound/soc/intel/boards/sof_sdw.c > > > +++ b/sound/soc/intel/boards/sof_sdw.c > > > @@ -620,9 +620,9 @@ static const struct dmi_system_id > > sof_sdw_quirk_table[] = { > > > .callback = sof_sdw_quirk_cb, > > > .matches = { > > > DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > > > - DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "3832") > > > + DMI_MATCH(DMI_PRODUCT_NAME, "83LC") > > > }, > > > - .driver_data = (void *)(SOC_SDW_SIDECAR_AMPS), > > > + .driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | > > SOC_SDW_CODEC_MIC), > > > }, > > > { > > > .callback = sof_sdw_quirk_cb,
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 9f721b88e606..d054be360d28 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -620,9 +620,9 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { .callback = sof_sdw_quirk_cb, .matches = { DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "3832") + DMI_MATCH(DMI_PRODUCT_NAME, "83LC") }, - .driver_data = (void *)(SOC_SDW_SIDECAR_AMPS), + .driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC), }, { .callback = sof_sdw_quirk_cb,