Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Lenovo Ideapad slim 3i: Invalid SoundWire configuration reported on HDaudio platform. #4962

Closed
PavloIT115 opened this issue Apr 30, 2024 · 18 comments · Fixed by #4963
Closed
Labels
ADL Applies to Alder Lake platform bug Something isn't working HDA Applies to HD-Audio bus for codec connection

Comments

@PavloIT115
Copy link

PavloIT115 commented Apr 30, 2024

Hello. I'm have a Lenovo ideapad slim 3i. Don't work sound (not found sound card). System Arch Linux, kernel 6.8.8 arch, pkg sof-firmware installed

log dmesg - https://pastebin.com/WWudLnkF

fragment sof log dmesg

[    5.739159] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[    5.739188] sof-audio-pci-intel-tgl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[    5.739202] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002)
[    5.739392] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[    5.739463] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    5.746087] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[    5.780311] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 0
[    5.780317] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5
[    5.783361] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware paths/files for ipc type 0:
[    5.783365] sof-audio-pci-intel-tgl 0000:00:1f.3:  Firmware file:     intel/sof/sof-adl-n.ri
[    5.783366] sof-audio-pci-intel-tgl 0000:00:1f.3:  Topology file:     intel/sof-tplg/sof-adl-rt711.tplg
[    5.783722] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    5.783724] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[    5.783728] sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
[    5.787045] iwlwifi 0000:00:14.3: base HW address: bc:03:58:85:98:46
[    5.881061] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
[    5.881082] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0
[    5.883475] soundwire_intel soundwire_intel.link.0: Bus clash for control word
[    5.883483] soundwire_intel soundwire_intel.link.0: Bus clash for data word
[    5.883571] soundwire_intel soundwire_intel.link.0: Bus clash for control word
[    5.883650] soundwire_intel soundwire_intel.link.0: Bus clash for control word
[    5.883734] soundwire_intel soundwire_intel.link.0: Bus clash for control word
[    5.883844] soundwire_intel soundwire_intel.link.0: Bus clash for control word
[    5.883921] soundwire_intel soundwire_intel.link.0: Bus clash for control word
[    5.884036] soundwire_intel soundwire_intel.link.0: Bus clash for control word
[    5.884112] soundwire_intel soundwire_intel.link.0: Bus clash for control word
[    5.884191] soundwire_intel soundwire_intel.link.0: Bus clash for control word
[    5.884290] soundwire_intel soundwire_intel.link.0: Bus clash for control word
[    5.904724] sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:0
[    5.904793] sof-audio-pci-intel-tgl 0000:00:1f.3: error: can't connect DAI HDA3.OUT stream iDisp4
[    5.904795] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to add widget id 0 type 27 name : HDA3.OUT stream iDisp4
[    5.904801] sof_sdw sof_sdw: ASoC: failed to load widget HDA3.OUT
[    5.904803] sof_sdw sof_sdw: ASoC: topology: could not load header: -22
[    5.904813] sof-audio-pci-intel-tgl 0000:00:1f.3: error: tplg component load failed -22
[    5.904816] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP topology -22
[    5.904817] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
[    5.904828] sof_sdw sof_sdw: ASoC: failed to instantiate card -22
[    5.904895] sof_sdw sof_sdw: error -EINVAL: snd_soc_register_card failed -22
[    5.904905] sof_sdw: probe of sof_sdw failed with error -22

