Skip to contentSkip to conversation

ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL

PATCH In review Brady Norander 4 participants 8 messages Aug 15, 2023 – Aug 16, 2023 Sound

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL

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.

---

v2: Removed quirk from SKUs not used in Chrome platforms

 sound/hda/intel-dsp-config.c | 60 +++++++++++++++++++++++++++++++++---
 1 file changed, 56 insertions(+), 4 deletions(-)
sound/hda/intel-dsp-config.c +56 -4
index dcf2453138a5..24a948baf1bc 100644
@@ -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,
Signature · 1 line
2.41.0
Acked-by on v2 1/1
#1 lore raw
Quoted 5 lines · Brady Norander

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.

Thanks for the patch

Quoted 100 lines

---

v2: Removed quirk from SKUs not used in Chrome platforms

 sound/hda/intel-dsp-config.c | 60 +++++++++++++++++++++++++++++++++---
 1 file changed, 56 insertions(+), 4 deletions(-)
sound/hda/intel-dsp-config.c +56 -4
index dcf2453138a5..24a948baf1bc 100644
@@ -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 lore raw
Quoted 7 lines · Pierre-Louis Bossart
Quoted 4 lines · Brady Norander

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.

Quoted 6 lines
Quoted 1 line

Thanks for the patch

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

#3 lore raw
Quoted 9 lines · Curtis Malainey
Quoted 7 lines · Pierre-Louis Bossart
Quoted 5 lines · Brady Norander

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.

Quoted 7 lines
Quoted 4 lines

Thanks for the patch

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.

#4 lore raw
Quoted 13 lines · Brady Norander
Quoted 11 lines · Curtis Malainey
Quoted 9 lines · Pierre-Louis Bossart
Quoted 5 lines · Brady Norander

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.

Thanks for the patch

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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.

#5 lore raw
Quoted 20 lines · Curtis Malainey
Quoted 19 lines · Brady Norander
Quoted 16 lines · Curtis Malainey
Quoted 11 lines · Pierre-Louis Bossart
Quoted 5 lines · Brady Norander

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.

Thanks for the patch

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

Quoted 6 lines
Quoted 2 lines

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.

#6 lore raw
Quoted 31 lines · Pierre-Louis Bossart
Quoted 20 lines · Curtis Malainey
Quoted 19 lines · Brady Norander
Quoted 16 lines · Curtis Malainey
Quoted 11 lines · Pierre-Louis Bossart
Quoted 5 lines · Brady Norander

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.

Thanks for the patch

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

Quoted 6 lines
Quoted 2 lines

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.

Quoted 6 lines

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 <[email protected]>

#7 lore raw
In reply to Brady Norander
Quoted 9 lines · Brady Norander

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.

---

v2: Removed quirk from SKUs not used in Chrome platforms

Applied now to for-next branch. Thanks.

Takashi