diff mbox series

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

Message ID ZNuDLk5hgmfKrZg6@arch (mailing list archive)
State Accepted
Commit 905240d169ebe4b879628b4a05316332803a3c3d
Headers show
Series [v2] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL | expand

Commit Message

Brady Norander Aug. 15, 2023, 1:52 p.m. UTC
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(-)

Comments

Brady Norander Aug. 15, 2023, 5:15 p.m. UTC | #1
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.
diff mbox series

Patch

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,