I`m installed https://github.com/thesofproject/sof-bin, this doesn't work

@PavloIT115 PavloIT115 added the bug Something isn't working label Apr 30, 2024
@plbossart
Copy link
Member

can you attach the results of 'bash alsa-info.sh.txt'
alsa-info.sh.txt

At a high level it looks like you have an HDaudio platform (hda codecs found, mask 5) but trying to load a SoundWire topology with RT711. That's probably a bad ACPI table...

@plbossart plbossart transferred this issue from thesofproject/sof Apr 30, 2024
@PavloIT115
Copy link
Author

can you attach the results of 'bash alsa-info.sh.txt' alsa-info.sh.txt

At a high level it looks like you have an HDaudio platform (hda codecs found, mask 5) but trying to load a SoundWire topology with RT711. That's probably a bad ACPI table...

https://pastebin.com/1f47K3Sn

@plbossart
Copy link
Member

the Lenovo ACPI information is clearly bogus, it reports two RT711 jack codecs on link0 and link1. That makes zero sense.

Realtek 0x000020025d071100
Realtek 0x000120025d071100

We've got to ignore this and use HDaudio instead. Gah.

@plbossart plbossart changed the title [BUG] [BUG] Lenov Ideapad slim 3i: Invalid SoundWire configuration reported on HDaudio platform. Apr 30, 2024
@plbossart plbossart added TGL Applies to Tiger Lake platform HDA Applies to HD-Audio bus for codec connection labels Apr 30, 2024
@plbossart plbossart changed the title [BUG] Lenov Ideapad slim 3i: Invalid SoundWire configuration reported on HDaudio platform. [BUG] Lenovo Ideapad slim 3i: Invalid SoundWire configuration reported on HDaudio platform. Apr 30, 2024
@PavloIT115
Copy link
Author

Інформація про ACPI Lenovo явно фальшива, вона повідомляє про два кодеки роз’єму RT711 на link0 та link1. Це не має сенсу.

Realtek 0x000020025d071100
Realtek 0x000120025d071100

Ми повинні ігнорувати це і замість цього використовувати HDaudio. Гах.

I need to load snd_intel_hda? Or just waiting information from you?

plbossart added a commit to plbossart/sound that referenced this issue Apr 30, 2024
… reported

The machine driver and topology selection starts with I2S, then
SoundWire and last uses HDaudio as a fallback. That assumes that the
ACPI information is correc,t but there are of course exceptions to the
rule.

On a Lenovo platform, an external HDaudio codec is detected, but the
ACPI tables expose TWO RT711 jack codecs. This patch skips the
SoundWire selection in case an external HDaudio codec is detected -
which only works with the additional assumption that no one will mix
HDaudio and SoundWire.

Closes: thesofproject#4962
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@plbossart
Copy link
Member

@PavloIT115 can you try the patch in PR #4963 ?

@PavloIT115
Copy link
Author

@PavloIT115чи можете ви спробувати патч у PR #4963 ?

If you tell me step by step what to do, I can do it. I have little experience with github

@plbossart
Copy link
Member

@PavloIT115
Copy link
Author

@plbossart
Copy link
Member

@mrhpearson FYI. The Linux single-build support really relies on valid ACPI information to detect which of I2S/SoundWire/HDaudio interfaces/topologies to use, I really don't think the DSDT is correct in this case.

@plbossart plbossart added ADL Applies to Alder Lake platform and removed TGL Applies to Tiger Lake platform labels Apr 30, 2024
@mrhpearson
Copy link

Thanks - unfortunately I have very limited levers to get anything fixed on the Ideapads as they're not in the Linux program.
I'll flag this to them in case I get lucky....

@PavloIT115
Copy link
Author

PavloIT115 commented Apr 30, 2024

https://thesofproject.github.io/latest/getting_started/setup_linux/install_locally.html
4.Get the kernel source.

If a maintainer requests that you check out a different branch to test a bug fix, add -b [branch] to the end of this command, where [branch] is the branch name.

Me need to specify something here? Or just continue according to the instructions?

@plbossart
Copy link
Member

@PavloIT115 it's simpler if you take the code for your existing kernel and apply the patch from PR #4963 on top.
Arch Linux usually have really good documentation on compiling your own stuff.

plbossart added a commit to plbossart/sound that referenced this issue Apr 30, 2024
… reported

The machine driver and topology selection starts with I2S, then
SoundWire and last uses HDaudio as a fallback. That assumes that the
ACPI information is correc,t but there are of course exceptions to the
rule.

On a Lenovo platform, an external HDaudio codec is detected, but the
ACPI tables expose TWO RT711 jack codecs. This patch skips the
SoundWire selection in case an external HDaudio codec is detected -
which only works with the additional assumption that no one will mix
HDaudio and SoundWire.

Closes: thesofproject#4962
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@PavloIT115
Copy link
Author

@PavloIT115 it's simpler if you take the code for your existing kernel and apply the patch from PR #4963 on top. Arch Linux usually have really good documentation on compiling your own stuff.

Sorry but i am very confused in github. I see changes hda.c and hda.h here. But I don't know what to do with them locally (git *, uh, I can't even describe what I can't do, because I know practically nothing.). I'm far from kernel builds, I'm just lame in programming

@plbossart
Copy link
Member

@PavloIT115 if you are not comfortable with compiling the kernel, you can still help with this option to add in /etc/modprobe.d/alsa-base.conf

options snd-intel-dspcfg dsp_driver=1

That will tell us if indeed the HDaudio-based card works or not.

@PavloIT115
Copy link
Author

PavloIT115 commented Apr 30, 2024

@PavloIT115 if you are not comfortable with compiling the kernel, you can still help with this option to add in /etc/modprobe.d/alsa-base.conf

options snd-intel-dspcfg dsp_driver=1

That will tell us if indeed the HDaudio-based card works or not.

This working! Thx You!
But for some reason, the right speaker can be heard in the middle of the laptop. It's his maybe design...

@plbossart
Copy link
Member

@PavloIT115 the speaker setup is a known problematic issue, we have nothing in Linux which tells us what to do, so usually the only way to progress is to reverse-engineer the Windows driver, see https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#reverse-engineer-the-windows-audio-driver

If it sounds crazy it's because it is...

@PavloIT115
Copy link
Author

@PavloIT115 the speaker setup is a known problematic issue, we have nothing in Linux which tells us what to do, so usually the only way to progress is to reverse-engineer the Windows driver, see https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#reverse-engineer-the-windows-audio-driver

If it sounds crazy it's because it is...

By the way! Windows was never installed on this laptop : D. I`m need to check the sound there. If anything, I'll write back

@PavloIT115
Copy link
Author

If anything, I'll write back

This is how the laptop speakers are arranged. In Windows it's the same

plbossart added a commit to plbossart/sound that referenced this issue May 1, 2024
… reported

The machine driver and topology selection starts with I2S, then
SoundWire and last uses HDaudio as a fallback. That assumes that the
ACPI information is correct but there are of course exceptions to the
rule.

On a Lenovo platform, an external HDaudio codec is detected, but the
ACPI tables expose TWO RT711 jack codecs. This patch skips the
SoundWire selection in case an external HDaudio codec is detected -
which only works with the additional assumption that no one will mix
HDaudio and SoundWire.

Closes: thesofproject#4962
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
plbossart added a commit that referenced this issue May 2, 2024
… reported

The machine driver and topology selection starts with I2S, then
SoundWire and last uses HDaudio as a fallback. That assumes that the
ACPI information is correct but there are of course exceptions to the
rule.

On a Lenovo platform, an external HDaudio codec is detected, but the
ACPI tables expose TWO RT711 jack codecs. This patch skips the
SoundWire selection in case an external HDaudio codec is detected -
which only works with the additional assumption that no one will mix
HDaudio and SoundWire.

Closes: #4962
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
plbossart added a commit that referenced this issue May 3, 2024
… reported

The machine driver and topology selection starts with I2S, then
SoundWire and last uses HDaudio as a fallback. That assumes that the
ACPI information is correct but there are of course exceptions to the
rule.

On a Lenovo platform, an external HDaudio codec is detected, but the
ACPI tables expose TWO RT711 jack codecs. This patch skips the
SoundWire selection in case an external HDaudio codec is detected -
which only works with the additional assumption that no one will mix
HDaudio and SoundWire.

Closes: #4962
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
plbossart added a commit that referenced this issue May 3, 2024
… reported

The machine driver and topology selection starts with I2S, then
SoundWire and last uses HDaudio as a fallback. That assumes that the
ACPI information is correct but there are of course exceptions to the
rule.

On a Lenovo platform, an external HDaudio codec is detected, but the
ACPI tables expose TWO RT711 jack codecs. This patch skips the
SoundWire selection in case an external HDaudio codec is detected -
which only works with the additional assumption that no one will mix
HDaudio and SoundWire.

Closes: #4962
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue May 7, 2024
… reported

The machine driver and topology selection starts with I2S, then
SoundWire and last uses HDaudio as a fallback. That assumes that the
ACPI information is correct but there are of course exceptions to the
rule.

On a Lenovo platform, an external HDaudio codec is detected, but the
ACPI tables expose TWO RT711 jack codecs. This patch skips the
SoundWire selection in case an external HDaudio codec is detected -
which only works with the additional assumption that no one will mix
HDaudio and SoundWire.

Closes: thesofproject#4962
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240503133253.108201-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADL Applies to Alder Lake platform bug Something isn't working HDA Applies to HD-Audio bus for codec connection
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants