Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Brady Norander <bradynorander@gmail.com>
To: Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
	alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Cezary Rojewski <cezary.rojewski@intel.com>
Subject: [PATCH v2] ALSA: hda: intel-dsp-cfg: Use AVS driver on SKL/KBL/APL Chromebooks
Date: Mon, 30 Oct 2023 14:58:52 -0400	[thread overview]
Message-ID: <2f5ffc3b-01be-413d-843e-8654d953f56f@gmail.com> (raw)

The legacy SKL driver no longer works properly on these Chromebook
platforms. Use the new AVS driver by default instead.

Signed-off-by: Brady Norander <bradynorander@gmail.com>
---
v2: Only use quirk if AVS is enabled
  sound/hda/intel-dsp-config.c | 26 +++++++++++++++++---------
  1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index 756fa0aa69bb..e056aca01900 100644
--- a/sound/hda/intel-dsp-config.c
+++ b/sound/hda/intel-dsp-config.c
@@ -16,10 +16,11 @@
  static int dsp_driver;

  module_param(dsp_driver, int, 0444);
-MODULE_PARM_DESC(dsp_driver, "Force the DSP driver for Intel DSP 
(0=auto, 1=legacy, 2=SST, 3=SOF)");
+MODULE_PARM_DESC(dsp_driver, "Force the DSP driver for Intel DSP 
(0=auto, 1=legacy, 2=SST, 3=SOF, 4=AVS)");

  #define FLAG_SST			BIT(0)
  #define FLAG_SOF			BIT(1)
+#define FLAG_AVS			BIT(2)
  #define FLAG_SST_ONLY_IF_DMIC		BIT(15)
  #define FLAG_SOF_ONLY_IF_DMIC		BIT(16)
  #define FLAG_SOF_ONLY_IF_SOUNDWIRE	BIT(17)
@@ -56,7 +57,7 @@ static const struct config_entry config_table[] = {
  /*
   * Apollolake (Broxton-P)
   * the legacy HDAudio driver is used except on Up Squared (SOF) and
- * Chromebooks (SST), as well as devices based on the ES8336 codec
+ * Chromebooks (AVS), as well as devices based on the ES8336 codec
   */
  #if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE)
  	{
@@ -79,9 +80,9 @@ static const struct config_entry config_table[] = {
  		.codec_hid =  &essx_83x6,
  	},
  #endif
-#if IS_ENABLED(CONFIG_SND_SOC_INTEL_APL)
+#if IS_ENABLED(CONFIG_SND_SOC_INTEL_AVS)
  	{
-		.flags = FLAG_SST,
+		.flags = FLAG_AVS,
  		.device = PCI_DEVICE_ID_INTEL_HDA_APL,
  		.dmi_table = (const struct dmi_system_id []) {
  			{
@@ -96,13 +97,13 @@ static const struct config_entry config_table[] = {
  #endif
  /*
   * Skylake and Kabylake use legacy HDAudio driver except for Google
- * Chromebooks (SST)
+ * Chromebooks (AVS)
   */

  /* Sunrise Point-LP */
-#if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKL)
+#if IS_ENABLED(CONFIG_SND_SOC_INTEL_AVS)
  	{
-		.flags = FLAG_SST,
+		.flags = FLAG_AVS,
  		.device = PCI_DEVICE_ID_INTEL_HDA_SKL_LP,
  		.dmi_table = (const struct dmi_system_id []) {
  			{
@@ -114,15 +115,17 @@ static const struct config_entry config_table[] = {
  			{}
  		}
  	},
+#endif
+#if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKL)
  	{
  		.flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
  		.device = PCI_DEVICE_ID_INTEL_HDA_SKL_LP,
  	},
  #endif
  /* Kabylake-LP */
-#if IS_ENABLED(CONFIG_SND_SOC_INTEL_KBL)
+#if IS_ENABLED(CONFIG_SND_SOC_INTEL_AVS)
  	{
-		.flags = FLAG_SST,
+		.flags = FLAG_AVS,
  		.device = PCI_DEVICE_ID_INTEL_HDA_KBL_LP,
  		.dmi_table = (const struct dmi_system_id []) {
  			{
@@ -134,6 +137,8 @@ static const struct config_entry config_table[] = {
  			{}
  		}
  	},
+#endif
+#if IS_ENABLED(CONFIG_SND_SOC_INTEL_KBL)
  	{
  		.flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
  		.device = PCI_DEVICE_ID_INTEL_HDA_KBL_LP,
@@ -667,6 +672,9 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci)
  		}
  	}

+	if (cfg->flags & FLAG_AVS)
+		return SND_INTEL_DSP_DRIVER_AVS;
+
  	return SND_INTEL_DSP_DRIVER_LEGACY;
  }
  EXPORT_SYMBOL_GPL(snd_intel_dsp_driver_probe);
-- 
2.42.0

             reply	other threads:[~2023-11-03 16:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30 18:58 Brady Norander [this message]
2023-10-30 19:23 ` [PATCH v2] ALSA: hda: intel-dsp-cfg: Use AVS driver on SKL/KBL/APL Chromebooks Cezary Rojewski
2023-10-31  8:07 ` Takashi Iwai
2023-10-31  9:47   ` Cezary Rojewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f5ffc3b-01be-413d-843e-8654d953f56f@gmail.com \
    --to=bradynorander@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox