All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL
@ 2023-08-15 13:52 Brady Norander
  2023-08-15 15:56 ` Pierre-Louis Bossart
  2023-08-16  6:38 ` Takashi Iwai
  0 siblings, 2 replies; 8+ messages in thread
From: Brady Norander @ 2023-08-15 13:52 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: pierre-louis.bossart, cezary.rojewski, amadeuszx.slawinski, perex,
	tiwai, cujomalainey

AlderLake and RaptorLake Chromebooks currently use the HDA driver by
default. Add a quirk to use the SOF driver on these platforms, which is
needed for functional internal audio.

Signed-off-by: Brady Norander <bradynorander@gmail.com>
---

v2: Removed quirk from SKUs not used in Chrome platforms

 sound/hda/intel-dsp-config.c | 60 +++++++++++++++++++++++++++++++++---
 1 file changed, 56 insertions(+), 4 deletions(-)

diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index dcf2453138a5..24a948baf1bc 100644
--- a/sound/hda/intel-dsp-config.c
+++ b/sound/hda/intel-dsp-config.c
@@ -167,10 +167,10 @@ static const struct config_entry config_table[] = {
 #endif
 
 /*
- * CoffeeLake, CannonLake, CometLake, IceLake, TigerLake use legacy
- * HDAudio driver except for Google Chromebooks and when DMICs are
- * present. Two cases are required since Coreboot does not expose NHLT
- * tables.
+ * CoffeeLake, CannonLake, CometLake, IceLake, TigerLake, AlderLake,
+ * RaptorLake use legacy HDAudio driver except for Google Chromebooks
+ * and when DMICs are present. Two cases are required since Coreboot
+ * does not expose NHLT tables.
  *
  * When the Chromebook quirk is not present, it's based on information
  * that no such device exists. When the quirk is present, it could be
@@ -408,6 +408,19 @@ static const struct config_entry config_table[] = {
 		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
 		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_S,
 	},
+	{
+		.flags = FLAG_SOF,
+		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
+		.dmi_table = (const struct dmi_system_id []) {
+			{
+				.ident = "Google Chromebooks",
+				.matches = {
+					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
+				}
+			},
+			{}
+		}
+	},
 	{
 		.flags = FLAG_SOF,
 		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
@@ -434,14 +447,53 @@ static const struct config_entry config_table[] = {
 		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
 		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_M,
 	},
+	{
+		.flags = FLAG_SOF,
+		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_N,
+		.dmi_table = (const struct dmi_system_id []) {
+			{
+				.ident = "Google Chromebooks",
+				.matches = {
+					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
+				}
+			},
+			{}
+		}
+	},
 	{
 		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
 		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_N,
 	},
+	{
+		.flags = FLAG_SOF,
+		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_0,
+		.dmi_table = (const struct dmi_system_id []) {
+			{
+				.ident = "Google Chromebooks",
+				.matches = {
+					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
+				}
+			},
+			{}
+		}
+	},
 	{
 		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
 		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_0,
 	},
+	{
+		.flags = FLAG_SOF,
+		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_1,
+		.dmi_table = (const struct dmi_system_id []) {
+			{
+				.ident = "Google Chromebooks",
+				.matches = {
+					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
+				}
+			},
+			{}
+		}
+	},
 	{
 		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
 		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_1,
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL
  2023-08-15 13:52 [PATCH v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL Brady Norander
@ 2023-08-15 15:56 ` Pierre-Louis Bossart
  2023-08-15 16:56   ` Curtis Malainey
  2023-08-16  6:38 ` Takashi Iwai
  1 sibling, 1 reply; 8+ messages in thread
From: Pierre-Louis Bossart @ 2023-08-15 15:56 UTC (permalink / raw)
  To: Brady Norander, alsa-devel, broonie
  Cc: cezary.rojewski, amadeuszx.slawinski, perex, tiwai, cujomalainey



On 8/15/23 08:52, Brady Norander wrote:
> AlderLake and RaptorLake Chromebooks currently use the HDA driver by
> default. Add a quirk to use the SOF driver on these platforms, which is
> needed for functional internal audio.
> 
> Signed-off-by: Brady Norander <bradynorander@gmail.com>

Thanks for the patch

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> ---
> 
> v2: Removed quirk from SKUs not used in Chrome platforms
> 
>  sound/hda/intel-dsp-config.c | 60 +++++++++++++++++++++++++++++++++---
>  1 file changed, 56 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
> index dcf2453138a5..24a948baf1bc 100644
> --- a/sound/hda/intel-dsp-config.c
> +++ b/sound/hda/intel-dsp-config.c
> @@ -167,10 +167,10 @@ static const struct config_entry config_table[] = {
>  #endif
>  
>  /*
> - * CoffeeLake, CannonLake, CometLake, IceLake, TigerLake use legacy
> - * HDAudio driver except for Google Chromebooks and when DMICs are
> - * present. Two cases are required since Coreboot does not expose NHLT
> - * tables.
> + * CoffeeLake, CannonLake, CometLake, IceLake, TigerLake, AlderLake,
> + * RaptorLake use legacy HDAudio driver except for Google Chromebooks
> + * and when DMICs are present. Two cases are required since Coreboot
> + * does not expose NHLT tables.
>   *
>   * When the Chromebook quirk is not present, it's based on information
>   * that no such device exists. When the quirk is present, it could be
> @@ -408,6 +408,19 @@ static const struct config_entry config_table[] = {
>  		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
>  		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_S,
>  	},
> +	{
> +		.flags = FLAG_SOF,
> +		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
> +		.dmi_table = (const struct dmi_system_id []) {
> +			{
> +				.ident = "Google Chromebooks",
> +				.matches = {
> +					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
> +				}
> +			},
> +			{}
> +		}
> +	},
>  	{
>  		.flags = FLAG_SOF,
>  		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
> @@ -434,14 +447,53 @@ static const struct config_entry config_table[] = {
>  		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
>  		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_M,
>  	},
> +	{
> +		.flags = FLAG_SOF,
> +		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_N,
> +		.dmi_table = (const struct dmi_system_id []) {
> +			{
> +				.ident = "Google Chromebooks",
> +				.matches = {
> +					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
> +				}
> +			},
> +			{}
> +		}
> +	},
>  	{
>  		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
>  		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_N,
>  	},
> +	{
> +		.flags = FLAG_SOF,
> +		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_0,
> +		.dmi_table = (const struct dmi_system_id []) {
> +			{
> +				.ident = "Google Chromebooks",
> +				.matches = {
> +					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
> +				}
> +			},
> +			{}
> +		}
> +	},
>  	{
>  		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
>  		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_0,
>  	},
> +	{
> +		.flags = FLAG_SOF,
> +		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_1,
> +		.dmi_table = (const struct dmi_system_id []) {
> +			{
> +				.ident = "Google Chromebooks",
> +				.matches = {
> +					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
> +				}
> +			},
> +			{}
> +		}
> +	},
>  	{
>  		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
>  		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_1,

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL
  2023-08-15 15:56 ` Pierre-Louis Bossart
@ 2023-08-15 16:56   ` Curtis Malainey
  2023-08-15 17:15     ` Brady Norander
  0 siblings, 1 reply; 8+ messages in thread
From: Curtis Malainey @ 2023-08-15 16:56 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Brady Norander, alsa-devel, broonie, cezary.rojewski,
	amadeuszx.slawinski, perex, tiwai, cujomalainey

On Tue, Aug 15, 2023 at 8:56 AM Pierre-Louis Bossart <
pierre-louis.bossart@linux.intel.com> wrote:

>
>
> On 8/15/23 08:52, Brady Norander wrote:
> > AlderLake and RaptorLake Chromebooks currently use the HDA driver by
> > default. Add a quirk to use the SOF driver on these platforms, which is
> > needed for functional internal audio.
> >
> > Signed-off-by: Brady Norander <bradynorander@gmail.com>
>
> Thanks for the patch
>
> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>

Now that I am looking closer at the patch, I am very curious why we are not
hitting the following case and using SOF

         {




                 .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,




                 .device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,




         },
         {




                 .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,




                 .device = PCI_DEVICE_ID_INTEL_HDA_ADL_N,




         },
etc.

This makes me wonder if maybe the DMIC detection is actually broken.

Curtis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL
  2023-08-15 16:56   ` Curtis Malainey
@ 2023-08-15 17:15     ` Brady Norander
  2023-08-15 18:00       ` Curtis Malainey
  0 siblings, 1 reply; 8+ messages in thread
From: Brady Norander @ 2023-08-15 17:15 UTC (permalink / raw)
  To: Curtis Malainey
  Cc: pierre-louis.bossart, alsa-devel, broonie, cezary.rojewski,
	amadeuszx.slawinski, perex, tiwai, cujomalainey

On Tue, Aug 15, 2023 at 09:56:44AM -0700, Curtis Malainey wrote:
> On Tue, Aug 15, 2023 at 8:56 AM Pierre-Louis Bossart <
> pierre-louis.bossart@linux.intel.com> wrote:
> > On 8/15/23 08:52, Brady Norander wrote:
> > > AlderLake and RaptorLake Chromebooks currently use the HDA driver by
> > > default. Add a quirk to use the SOF driver on these platforms, which is
> > > needed for functional internal audio.
> > >
> > > Signed-off-by: Brady Norander <bradynorander@gmail.com>
> >
> > Thanks for the patch
> >
> > Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> >
> 
> Now that I am looking closer at the patch, I am very curious why we are not
> hitting the following case and using SOF

The DMIC detection looks for DMIC endpoints in the NHLT, but these
devices don't have NHLT.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL
  2023-08-15 17:15     ` Brady Norander
@ 2023-08-15 18:00       ` Curtis Malainey
  2023-08-15 18:28         ` Pierre-Louis Bossart
  0 siblings, 1 reply; 8+ messages in thread
From: Curtis Malainey @ 2023-08-15 18:00 UTC (permalink / raw)
  To: Brady Norander
  Cc: pierre-louis.bossart, alsa-devel, broonie, cezary.rojewski,
	amadeuszx.slawinski, perex, tiwai, cujomalainey

On Tue, Aug 15, 2023 at 10:15 AM Brady Norander <bradynorander@gmail.com> wrote:
>
> On Tue, Aug 15, 2023 at 09:56:44AM -0700, Curtis Malainey wrote:
> > On Tue, Aug 15, 2023 at 8:56 AM Pierre-Louis Bossart <
> > pierre-louis.bossart@linux.intel.com> wrote:
> > > On 8/15/23 08:52, Brady Norander wrote:
> > > > AlderLake and RaptorLake Chromebooks currently use the HDA driver by
> > > > default. Add a quirk to use the SOF driver on these platforms, which is
> > > > needed for functional internal audio.
> > > >
> > > > Signed-off-by: Brady Norander <bradynorander@gmail.com>
> > >
> > > Thanks for the patch
> > >
> > > Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> > >
> >
> > Now that I am looking closer at the patch, I am very curious why we are not
> > hitting the following case and using SOF
>
> The DMIC detection looks for DMIC endpoints in the NHLT, but these
> devices don't have NHLT.

There would be the brokenness then. Is the DMIC not something that
shows up in coreboot? Or is it only defined in the topology? If the
latter we should probably extend this patch farther back to GLK.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL
  2023-08-15 18:00       ` Curtis Malainey
@ 2023-08-15 18:28         ` Pierre-Louis Bossart
  2023-08-15 19:17           ` Curtis Malainey
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre-Louis Bossart @ 2023-08-15 18:28 UTC (permalink / raw)
  To: Curtis Malainey, Brady Norander
  Cc: alsa-devel, broonie, cezary.rojewski, amadeuszx.slawinski, perex,
	tiwai, cujomalainey



On 8/15/23 13:00, Curtis Malainey wrote:
> On Tue, Aug 15, 2023 at 10:15 AM Brady Norander <bradynorander@gmail.com> wrote:
>>
>> On Tue, Aug 15, 2023 at 09:56:44AM -0700, Curtis Malainey wrote:
>>> On Tue, Aug 15, 2023 at 8:56 AM Pierre-Louis Bossart <
>>> pierre-louis.bossart@linux.intel.com> wrote:
>>>> On 8/15/23 08:52, Brady Norander wrote:
>>>>> AlderLake and RaptorLake Chromebooks currently use the HDA driver by
>>>>> default. Add a quirk to use the SOF driver on these platforms, which is
>>>>> needed for functional internal audio.
>>>>>
>>>>> Signed-off-by: Brady Norander <bradynorander@gmail.com>
>>>>
>>>> Thanks for the patch
>>>>
>>>> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>>>>
>>>
>>> Now that I am looking closer at the patch, I am very curious why we are not
>>> hitting the following case and using SOF
>>
>> The DMIC detection looks for DMIC endpoints in the NHLT, but these
>> devices don't have NHLT.
> 
> There would be the brokenness then. Is the DMIC not something that
> shows up in coreboot? Or is it only defined in the topology? If the
> latter we should probably extend this patch farther back to GLK.

You don't need to expose mics in NHLT, the premise has always been that
Chromebooks are assumed to expose 4 mics and userspace w/ UCM takes care
of selecting which mics are actually used on what platform.

Also there's a difference between NHLT (ACPI table) and NHLT blob in
topology used for IPC4. not the same thing.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL
  2023-08-15 18:28         ` Pierre-Louis Bossart
@ 2023-08-15 19:17           ` Curtis Malainey
  0 siblings, 0 replies; 8+ messages in thread
From: Curtis Malainey @ 2023-08-15 19:17 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Brady Norander, alsa-devel, broonie, cezary.rojewski,
	amadeuszx.slawinski, perex, tiwai, cujomalainey

On Tue, Aug 15, 2023 at 11:28 AM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
>
>
>
> On 8/15/23 13:00, Curtis Malainey wrote:
> > On Tue, Aug 15, 2023 at 10:15 AM Brady Norander <bradynorander@gmail.com> wrote:
> >>
> >> On Tue, Aug 15, 2023 at 09:56:44AM -0700, Curtis Malainey wrote:
> >>> On Tue, Aug 15, 2023 at 8:56 AM Pierre-Louis Bossart <
> >>> pierre-louis.bossart@linux.intel.com> wrote:
> >>>> On 8/15/23 08:52, Brady Norander wrote:
> >>>>> AlderLake and RaptorLake Chromebooks currently use the HDA driver by
> >>>>> default. Add a quirk to use the SOF driver on these platforms, which is
> >>>>> needed for functional internal audio.
> >>>>>
> >>>>> Signed-off-by: Brady Norander <bradynorander@gmail.com>
> >>>>
> >>>> Thanks for the patch
> >>>>
> >>>> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> >>>>
> >>>
> >>> Now that I am looking closer at the patch, I am very curious why we are not
> >>> hitting the following case and using SOF
> >>
> >> The DMIC detection looks for DMIC endpoints in the NHLT, but these
> >> devices don't have NHLT.
> >
> > There would be the brokenness then. Is the DMIC not something that
> > shows up in coreboot? Or is it only defined in the topology? If the
> > latter we should probably extend this patch farther back to GLK.
>
> You don't need to expose mics in NHLT, the premise has always been that
> Chromebooks are assumed to expose 4 mics and userspace w/ UCM takes care
> of selecting which mics are actually used on what platform.
>
> Also there's a difference between NHLT (ACPI table) and NHLT blob in
> topology used for IPC4. not the same thing.

Thanks for the clarification

Acked-by Curtis Malainey <cujomalainey@chromium.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL
  2023-08-15 13:52 [PATCH v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL Brady Norander
  2023-08-15 15:56 ` Pierre-Louis Bossart
@ 2023-08-16  6:38 ` Takashi Iwai
  1 sibling, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2023-08-16  6:38 UTC (permalink / raw)
  To: Brady Norander
  Cc: alsa-devel, broonie, pierre-louis.bossart, cezary.rojewski,
	amadeuszx.slawinski, perex, cujomalainey

On Tue, 15 Aug 2023 15:52:46 +0200,
Brady Norander wrote:
> 
> AlderLake and RaptorLake Chromebooks currently use the HDA driver by
> default. Add a quirk to use the SOF driver on these platforms, which is
> needed for functional internal audio.
> 
> Signed-off-by: Brady Norander <bradynorander@gmail.com>
> ---
> 
> v2: Removed quirk from SKUs not used in Chrome platforms

Applied now to for-next branch.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-16 10:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-15 13:52 [PATCH v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL Brady Norander
2023-08-15 15:56 ` Pierre-Louis Bossart
2023-08-15 16:56   ` Curtis Malainey
2023-08-15 17:15     ` Brady Norander
2023-08-15 18:00       ` Curtis Malainey
2023-08-15 18:28         ` Pierre-Louis Bossart
2023-08-15 19:17           ` Curtis Malainey
2023-08-16  6:38 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.