All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL
@ 2023-08-14  1:26 Brady Norander
  2023-08-14 13:54 ` Pierre-Louis Bossart
  2023-08-14 23:54 ` Pierre-Louis Bossart
  0 siblings, 2 replies; 8+ messages in thread
From: Brady Norander @ 2023-08-14  1:26 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: pierre-louis.bossart, cezary.rojewski, amadeuszx.slawinski, perex,
	tiwai, 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.

Signed-off-by: Brady Norander <bradynorander@gmail.com>
---
 sound/hda/intel-dsp-config.c | 151 ++++++++++++++++++++++++++++++++++-
 1 file changed, 147 insertions(+), 4 deletions(-)

diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index dcf2453138a5..5fb5abb76679 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
@@ -400,14 +400,53 @@ static const struct config_entry config_table[] = {
 
 /* Alder Lake / Raptor Lake */
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE)
+	{
+		.flags = FLAG_SOF,
+		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_S,
+		.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_S,
 	},
+	{
+		.flags = FLAG_SOF,
+		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_S,
+		.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_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,
@@ -417,10 +456,36 @@ static const struct config_entry config_table[] = {
 		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
 		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
 	},
+	{
+		.flags = FLAG_SOF,
+		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_PX,
+		.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_PX,
 	},
+	{
+		.flags = FLAG_SOF,
+		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_PS,
+		.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_PS,
@@ -430,26 +495,104 @@ static const struct config_entry config_table[] = {
 		.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
 		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_PS,
 	},
+	{
+		.flags = FLAG_SOF,
+		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_M,
+		.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_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,
 	},
+	{
+		.flags = FLAG_SOF,
+		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_M,
+		.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_M,
 	},
+	{
+		.flags = FLAG_SOF,
+		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_PX,
+		.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_PX,
-- 
2.41.0


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

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



On 8/13/23 20:26, 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.

that would be wise indeed, I must admit not recalling why this isn't the
case. Curtis?


> +	{
> +		.flags = FLAG_SOF,
> +		.device = PCI_DEVICE_ID_INTEL_HDA_ADL_PX,

Humm, that doesn't seem like a supported configuration, IIRC all the PX
skews are for embedded Linux stuff.

> +		.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_M,
>  	},
> +	{
> +		.flags = FLAG_SOF,
> +		.device = PCI_DEVICE_ID_INTEL_HDA_RPL_PX,

same here, I don't think we can blindly add quirks.

One might argue it doesn't hurt but not all SKUs are supported by Chrome.

> +		.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_PX,

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

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

On Mon, Aug 14, 2023 at 08:54:15AM -0500, Pierre-Louis Bossart wrote:
> same here, I don't think we can blindly add quirks.
> 
> One might argue it doesn't hurt but not all SKUs are supported by Chrome.

Fair enough. I wasn't sure which SKUs were used in Chrome platforms and
which ones weren't so I figured it would be safer to include all of them
than miss some that are needed. I can resend the patch without the quirk
for the PX SKUs.

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

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

On Mon, Aug 14, 2023 at 11:01 AM Brady Norander <bradynorander@gmail.com>
wrote:

> On Mon, Aug 14, 2023 at 08:54:15AM -0500, Pierre-Louis Bossart wrote:
> > same here, I don't think we can blindly add quirks.
> >
> > One might argue it doesn't hurt but not all SKUs are supported by Chrome.
>
> Fair enough. I wasn't sure which SKUs were used in Chrome platforms and
> which ones weren't so I figured it would be safer to include all of them
> than miss some that are needed. I can resend the patch without the quirk
> for the PX SKUs.
>

FTR we carry a .conf which has the following config which is probably why
we don't see this issue. I understand this behaviour for dual supported
legacy platforms but it is indeed weird to see on SOF only supported
platforms.

# Use the SOF driver for PCI_DEVICE(0x8086, 0x9dc8) instead of snd_hda_intel
options snd_intel_sdw_acpi sdw_link_mask=0x5
options snd_intel_dspcfg dsp_driver=3
options snd_sof_intel_hda_common always_enable_dmi_l1=1
blacklist snd_hda_intel

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

* Re: [PATCH] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL
  2023-08-14  1:26 [PATCH] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL Brady Norander
  2023-08-14 13:54 ` Pierre-Louis Bossart
@ 2023-08-14 23:54 ` Pierre-Louis Bossart
  2023-08-15  0:25   ` Brady Norander
  2023-08-15  0:39   ` Curtis Malainey
  1 sibling, 2 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2023-08-14 23:54 UTC (permalink / raw)
  To: Brady Norander, alsa-devel, broonie
  Cc: cezary.rojewski, amadeuszx.slawinski, perex, tiwai



On 8/13/23 20:26, 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.

After checking, here's a list of known Chromebooks.

Do you mind sending an updated v2?

Thanks!

> +	{
> +		.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_N,
> +		.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_RPL_P_0,
> +		.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_RPL_P_1,
> +		.dmi_table = (const struct dmi_system_id []) {
> +			{
> +				.ident = "Google Chromebooks",
> +				.matches = {
> +					DMI_MATCH(DMI_SYS_VENDOR, "Google"),
> +				}
> +			},
> +			{}
> +		}
> +	},

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

* Re: [PATCH] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL
  2023-08-14 23:54 ` Pierre-Louis Bossart
@ 2023-08-15  0:25   ` Brady Norander
  2023-08-15  0:53     ` Mark Brown
  2023-08-15  0:39   ` Curtis Malainey
  1 sibling, 1 reply; 8+ messages in thread
From: Brady Norander @ 2023-08-15  0:25 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel
  Cc: broonie, cezary.rojewski, amadeuszx.slawinski, perex, tiwai

On Mon, Aug 14, 2023 at 06:54:06PM -0500, Pierre-Louis Bossart wrote:
> On 8/13/23 20:26, 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.
> 
> After checking, here's a list of known Chromebooks.
> 
> Do you mind sending an updated v2?
> 
> Thanks!

Not at all. Just one thing I'm confused about, if I send a v2 patch,
should it be a reply to my original thread or a new thread?

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

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

On Mon, Aug 14, 2023 at 4:55 PM Pierre-Louis Bossart <
pierre-louis.bossart@linux.intel.com> wrote:

>
>
> On 8/13/23 20:26, 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.
>
> After checking, here's a list of known Chromebooks.
>

I think you forgot to hit paste :)

Curtis

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

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

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

On Mon, Aug 14, 2023 at 08:25:57PM -0400, Brady Norander wrote:

> Not at all. Just one thing I'm confused about, if I send a v2 patch,
> should it be a reply to my original thread or a new thread?

New thread please.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ 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-14  1:26 [PATCH] ALSA: hda: intel-dsp-cfg: Add Chromebook quirk to ADL/RPL Brady Norander
2023-08-14 13:54 ` Pierre-Louis Bossart
2023-08-14 18:00   ` Brady Norander
2023-08-14 18:30     ` Curtis Malainey
2023-08-14 23:54 ` Pierre-Louis Bossart
2023-08-15  0:25   ` Brady Norander
2023-08-15  0:53     ` Mark Brown
2023-08-15  0:39   ` Curtis Malainey

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.