Skip to contentSkip to conversation

ASoC: Intel: HDA: two cleanups

PATCH In review Pierre-Louis Bossart 2 participants 4 messages Jun 6, 2023 – Jun 7, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ASoC: Intel: HDA: two cleanups

One removal of a non-existent Kconfig initialization and one correction to enable SoundWire link when no HDaudio external codec is detected. This will generate more information and help resolve cases where the ACPI information is incorrect.

Pierre-Louis Bossart (2):
ASoC: SOF: Intel: fix SoundWire/HDaudio mutual exclusion
ASoC: SOF: Intel: hda-pcm: remove kernel parameter init

 sound/soc/sof/intel/hda-pcm.c |  2 +-
 sound/soc/sof/intel/hda.c     | 12 +++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
Signature · 1 line
2.37.2
#1 lore raw

PATCH 1/2 ASoC: SOF: Intel: fix SoundWire/HDaudio mutual exclusion

The functionality described in Commit 61bef9e68dca ("ASoC: SOF: Intel: hda: enforce exclusion between HDaudio and SoundWire") does not seem to be properly implemented with two issues that need to
be corrected.

a) The test used is incorrect when DisplayAudio codecs are not supported.

b) Conversely when only Display Audio codecs can be found, we do want to start the SoundWire links, if any. That will help add the relevant topologies and machine descriptors, and identify cases where the SoundWire information in ACPI needs to be modified with a quirk.

---
 sound/soc/sof/intel/hda.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
sound/soc/sof/intel/hda.c +11 -1
index b1db940f9f25..64bebe1a72bb 100644
@@ -1391,12 +1391,22 @@ static void hda_generic_machine_select(struct snd_sof_dev *sdev,
 			hda_mach->mach_params.dmic_num = dmic_num;
 			pdata->tplg_filename = tplg_filename;
 
-			if (codec_num == 2) {
+			if (codec_num == 2 ||
+			    (codec_num == 1 && !HDA_IDISP_CODEC(bus->codec_mask))) {
 				/*
 				 * Prevent SoundWire links from starting when an external
 				 * HDaudio codec is used
 				 */
 				hda_mach->mach_params.link_mask = 0;
+			} else {
+				/*
+				 * Allow SoundWire links to start when no external HDaudio codec
+				 * was detected. This will not create a SoundWire card but
+				 * will help detect if any SoundWire codec reports as ATTACHED.
+				 */
+				struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata;
+
+				hda_mach->mach_params.link_mask = hdev->info.link_mask;
 			}
 
 			*mach = hda_mach;
Signature · 1 line
2.37.2
#2 lore raw

PATCH 2/2 ASoC: SOF: Intel: hda-pcm: remove kernel parameter init

In reply to Pierre-Louis Bossart

The 'hda_disable_rewinds' kernel parameter is initialized with a non-existent CONFIG_SND_SOC_SOF_HDA_DISABLE_REWINDS.

We probably forgot to clean this up when this Kconfig option was removed when upstreaming in 2021.

---
 sound/soc/sof/intel/hda-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/intel/hda-pcm.c +1 -1
index 981e7b699bdb..f23c72cdff48 100644
@@ -33,7 +33,7 @@ static bool hda_always_enable_dmi_l1;
 module_param_named(always_enable_dmi_l1, hda_always_enable_dmi_l1, bool, 0444);
 MODULE_PARM_DESC(always_enable_dmi_l1, "SOF HDA always enable DMI l1");
 
-static bool hda_disable_rewinds = IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_DISABLE_REWINDS);
+static bool hda_disable_rewinds;
 module_param_named(disable_rewinds, hda_disable_rewinds, bool, 0444);
 MODULE_PARM_DESC(disable_rewinds, "SOF HDA disable rewinds");
 
Signature · 1 line
2.37.2
maintainer
#3 lore raw
In reply to Pierre-Louis Bossart
Quoted 10 lines · Pierre-Louis Bossart

One removal of a non-existent Kconfig initialization and one correction to enable SoundWire link when no HDaudio external codec is detected. This will generate more information and help resolve cases where the ACPI information is incorrect.

Pierre-Louis Bossart (2):
ASoC: SOF: Intel: fix SoundWire/HDaudio mutual exclusion
ASoC: SOF: Intel: hda-pcm: remove kernel parameter init

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: SOF: Intel: fix SoundWire/HDaudio mutual exclusion

      commit: f751b99255cacd9ffe8c4bbf99767ad670cee1f7
[2/2] ASoC: SOF: Intel: hda-pcm: remove kernel parameter init
      commit: 3bd45b8dea73eabc9bbfdcdc69675e3ef8ca8920

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark