Skip to contentSkip to conversation

ASoC: Intel: Skylake: Fix HDAudio and DMIC for v5.4

PATCH Applied Cezary Rojewski 3 participants 18 messages Nov 29, 2020 – Dec 1, 2020

Subsystems (4)
lore
Share & tools
lore

Cezary Rojewski

author maintainer
#0 lore raw

cover ASoC: Intel: Skylake: Fix HDAudio and DMIC for v5.4

First six of the backport address numerous problems troubling HDAudio configuration users for Skylake driver. Upstream series:
"ASoC: Intel: Skylake: Fix HDaudio and Dmic" [1] provides the explanation and reasoning behind it. These have been initialy pushed into v5.7-rc1 via: "sound updates for 5.7-rc1" [2] by Takashi.

Last two patches are from: "Add support for different DMIC configurations" [3] which focuses on HDAudio with DMIC configuration.
Patch: "ASoC: Intel: Skylake: Add alternative topology binary name" of the mentioned series has already been merged to v5.4.y -stable and thus it's not included here.

Fixes target mainly Skylake and Kabylake based platforms, released in 2015-2016 period.

[1]: https://lore.kernel.org/alsa-devel/[email protected]/
[2]: https://lore.kernel.org/lkml/[email protected]/
[3]: https://lore.kernel.org/alsa-devel/[email protected]/

Cezary Rojewski (6):
ASoC: Intel: Skylake: Remove superfluous chip initialization
ASoC: Intel: Skylake: Select hda configuration permissively
ASoC: Intel: Skylake: Enable codec wakeup during chip init
ASoC: Intel: Skylake: Shield against no-NHLT configurations
ASoC: Intel: Allow for ROM init retry on CNL platforms
ASoC: Intel: Skylake: Await purge request ack on CNL

Mateusz Gorski (2):
ASoC: Intel: Multiple I/O PCM format support for pipe
ASoC: Intel: Skylake: Automatic DMIC format configuration according to
information from NHLT

 include/uapi/sound/skl-tplg-interface.h |   2 +
 sound/soc/intel/skylake/bxt-sst.c       |   3 -
 sound/soc/intel/skylake/cnl-sst.c       |  35 ++++--
 sound/soc/intel/skylake/skl-nhlt.c      |   3 +-
 sound/soc/intel/skylake/skl-sst-dsp.h   |   2 +
 sound/soc/intel/skylake/skl-topology.c  | 159 +++++++++++++++++++++++-
 sound/soc/intel/skylake/skl-topology.h  |   1 +
 sound/soc/intel/skylake/skl.c           |  29 ++---
 8 files changed, 204 insertions(+), 30 deletions(-)
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH 1/8 ASoC: Intel: Skylake: Remove superfluous chip initialization

commit 2ef81057d80456870b97890dd79c8f56a85b1242 upstream.

Skylake driver does the controller init operation twice:
- first during probe (only to stop it just before scheduling probe_work)
- and during said probe_work where the actual correct sequence is executed

To properly complete boot sequence when iDisp codec is present, bus initialization has to be called only after _i915_init() finishes. With additional _reset_list preceding _i915_init(), iDisp codec never gets the chance to enumerate on the link. Remove the superfluous initialization to address the issue.

---
 sound/soc/intel/skylake/skl.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
sound/soc/intel/skylake/skl.c +4 -9
index 141dbbf975ac..861c07417fed 100644
@@ -807,6 +807,9 @@ static void skl_probe_work(struct work_struct *work)
 			return;
 	}
 
+	skl_init_pci(skl);
+	skl_dum_set(bus);
+
 	err = skl_init_chip(bus, true);
 	if (err < 0) {
 		dev_err(bus->dev, "Init chip failed with err: %d\n", err);
@@ -922,8 +925,6 @@ static int skl_first_init(struct hdac_bus *bus)
 		return -ENXIO;
 	}
 
-	snd_hdac_bus_reset_link(bus, true);
-
 	snd_hdac_bus_parse_capabilities(bus);
 
 	/* check if PPCAP exists */
@@ -971,11 +972,7 @@ static int skl_first_init(struct hdac_bus *bus)
 	if (err < 0)
 		return err;
 
-	/* initialize chip */
-	skl_init_pci(skl);
-	skl_dum_set(bus);
-
-	return skl_init_chip(bus, true);
+	return 0;
 }
 
 static int skl_probe(struct pci_dev *pci,
@@ -1080,8 +1077,6 @@ static int skl_probe(struct pci_dev *pci,
 	if (bus->mlcap)
 		snd_hdac_ext_bus_get_ml_capabilities(bus);
 
-	snd_hdac_bus_stop_chip(bus);
-
 	/* create device for soc dmic */
 	err = skl_dmic_device_register(skl);
 	if (err < 0) {
Signature · 1 line
2.17.1
maintainer Applied
#2 lore raw

Patch "ASoC: Intel: Skylake: Remove superfluous chip initialization" has been added to the 5.4-stable tree

This is a note to let you know that I've just added the patch titled

ASoC: Intel: Skylake: Remove superfluous chip initialization

to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
asoc-intel-skylake-remove-superfluous-chip-initialization.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From foo@baz Tue Dec 1 09:41:56 AM CET 2020
From: Cezary Rojewski <[email protected]>
Date: Sun, 29 Nov 2020 12:41:41 +0100
Subject: ASoC: Intel: Skylake: Remove superfluous chip initialization
To: [email protected], [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], Cezary Rojewski <[email protected]>
Message-ID: <[email protected]>

From: Cezary Rojewski <[email protected]>

commit 2ef81057d80456870b97890dd79c8f56a85b1242 upstream.

Skylake driver does the controller init operation twice:
- first during probe (only to stop it just before scheduling probe_work)
- and during said probe_work where the actual correct sequence is executed

To properly complete boot sequence when iDisp codec is present, bus initialization has to be called only after _i915_init() finishes. With additional _reset_list preceding _i915_init(), iDisp codec never gets the chance to enumerate on the link. Remove the superfluous initialization to address the issue.

---
 sound/soc/intel/skylake/skl.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
sound/soc/intel/skylake/skl.c +4 -9
@@ -807,6 +807,9 @@ static void skl_probe_work(struct work_s
 			return;
 	}
 
+	skl_init_pci(skl);
+	skl_dum_set(bus);
+
 	err = skl_init_chip(bus, true);
 	if (err < 0) {
 		dev_err(bus->dev, "Init chip failed with err: %d\n", err);
@@ -922,8 +925,6 @@ static int skl_first_init(struct hdac_bu
 		return -ENXIO;
 	}
 
-	snd_hdac_bus_reset_link(bus, true);
-
 	snd_hdac_bus_parse_capabilities(bus);
 
 	/* check if PPCAP exists */
@@ -971,11 +972,7 @@ static int skl_first_init(struct hdac_bu
 	if (err < 0)
 		return err;
 
-	/* initialize chip */
-	skl_init_pci(skl);
-	skl_dum_set(bus);
-
-	return skl_init_chip(bus, true);
+	return 0;
 }
 
 static int skl_probe(struct pci_dev *pci,
@@ -1080,8 +1077,6 @@ static int skl_probe(struct pci_dev *pci
 	if (bus->mlcap)
 		snd_hdac_ext_bus_get_ml_capabilities(bus);
 
-	snd_hdac_bus_stop_chip(bus);
-
 	/* create device for soc dmic */
 	err = skl_dmic_device_register(skl);
 	if (err < 0) {

Patches currently in stable-queue which might be from [email protected] are

queue-5.4/asoc-intel-skylake-select-hda-configuration-permissively.patch queue-5.4/asoc-intel-skylake-enable-codec-wakeup-during-chip-init.patch queue-5.4/asoc-intel-allow-for-rom-init-retry-on-cnl-platforms.patch queue-5.4/asoc-intel-skylake-await-purge-request-ack-on-cnl.patch queue-5.4/asoc-intel-skylake-remove-superfluous-chip-initialization.patch queue-5.4/asoc-intel-skylake-shield-against-no-nhlt-configurations.patch queue-5.4/asoc-intel-multiple-i-o-pcm-format-support-for-pipe.patch queue-5.4/asoc-intel-skylake-automatic-dmic-format-configuration-according-to-information-from-nhlt.patch

author maintainer
#3 lore raw

PATCH 2/8 ASoC: Intel: Skylake: Select hda configuration permissively

In reply to Cezary Rojewski

commit a66f88394a78fec9a05fa6e517e9603e8eca8363 upstream.

With _reset_link removed from the probe sequence, codec_mask at the time skl_find_hda_machine() is invoked will always be 0, so hda machine will never be chosen. Rather than reorganizing boot flow, be permissive about invalid mask. codec_mask will be set to proper value during probe_work - before skl_codec_create() ever gets called.

---
 sound/soc/intel/skylake/skl.c | 5 -----
 1 file changed, 5 deletions(-)
sound/soc/intel/skylake/skl.c +0 -5
index 861c07417fed..f46b90ccb46f 100644
@@ -480,13 +480,8 @@ static struct skl_ssp_clk skl_ssp_clks[] = {
 static struct snd_soc_acpi_mach *skl_find_hda_machine(struct skl_dev *skl,
 					struct snd_soc_acpi_mach *machines)
 {
-	struct hdac_bus *bus = skl_to_bus(skl);
 	struct snd_soc_acpi_mach *mach;
 
-	/* check if we have any codecs detected on bus */
-	if (bus->codec_mask == 0)
-		return NULL;
-
 	/* point to common table */
 	mach = snd_soc_acpi_intel_hda_machines;
 
Signature · 1 line
2.17.1
maintainer Applied
#4 lore raw

Patch "ASoC: Intel: Skylake: Select hda configuration permissively" has been added to the 5.4-stable tree

This is a note to let you know that I've just added the patch titled

ASoC: Intel: Skylake: Select hda configuration permissively

to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
asoc-intel-skylake-select-hda-configuration-permissively.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From foo@baz Tue Dec 1 09:41:56 AM CET 2020
From: Cezary Rojewski <[email protected]>
Date: Sun, 29 Nov 2020 12:41:42 +0100
Subject: ASoC: Intel: Skylake: Select hda configuration permissively
To: [email protected], [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], Cezary Rojewski <[email protected]>
Message-ID: <[email protected]>

From: Cezary Rojewski <[email protected]>

commit a66f88394a78fec9a05fa6e517e9603e8eca8363 upstream.

With _reset_link removed from the probe sequence, codec_mask at the time skl_find_hda_machine() is invoked will always be 0, so hda machine will never be chosen. Rather than reorganizing boot flow, be permissive about invalid mask. codec_mask will be set to proper value during probe_work - before skl_codec_create() ever gets called.

---
 sound/soc/intel/skylake/skl.c |    5 -----
 1 file changed, 5 deletions(-)
sound/soc/intel/skylake/skl.c +0 -5
@@ -480,13 +480,8 @@ static struct skl_ssp_clk skl_ssp_clks[]
 static struct snd_soc_acpi_mach *skl_find_hda_machine(struct skl_dev *skl,
 					struct snd_soc_acpi_mach *machines)
 {
-	struct hdac_bus *bus = skl_to_bus(skl);
 	struct snd_soc_acpi_mach *mach;
 
-	/* check if we have any codecs detected on bus */
-	if (bus->codec_mask == 0)
-		return NULL;
-
 	/* point to common table */
 	mach = snd_soc_acpi_intel_hda_machines;
 

Patches currently in stable-queue which might be from [email protected] are

queue-5.4/asoc-intel-skylake-select-hda-configuration-permissively.patch queue-5.4/asoc-intel-skylake-enable-codec-wakeup-during-chip-init.patch queue-5.4/asoc-intel-allow-for-rom-init-retry-on-cnl-platforms.patch queue-5.4/asoc-intel-skylake-await-purge-request-ack-on-cnl.patch queue-5.4/asoc-intel-skylake-remove-superfluous-chip-initialization.patch queue-5.4/asoc-intel-skylake-shield-against-no-nhlt-configurations.patch queue-5.4/asoc-intel-multiple-i-o-pcm-format-support-for-pipe.patch queue-5.4/asoc-intel-skylake-automatic-dmic-format-configuration-according-to-information-from-nhlt.patch

author maintainer
#5 lore raw

PATCH 3/8 ASoC: Intel: Skylake: Enable codec wakeup during chip init

In reply to Cezary Rojewski

commit e603f11d5df8997d104ab405ff27640b90baffaa upstream.

Follow the recommendation set by hda_intel.c and enable HDMI/DP codec wakeup during bus initialization procedure. Disable wakeup once init completes.

---
 sound/soc/intel/skylake/skl.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/intel/skylake/skl.c +2 -0
index f46b90ccb46f..1a3a3d6a3141 100644
@@ -129,6 +129,7 @@ static int skl_init_chip(struct hdac_bus *bus, bool full_reset)
 	struct hdac_ext_link *hlink;
 	int ret;
 
+	snd_hdac_set_codec_wakeup(bus, true);
 	skl_enable_miscbdcge(bus->dev, false);
 	ret = snd_hdac_bus_init_chip(bus, full_reset);
 
@@ -137,6 +138,7 @@ static int skl_init_chip(struct hdac_bus *bus, bool full_reset)
 		writel(0, hlink->ml_addr + AZX_REG_ML_LOSIDV);
 
 	skl_enable_miscbdcge(bus->dev, true);
+	snd_hdac_set_codec_wakeup(bus, false);
 
 	return ret;
 }
Signature · 1 line
2.17.1
maintainer Applied
#6 lore raw

Patch "ASoC: Intel: Skylake: Enable codec wakeup during chip init" has been added to the 5.4-stable tree

This is a note to let you know that I've just added the patch titled

ASoC: Intel: Skylake: Enable codec wakeup during chip init

to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
asoc-intel-skylake-enable-codec-wakeup-during-chip-init.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From foo@baz Tue Dec 1 09:41:56 AM CET 2020
From: Cezary Rojewski <[email protected]>
Date: Sun, 29 Nov 2020 12:41:43 +0100
Subject: ASoC: Intel: Skylake: Enable codec wakeup during chip init
To: [email protected], [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], Cezary Rojewski <[email protected]>
Message-ID: <[email protected]>

From: Cezary Rojewski <[email protected]>

commit e603f11d5df8997d104ab405ff27640b90baffaa upstream.

Follow the recommendation set by hda_intel.c and enable HDMI/DP codec wakeup during bus initialization procedure. Disable wakeup once init completes.

---
 sound/soc/intel/skylake/skl.c |    2 ++
 1 file changed, 2 insertions(+)
sound/soc/intel/skylake/skl.c +2 -0
@@ -129,6 +129,7 @@ static int skl_init_chip(struct hdac_bus
 	struct hdac_ext_link *hlink;
 	int ret;
 
+	snd_hdac_set_codec_wakeup(bus, true);
 	skl_enable_miscbdcge(bus->dev, false);
 	ret = snd_hdac_bus_init_chip(bus, full_reset);
 
@@ -137,6 +138,7 @@ static int skl_init_chip(struct hdac_bus
 		writel(0, hlink->ml_addr + AZX_REG_ML_LOSIDV);
 
 	skl_enable_miscbdcge(bus->dev, true);
+	snd_hdac_set_codec_wakeup(bus, false);
 
 	return ret;
 }

Patches currently in stable-queue which might be from [email protected] are

queue-5.4/asoc-intel-skylake-select-hda-configuration-permissively.patch queue-5.4/asoc-intel-skylake-enable-codec-wakeup-during-chip-init.patch queue-5.4/asoc-intel-allow-for-rom-init-retry-on-cnl-platforms.patch queue-5.4/asoc-intel-skylake-await-purge-request-ack-on-cnl.patch queue-5.4/asoc-intel-skylake-remove-superfluous-chip-initialization.patch queue-5.4/asoc-intel-skylake-shield-against-no-nhlt-configurations.patch queue-5.4/asoc-intel-multiple-i-o-pcm-format-support-for-pipe.patch queue-5.4/asoc-intel-skylake-automatic-dmic-format-configuration-according-to-information-from-nhlt.patch

author maintainer
#7 lore raw

PATCH 4/8 ASoC: Intel: Skylake: Shield against no-NHLT configurations

In reply to Cezary Rojewski

commit 9e6c382f5a6161eb55115fb56614b9827f2e7da3 upstream.

Some configurations expose no NHLT table at all within their /sys/firmware/acpi/tables. To prevent NULL-dereference errors from occurring, adjust probe flow and append additional safety checks in functions involved in NHLT lifecycle.

---
 sound/soc/intel/skylake/skl-nhlt.c | 3 ++-
 sound/soc/intel/skylake/skl.c      | 9 +++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)
sound/soc/intel/skylake/skl-nhlt.c +2 -1
index 19f328d71f24..d9c8f5cb389e 100644
@@ -182,7 +182,8 @@ void skl_nhlt_remove_sysfs(struct skl_dev *skl)
 {
 	struct device *dev = &skl->pci->dev;
 
-	sysfs_remove_file(&dev->kobj, &dev_attr_platform_id.attr);
+	if (skl->nhlt)
+		sysfs_remove_file(&dev->kobj, &dev_attr_platform_id.attr);
 }
 
 /*
sound/soc/intel/skylake/skl.c +7 -2
index 1a3a3d6a3141..2e5fbd220923 100644
@@ -632,6 +632,9 @@ static int skl_clock_device_register(struct skl_dev *skl)
 	struct platform_device_info pdevinfo = {NULL};
 	struct skl_clk_pdata *clk_pdata;
 
+	if (!skl->nhlt)
+		return 0;
+
 	clk_pdata = devm_kzalloc(&skl->pci->dev, sizeof(*clk_pdata),
 							GFP_KERNEL);
 	if (!clk_pdata)
@@ -1090,7 +1093,8 @@ static int skl_probe(struct pci_dev *pci,
 out_clk_free:
 	skl_clock_device_unregister(skl);
 out_nhlt_free:
-	intel_nhlt_free(skl->nhlt);
+	if (skl->nhlt)
+		intel_nhlt_free(skl->nhlt);
 out_free:
 	skl_free(bus);
 
@@ -1139,7 +1143,8 @@ static void skl_remove(struct pci_dev *pci)
 	skl_dmic_device_unregister(skl);
 	skl_clock_device_unregister(skl);
 	skl_nhlt_remove_sysfs(skl);
-	intel_nhlt_free(skl->nhlt);
+	if (skl->nhlt)
+		intel_nhlt_free(skl->nhlt);
 	skl_free(bus);
 	dev_set_drvdata(&pci->dev, NULL);
 }
Signature · 1 line
2.17.1
maintainer Applied
#8 lore raw

Patch "ASoC: Intel: Skylake: Shield against no-NHLT configurations" has been added to the 5.4-stable tree

This is a note to let you know that I've just added the patch titled

ASoC: Intel: Skylake: Shield against no-NHLT configurations

to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
asoc-intel-skylake-shield-against-no-nhlt-configurations.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From foo@baz Tue Dec 1 09:41:56 AM CET 2020
From: Cezary Rojewski <[email protected]>
Date: Sun, 29 Nov 2020 12:41:44 +0100
Subject: ASoC: Intel: Skylake: Shield against no-NHLT configurations
To: [email protected], [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], Cezary Rojewski <[email protected]>
Message-ID: <[email protected]>

From: Cezary Rojewski <[email protected]>

commit 9e6c382f5a6161eb55115fb56614b9827f2e7da3 upstream.

Some configurations expose no NHLT table at all within their /sys/firmware/acpi/tables. To prevent NULL-dereference errors from occurring, adjust probe flow and append additional safety checks in functions involved in NHLT lifecycle.

---
 sound/soc/intel/skylake/skl-nhlt.c |    3 ++-
 sound/soc/intel/skylake/skl.c      |    9 +++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)
sound/soc/intel/skylake/skl-nhlt.c +2 -1
@@ -182,7 +182,8 @@ void skl_nhlt_remove_sysfs(struct skl_de
 {
 	struct device *dev = &skl->pci->dev;
 
-	sysfs_remove_file(&dev->kobj, &dev_attr_platform_id.attr);
+	if (skl->nhlt)
+		sysfs_remove_file(&dev->kobj, &dev_attr_platform_id.attr);
 }
 
 /*
sound/soc/intel/skylake/skl.c +7 -2
@@ -632,6 +632,9 @@ static int skl_clock_device_register(str
 	struct platform_device_info pdevinfo = {NULL};
 	struct skl_clk_pdata *clk_pdata;
 
+	if (!skl->nhlt)
+		return 0;
+
 	clk_pdata = devm_kzalloc(&skl->pci->dev, sizeof(*clk_pdata),
 							GFP_KERNEL);
 	if (!clk_pdata)
@@ -1090,7 +1093,8 @@ out_dsp_free:
 out_clk_free:
 	skl_clock_device_unregister(skl);
 out_nhlt_free:
-	intel_nhlt_free(skl->nhlt);
+	if (skl->nhlt)
+		intel_nhlt_free(skl->nhlt);
 out_free:
 	skl_free(bus);
 
@@ -1139,7 +1143,8 @@ static void skl_remove(struct pci_dev *p
 	skl_dmic_device_unregister(skl);
 	skl_clock_device_unregister(skl);
 	skl_nhlt_remove_sysfs(skl);
-	intel_nhlt_free(skl->nhlt);
+	if (skl->nhlt)
+		intel_nhlt_free(skl->nhlt);
 	skl_free(bus);
 	dev_set_drvdata(&pci->dev, NULL);
 }

Patches currently in stable-queue which might be from [email protected] are

queue-5.4/asoc-intel-skylake-select-hda-configuration-permissively.patch queue-5.4/asoc-intel-skylake-enable-codec-wakeup-during-chip-init.patch queue-5.4/asoc-intel-allow-for-rom-init-retry-on-cnl-platforms.patch queue-5.4/asoc-intel-skylake-await-purge-request-ack-on-cnl.patch queue-5.4/asoc-intel-skylake-remove-superfluous-chip-initialization.patch queue-5.4/asoc-intel-skylake-shield-against-no-nhlt-configurations.patch queue-5.4/asoc-intel-multiple-i-o-pcm-format-support-for-pipe.patch queue-5.4/asoc-intel-skylake-automatic-dmic-format-configuration-according-to-information-from-nhlt.patch

author maintainer
#9 lore raw

PATCH 5/8 ASoC: Intel: Allow for ROM init retry on CNL platforms

In reply to Cezary Rojewski

commit 024aa45f55ccd40704cfdef61b2a8b6d0de9cdd1 upstream.

Due to unconditional initial timeouts, firmware may fail to load during its initialization. This issue cannot be resolved on driver side as it is caused by external sources such as CSME but has to be accounted for nonetheless.

Fixes cb6a55284629 ("ASoC: Intel: cnl: Add sst library functions for cnl platform")
Cc <[email protected]> # 5.4.x
---
 sound/soc/intel/skylake/bxt-sst.c     |  2 --
 sound/soc/intel/skylake/cnl-sst.c     | 15 ++++++++++-----
 sound/soc/intel/skylake/skl-sst-dsp.h |  1 +
 3 files changed, 11 insertions(+), 7 deletions(-)
sound/soc/intel/skylake/bxt-sst.c +0 -2
index 92a82e6b5fe6..cdafade8abd6 100644
@@ -38,8 +38,6 @@
 /* Delay before scheduling D0i3 entry */
 #define BXT_D0I3_DELAY 5000
 
-#define BXT_FW_ROM_INIT_RETRY 3
-
 static unsigned int bxt_get_errorcode(struct sst_dsp *ctx)
 {
 	 return sst_dsp_shim_read(ctx, BXT_ADSP_ERROR_CODE);
sound/soc/intel/skylake/cnl-sst.c +10 -5
index 4f64f097e9ae..060e47ae3391 100644
@@ -109,7 +109,7 @@ static int cnl_load_base_firmware(struct sst_dsp *ctx)
 {
 	struct firmware stripped_fw;
 	struct skl_dev *cnl = ctx->thread_context;
-	int ret;
+	int ret, i;
 
 	if (!ctx->fw) {
 		ret = request_firmware(&ctx->fw, ctx->fw_name, ctx->dev);
@@ -131,12 +131,16 @@ static int cnl_load_base_firmware(struct sst_dsp *ctx)
 	stripped_fw.size = ctx->fw->size;
 	skl_dsp_strip_extended_manifest(&stripped_fw);
 
-	ret = cnl_prepare_fw(ctx, stripped_fw.data, stripped_fw.size);
-	if (ret < 0) {
-		dev_err(ctx->dev, "prepare firmware failed: %d\n", ret);
-		goto cnl_load_base_firmware_failed;
+	for (i = 0; i < BXT_FW_ROM_INIT_RETRY; i++) {
+		ret = cnl_prepare_fw(ctx, stripped_fw.data, stripped_fw.size);
+		if (!ret)
+			break;
+		dev_dbg(ctx->dev, "prepare firmware failed: %d\n", ret);
 	}
 
+	if (ret < 0)
+		goto cnl_load_base_firmware_failed;
+
 	ret = sst_transfer_fw_host_dma(ctx);
 	if (ret < 0) {
 		dev_err(ctx->dev, "transfer firmware failed: %d\n", ret);
@@ -158,6 +162,7 @@ static int cnl_load_base_firmware(struct sst_dsp *ctx)
 	return 0;
 
 cnl_load_base_firmware_failed:
+	dev_err(ctx->dev, "firmware load failed: %d\n", ret);
 	release_firmware(ctx->fw);
 	ctx->fw = NULL;
 
sound/soc/intel/skylake/skl-sst-dsp.h +1 -0
index cdfec0fca577..067d1ea11cde 100644
@@ -67,6 +67,7 @@ struct skl_dev;
 
 #define SKL_FW_INIT			0x1
 #define SKL_FW_RFW_START		0xf
+#define BXT_FW_ROM_INIT_RETRY		3
 
 #define SKL_ADSPIC_IPC			1
 #define SKL_ADSPIS_IPC			1
Signature · 1 line
2.17.1
maintainer Applied
#10 lore raw

Patch "ASoC: Intel: Allow for ROM init retry on CNL platforms" has been added to the 5.4-stable tree

This is a note to let you know that I've just added the patch titled

ASoC: Intel: Allow for ROM init retry on CNL platforms

to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
asoc-intel-allow-for-rom-init-retry-on-cnl-platforms.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From foo@baz Tue Dec 1 09:41:56 AM CET 2020
From: Cezary Rojewski <[email protected]>
Date: Sun, 29 Nov 2020 12:41:45 +0100
Subject: ASoC: Intel: Allow for ROM init retry on CNL platforms
To: [email protected], [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], Cezary Rojewski <[email protected]>
Message-ID: <[email protected]>

From: Cezary Rojewski <[email protected]>

commit 024aa45f55ccd40704cfdef61b2a8b6d0de9cdd1 upstream.

Due to unconditional initial timeouts, firmware may fail to load during its initialization. This issue cannot be resolved on driver side as it is caused by external sources such as CSME but has to be accounted for nonetheless.

Fixes cb6a55284629 ("ASoC: Intel: cnl: Add sst library functions for cnl platform")
Cc <[email protected]> # 5.4.x
---
 sound/soc/intel/skylake/bxt-sst.c     |    2 --
 sound/soc/intel/skylake/cnl-sst.c     |   15 ++++++++++-----
 sound/soc/intel/skylake/skl-sst-dsp.h |    1 +
 3 files changed, 11 insertions(+), 7 deletions(-)
sound/soc/intel/skylake/bxt-sst.c +0 -2
@@ -38,8 +38,6 @@
 /* Delay before scheduling D0i3 entry */
 #define BXT_D0I3_DELAY 5000
 
-#define BXT_FW_ROM_INIT_RETRY 3
-
 static unsigned int bxt_get_errorcode(struct sst_dsp *ctx)
 {
 	 return sst_dsp_shim_read(ctx, BXT_ADSP_ERROR_CODE);
sound/soc/intel/skylake/cnl-sst.c +10 -5
@@ -109,7 +109,7 @@ static int cnl_load_base_firmware(struct
 {
 	struct firmware stripped_fw;
 	struct skl_dev *cnl = ctx->thread_context;
-	int ret;
+	int ret, i;
 
 	if (!ctx->fw) {
 		ret = request_firmware(&ctx->fw, ctx->fw_name, ctx->dev);
@@ -131,12 +131,16 @@ static int cnl_load_base_firmware(struct
 	stripped_fw.size = ctx->fw->size;
 	skl_dsp_strip_extended_manifest(&stripped_fw);
 
-	ret = cnl_prepare_fw(ctx, stripped_fw.data, stripped_fw.size);
-	if (ret < 0) {
-		dev_err(ctx->dev, "prepare firmware failed: %d\n", ret);
-		goto cnl_load_base_firmware_failed;
+	for (i = 0; i < BXT_FW_ROM_INIT_RETRY; i++) {
+		ret = cnl_prepare_fw(ctx, stripped_fw.data, stripped_fw.size);
+		if (!ret)
+			break;
+		dev_dbg(ctx->dev, "prepare firmware failed: %d\n", ret);
 	}
 
+	if (ret < 0)
+		goto cnl_load_base_firmware_failed;
+
 	ret = sst_transfer_fw_host_dma(ctx);
 	if (ret < 0) {
 		dev_err(ctx->dev, "transfer firmware failed: %d\n", ret);
@@ -158,6 +162,7 @@ static int cnl_load_base_firmware(struct
 	return 0;
 
 cnl_load_base_firmware_failed:
+	dev_err(ctx->dev, "firmware load failed: %d\n", ret);
 	release_firmware(ctx->fw);
 	ctx->fw = NULL;
 
sound/soc/intel/skylake/skl-sst-dsp.h +1 -0
@@ -67,6 +67,7 @@ struct skl_dev;
 
 #define SKL_FW_INIT			0x1
 #define SKL_FW_RFW_START		0xf
+#define BXT_FW_ROM_INIT_RETRY		3
 
 #define SKL_ADSPIC_IPC			1
 #define SKL_ADSPIS_IPC			1

Patches currently in stable-queue which might be from [email protected] are

queue-5.4/asoc-intel-skylake-select-hda-configuration-permissively.patch queue-5.4/asoc-intel-skylake-enable-codec-wakeup-during-chip-init.patch queue-5.4/asoc-intel-allow-for-rom-init-retry-on-cnl-platforms.patch queue-5.4/asoc-intel-skylake-await-purge-request-ack-on-cnl.patch queue-5.4/asoc-intel-skylake-remove-superfluous-chip-initialization.patch queue-5.4/asoc-intel-skylake-shield-against-no-nhlt-configurations.patch queue-5.4/asoc-intel-multiple-i-o-pcm-format-support-for-pipe.patch queue-5.4/asoc-intel-skylake-automatic-dmic-format-configuration-according-to-information-from-nhlt.patch

author maintainer
#11 lore raw

PATCH 6/8 ASoC: Intel: Skylake: Await purge request ack on CNL

In reply to Cezary Rojewski

commit 7693cadac86548b30389a6e11d78c38db654f393 upstream.

Each purge request is sent by driver after master core is powered up and unresetted but before it is unstalled. On unstall, ROM begins processing the request and initializing environment for FW load. Host should await ROM's ack before moving forward. Without doing so, ROM init poll may start too early and false timeouts can occur.

Fixes cb6a55284629 ("ASoC: Intel: cnl: Add sst library functions for cnl platform")
Cc <[email protected]> # 5.4.x
---
 sound/soc/intel/skylake/bxt-sst.c     |  1 -
 sound/soc/intel/skylake/cnl-sst.c     | 20 ++++++++++++++++++--
 sound/soc/intel/skylake/skl-sst-dsp.h |  1 +
 3 files changed, 19 insertions(+), 3 deletions(-)
sound/soc/intel/skylake/bxt-sst.c +0 -1
index cdafade8abd6..38b9d7494083 100644
@@ -17,7 +17,6 @@
 #include "skl.h"
 
 #define BXT_BASEFW_TIMEOUT	3000
-#define BXT_INIT_TIMEOUT	300
 #define BXT_ROM_INIT_TIMEOUT	70
 #define BXT_IPC_PURGE_FW	0x01004000
 
sound/soc/intel/skylake/cnl-sst.c +18 -2
index 060e47ae3391..c6abcd5aa67b 100644
@@ -57,18 +57,34 @@ static int cnl_prepare_fw(struct sst_dsp *ctx, const void *fwdata, u32 fwsize)
 	ctx->dsp_ops.stream_tag = stream_tag;
 	memcpy(ctx->dmab.area, fwdata, fwsize);
 
+	ret = skl_dsp_core_power_up(ctx, SKL_DSP_CORE0_MASK);
+	if (ret < 0) {
+		dev_err(ctx->dev, "dsp core0 power up failed\n");
+		ret = -EIO;
+		goto base_fw_load_failed;
+	}
+
 	/* purge FW request */
 	sst_dsp_shim_write(ctx, CNL_ADSP_REG_HIPCIDR,
 			   CNL_ADSP_REG_HIPCIDR_BUSY | (CNL_IPC_PURGE |
 			   ((stream_tag - 1) << CNL_ROM_CTRL_DMA_ID)));
 
-	ret = cnl_dsp_enable_core(ctx, SKL_DSP_CORE0_MASK);
+	ret = skl_dsp_start_core(ctx, SKL_DSP_CORE0_MASK);
 	if (ret < 0) {
-		dev_err(ctx->dev, "dsp boot core failed ret: %d\n", ret);
+		dev_err(ctx->dev, "Start dsp core failed ret: %d\n", ret);
 		ret = -EIO;
 		goto base_fw_load_failed;
 	}
 
+	ret = sst_dsp_register_poll(ctx, CNL_ADSP_REG_HIPCIDA,
+				    CNL_ADSP_REG_HIPCIDA_DONE,
+				    CNL_ADSP_REG_HIPCIDA_DONE,
+				    BXT_INIT_TIMEOUT, "HIPCIDA Done");
+	if (ret < 0) {
+		dev_err(ctx->dev, "timeout for purge request: %d\n", ret);
+		goto base_fw_load_failed;
+	}
+
 	/* enable interrupt */
 	cnl_ipc_int_enable(ctx);
 	cnl_ipc_op_int_enable(ctx);
sound/soc/intel/skylake/skl-sst-dsp.h +1 -0
index 067d1ea11cde..1df9ef422f61 100644
@@ -68,6 +68,7 @@ struct skl_dev;
 #define SKL_FW_INIT			0x1
 #define SKL_FW_RFW_START		0xf
 #define BXT_FW_ROM_INIT_RETRY		3
+#define BXT_INIT_TIMEOUT		300
 
 #define SKL_ADSPIC_IPC			1
 #define SKL_ADSPIS_IPC			1
Signature · 1 line
2.17.1
maintainer Applied
#12 lore raw

Patch "ASoC: Intel: Skylake: Await purge request ack on CNL" has been added to the 5.4-stable tree

This is a note to let you know that I've just added the patch titled

ASoC: Intel: Skylake: Await purge request ack on CNL

to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
asoc-intel-skylake-await-purge-request-ack-on-cnl.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From foo@baz Tue Dec 1 09:41:56 AM CET 2020
From: Cezary Rojewski <[email protected]>
Date: Sun, 29 Nov 2020 12:41:46 +0100
Subject: ASoC: Intel: Skylake: Await purge request ack on CNL
To: [email protected], [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], Cezary Rojewski <[email protected]>
Message-ID: <[email protected]>

From: Cezary Rojewski <[email protected]>

commit 7693cadac86548b30389a6e11d78c38db654f393 upstream.

Each purge request is sent by driver after master core is powered up and unresetted but before it is unstalled. On unstall, ROM begins processing the request and initializing environment for FW load. Host should await ROM's ack before moving forward. Without doing so, ROM init poll may start too early and false timeouts can occur.

Fixes cb6a55284629 ("ASoC: Intel: cnl: Add sst library functions for cnl platform")
Cc <[email protected]> # 5.4.x
---
 sound/soc/intel/skylake/bxt-sst.c     |    1 -
 sound/soc/intel/skylake/cnl-sst.c     |   20 ++++++++++++++++++--
 sound/soc/intel/skylake/skl-sst-dsp.h |    1 +
 3 files changed, 19 insertions(+), 3 deletions(-)
sound/soc/intel/skylake/bxt-sst.c +0 -1
@@ -17,7 +17,6 @@
 #include "skl.h"
 
 #define BXT_BASEFW_TIMEOUT	3000
-#define BXT_INIT_TIMEOUT	300
 #define BXT_ROM_INIT_TIMEOUT	70
 #define BXT_IPC_PURGE_FW	0x01004000
 
sound/soc/intel/skylake/cnl-sst.c +18 -2
@@ -57,18 +57,34 @@ static int cnl_prepare_fw(struct sst_dsp
 	ctx->dsp_ops.stream_tag = stream_tag;
 	memcpy(ctx->dmab.area, fwdata, fwsize);
 
+	ret = skl_dsp_core_power_up(ctx, SKL_DSP_CORE0_MASK);
+	if (ret < 0) {
+		dev_err(ctx->dev, "dsp core0 power up failed\n");
+		ret = -EIO;
+		goto base_fw_load_failed;
+	}
+
 	/* purge FW request */
 	sst_dsp_shim_write(ctx, CNL_ADSP_REG_HIPCIDR,
 			   CNL_ADSP_REG_HIPCIDR_BUSY | (CNL_IPC_PURGE |
 			   ((stream_tag - 1) << CNL_ROM_CTRL_DMA_ID)));
 
-	ret = cnl_dsp_enable_core(ctx, SKL_DSP_CORE0_MASK);
+	ret = skl_dsp_start_core(ctx, SKL_DSP_CORE0_MASK);
 	if (ret < 0) {
-		dev_err(ctx->dev, "dsp boot core failed ret: %d\n", ret);
+		dev_err(ctx->dev, "Start dsp core failed ret: %d\n", ret);
 		ret = -EIO;
 		goto base_fw_load_failed;
 	}
 
+	ret = sst_dsp_register_poll(ctx, CNL_ADSP_REG_HIPCIDA,
+				    CNL_ADSP_REG_HIPCIDA_DONE,
+				    CNL_ADSP_REG_HIPCIDA_DONE,
+				    BXT_INIT_TIMEOUT, "HIPCIDA Done");
+	if (ret < 0) {
+		dev_err(ctx->dev, "timeout for purge request: %d\n", ret);
+		goto base_fw_load_failed;
+	}
+
 	/* enable interrupt */
 	cnl_ipc_int_enable(ctx);
 	cnl_ipc_op_int_enable(ctx);
sound/soc/intel/skylake/skl-sst-dsp.h +1 -0
@@ -68,6 +68,7 @@ struct skl_dev;
 #define SKL_FW_INIT			0x1
 #define SKL_FW_RFW_START		0xf
 #define BXT_FW_ROM_INIT_RETRY		3
+#define BXT_INIT_TIMEOUT		300
 
 #define SKL_ADSPIC_IPC			1
 #define SKL_ADSPIS_IPC			1

Patches currently in stable-queue which might be from [email protected] are

queue-5.4/asoc-intel-skylake-select-hda-configuration-permissively.patch queue-5.4/asoc-intel-skylake-enable-codec-wakeup-during-chip-init.patch queue-5.4/asoc-intel-allow-for-rom-init-retry-on-cnl-platforms.patch queue-5.4/asoc-intel-skylake-await-purge-request-ack-on-cnl.patch queue-5.4/asoc-intel-skylake-remove-superfluous-chip-initialization.patch queue-5.4/asoc-intel-skylake-shield-against-no-nhlt-configurations.patch queue-5.4/asoc-intel-multiple-i-o-pcm-format-support-for-pipe.patch queue-5.4/asoc-intel-skylake-automatic-dmic-format-configuration-according-to-information-from-nhlt.patch

author maintainer
#13 lore raw

PATCH 7/8 ASoC: Intel: Multiple I/O PCM format support for pipe

In reply to Cezary Rojewski

From: Mateusz Gorski <[email protected]>

commit 1b450791d517d4d6666ab9ab6d9a20c8819e3572 upstream.

For pipes supporting multiple input/output formats, kcontrol is created and selection of pipe input and output configuration is done based on control set.

If more than one configuration is supported, then this patch allows user to select configuration of choice using amixer settings.

---
 include/uapi/sound/skl-tplg-interface.h |  1 +
 sound/soc/intel/skylake/skl-topology.c  | 95 +++++++++++++++++++++++++
 sound/soc/intel/skylake/skl-topology.h  |  1 +
 3 files changed, 97 insertions(+)
include/uapi/sound/skl-tplg-interface.h +1 -0
index 9eee32f5e407..f2711186c81f 100644
@@ -18,6 +18,7 @@
  */
 #define SKL_CONTROL_TYPE_BYTE_TLV	0x100
 #define SKL_CONTROL_TYPE_MIC_SELECT	0x102
+#define SKL_CONTROL_TYPE_MULTI_IO_SELECT	0x103
 
 #define HDA_SST_CFG_MAX	900 /* size of copier cfg*/
 #define MAX_IN_QUEUE 8
sound/soc/intel/skylake/skl-topology.c +95 -0

119 lines not on this page · raw message

sound/soc/intel/skylake/skl-topology.h +1 -0
index e967800dbb62..06576147cc29 100644
@@ -306,6 +306,7 @@ struct skl_pipe {
 	struct skl_path_config configs[SKL_MAX_PATH_CONFIGS];
 	struct list_head w_list;
 	bool passthru;
+	u32 pipe_config_idx;
 };
 
 enum skl_module_state {
Signature · 1 line
2.17.1
maintainer Applied
#14 lore raw

Patch "ASoC: Intel: Multiple I/O PCM format support for pipe" has been added to the 5.4-stable tree

This is a note to let you know that I've just added the patch titled

ASoC: Intel: Multiple I/O PCM format support for pipe

to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
asoc-intel-multiple-i-o-pcm-format-support-for-pipe.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From foo@baz Tue Dec 1 09:41:56 AM CET 2020
From: Cezary Rojewski <[email protected]>
Date: Sun, 29 Nov 2020 12:41:47 +0100
Subject: ASoC: Intel: Multiple I/O PCM format support for pipe
To: [email protected], [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], Pavan K S <[email protected]>
Message-ID: <[email protected]>

From: Mateusz Gorski <[email protected]>

commit 1b450791d517d4d6666ab9ab6d9a20c8819e3572 upstream.

For pipes supporting multiple input/output formats, kcontrol is created and selection of pipe input and output configuration is done based on control set.

If more than one configuration is supported, then this patch allows user to select configuration of choice using amixer settings.

---
 include/uapi/sound/skl-tplg-interface.h |    1 
 sound/soc/intel/skylake/skl-topology.c  |   95 ++++++++++++++++++++++++++++++++
 sound/soc/intel/skylake/skl-topology.h  |    1 
 3 files changed, 97 insertions(+)
include/uapi/sound/skl-tplg-interface.h +1 -0
@@ -18,6 +18,7 @@
  */
 #define SKL_CONTROL_TYPE_BYTE_TLV	0x100
 #define SKL_CONTROL_TYPE_MIC_SELECT	0x102
+#define SKL_CONTROL_TYPE_MULTI_IO_SELECT	0x103
 
 #define HDA_SST_CFG_MAX	900 /* size of copier cfg*/
 #define MAX_IN_QUEUE 8
sound/soc/intel/skylake/skl-topology.c +95 -0

119 lines not on this page · raw message

sound/soc/intel/skylake/skl-topology.h +1 -0
@@ -306,6 +306,7 @@ struct skl_pipe {
 	struct skl_path_config configs[SKL_MAX_PATH_CONFIGS];
 	struct list_head w_list;
 	bool passthru;
+	u32 pipe_config_idx;
 };
 
 enum skl_module_state {

Patches currently in stable-queue which might be from [email protected] are

queue-5.4/asoc-intel-skylake-select-hda-configuration-permissively.patch queue-5.4/asoc-intel-skylake-enable-codec-wakeup-during-chip-init.patch queue-5.4/asoc-intel-allow-for-rom-init-retry-on-cnl-platforms.patch queue-5.4/asoc-intel-skylake-await-purge-request-ack-on-cnl.patch queue-5.4/asoc-intel-skylake-remove-superfluous-chip-initialization.patch queue-5.4/asoc-intel-skylake-shield-against-no-nhlt-configurations.patch queue-5.4/asoc-intel-multiple-i-o-pcm-format-support-for-pipe.patch queue-5.4/asoc-intel-skylake-automatic-dmic-format-configuration-according-to-information-from-nhlt.patch

author maintainer
#15 lore raw

PATCH 8/8 ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHLT

In reply to Cezary Rojewski

From: Mateusz Gorski <[email protected]>

commit 2d744ecf2b98405723a2138a547e5c75009bc4e5 upstream.

Automatically choose DMIC pipeline format configuration depending on information included in NHLT.
Change the access rights of appropriate kcontrols to read-only in order to prevent user interference.

---
 include/uapi/sound/skl-tplg-interface.h |  1 +
 sound/soc/intel/skylake/skl-topology.c  | 64 +++++++++++++++++++++++--
 2 files changed, 62 insertions(+), 3 deletions(-)
include/uapi/sound/skl-tplg-interface.h +1 -0
index f2711186c81f..a93c0decfdd5 100644
@@ -19,6 +19,7 @@
 #define SKL_CONTROL_TYPE_BYTE_TLV	0x100
 #define SKL_CONTROL_TYPE_MIC_SELECT	0x102
 #define SKL_CONTROL_TYPE_MULTI_IO_SELECT	0x103
+#define SKL_CONTROL_TYPE_MULTI_IO_SELECT_DMIC	0x104
 
 #define HDA_SST_CFG_MAX	900 /* size of copier cfg*/
 #define MAX_IN_QUEUE 8
sound/soc/intel/skylake/skl-topology.c +61 -3

97 lines not on this page · raw message

Signature · 1 line
2.17.1
maintainer Applied
#16 lore raw

Patch "ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHLT" has been added to the 5.4-stable tree

This is a note to let you know that I've just added the patch titled

ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHLT

to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
asoc-intel-skylake-automatic-dmic-format-configuration-according-to-information-from-nhlt.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From foo@baz Tue Dec 1 09:41:56 AM CET 2020
From: Cezary Rojewski <[email protected]>
Date: Sun, 29 Nov 2020 12:41:48 +0100
Subject: ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHLT
To: [email protected], [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Message-ID: <[email protected]>

From: Mateusz Gorski <[email protected]>

commit 2d744ecf2b98405723a2138a547e5c75009bc4e5 upstream.

Automatically choose DMIC pipeline format configuration depending on information included in NHLT.
Change the access rights of appropriate kcontrols to read-only in order to prevent user interference.

---
 include/uapi/sound/skl-tplg-interface.h |    1 
 sound/soc/intel/skylake/skl-topology.c  |   64 ++++++++++++++++++++++++++++++--
 2 files changed, 62 insertions(+), 3 deletions(-)
include/uapi/sound/skl-tplg-interface.h +1 -0
@@ -19,6 +19,7 @@
 #define SKL_CONTROL_TYPE_BYTE_TLV	0x100
 #define SKL_CONTROL_TYPE_MIC_SELECT	0x102
 #define SKL_CONTROL_TYPE_MULTI_IO_SELECT	0x103
+#define SKL_CONTROL_TYPE_MULTI_IO_SELECT_DMIC	0x104
 
 #define HDA_SST_CFG_MAX	900 /* size of copier cfg*/
 #define MAX_IN_QUEUE 8
sound/soc/intel/skylake/skl-topology.c +61 -3

97 lines not on this page · raw message

Patches currently in stable-queue which might be from [email protected] are

queue-5.4/asoc-intel-skylake-select-hda-configuration-permissively.patch queue-5.4/asoc-intel-skylake-enable-codec-wakeup-during-chip-init.patch queue-5.4/asoc-intel-allow-for-rom-init-retry-on-cnl-platforms.patch queue-5.4/asoc-intel-skylake-await-purge-request-ack-on-cnl.patch queue-5.4/asoc-intel-skylake-remove-superfluous-chip-initialization.patch queue-5.4/asoc-intel-skylake-shield-against-no-nhlt-configurations.patch queue-5.4/asoc-intel-multiple-i-o-pcm-format-support-for-pipe.patch queue-5.4/asoc-intel-skylake-automatic-dmic-format-configuration-according-to-information-from-nhlt.patch

#17 lore raw
In reply to Cezary Rojewski
Quoted 12 lines · Cezary Rojewski

First six of the backport address numerous problems troubling HDAudio configuration users for Skylake driver. Upstream series:
"ASoC: Intel: Skylake: Fix HDaudio and Dmic" [1] provides the explanation and reasoning behind it. These have been initialy pushed into v5.7-rc1 via: "sound updates for 5.7-rc1" [2] by Takashi.

Last two patches are from: "Add support for different DMIC configurations" [3] which focuses on HDAudio with DMIC configuration.
Patch: "ASoC: Intel: Skylake: Add alternative topology binary name" of the mentioned series has already been merged to v5.4.y -stable and thus it's not included here.

Quoted 6 lines

Fixes target mainly Skylake and Kabylake based platforms, released in 2015-2016 period.

[1]: https://lore.kernel.org/alsa-devel/[email protected]/
[2]: https://lore.kernel.org/lkml/[email protected]/
[3]: https://lore.kernel.org/alsa-devel/[email protected]/

Thanks for these, it was very easy to pick them up in this format, much appreciated.

greg k-h