-
Notifications
You must be signed in to change notification settings - Fork 132
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] Unsupported DMIC blobs on Huawei Matebook X Pro 2024 (Intel Core Ultra 9 185H) #4973
Comments
Humm, surprising.
This was a known error in earlier versions of the kernel, reported in #4689 Your version is 6.8.0-31, in theory this patch is present in your kernel? Can you extract the NHLT table and share it?
|
Sure, here it comes. ;) |
Or incorrect number of DMICs? @plbossart, but audio playback should still work, I guess? @PLTorrent, can you try this and reboot?
|
No joy, nothing changed, still only Dummy output. Any specific log you want me to make after this change? Output of Details
May 06 16:02:27 MBXP-VGHH-XX kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100 |
Looks like they're using 16-bit samples in the format
|
@PLTorrent Can you try adding this option in one of of the /etc/modprobe.d/*.conf files?
Also remove the option with dmic_num. |
@plbossart, we need the tplg file w/ the NHLT embedded:
|
Yes correct, without the last option we would take the 'wrong' topology file without the NHLT blobs. Thanks @ujfalusi for helping.
|
I removed the sof-dmic.conf file and created a sof-audio-pci-intel-mtl.conf file with the suggested content: Finally the audio devices showed up in the ubuntu settings and speakers work. However there are still some issues visible in the journalctl:
Any further suggestions? |
Good progress @PLTorrent can you add this script on the device and try to run mtrace-reader.py | tee log.txt and share the result? I suspect the topology defines a volume element that doesn't exist. |
also the key point is to check if the mics work? |
the script fails:
|
try with sudo? |
c'mon :) of course I did:
|
@kv2019i this one's for you! |
@plbossart Any suggested/proper way to do this? I guess this device has more than one mic so how to test them all? Please advise. |
@PLTorrent do these errors show up right after boot? Or after playback? |
All the mics are grouped in a single stream. this will record from the mics for 10s arecord -Dhw:0 -c4 -r48000 -fS16_LE -d10 test.wav (could also be -fS32_LE). |
@ranj063 looking at timestamps in logs those errors must have been right after reboot. However now they are not present after another reboot or some playback trials. Will try some more reboots but for now I will treat those as one-time glitch. Current log below:
@plbossart thanks for the tip about mics will test and provide feedback. Also one more question I have is I have found this info on this website: https://thesofproject.github.io/latest/getting_started/intel_debug/introduction.html
I have created this symlink. Do I need it? Should I remove it? |
@plbossart I got the following when trying to record:
However mics seem to be working as I was able to record sound using Gnome Sound Recorder without problems. |
arecord -Dhw:0,6 -c4 -r48000 -fS16_LE -d10 test.wav |
@plbossart im not sure we support 16-bit capture in the upstream topologies yet. @PLTorrent could you please try -fS32_LE as well? |
@plbossart, @ranj063 had to use -fS32_LE. For 16 I got:
The recording is ok and checking in audacity there are 4 tracks in: The current alsa-info is here (in case it is needed): https://alsa-project.org/db/?f=7fae03fe2ef7c39e0502538c9d76abd7278470a7 Also I noticed that now in Ubuntu settings I have Speaker and Headphones for input and output, however no Headphones are currently connected to the laptop, nor ever were. Is this normal? |
ok so the mics look good with the quirk. We'll have to ask @ujfalusi @ranj063 and @singalsu why we can't find the relevant blob in original NHLT tables. For the headphones, all the detection is handled by the HDaudio driver for your Conexant codec. I don't think anyone on this forum can help. For the IPC problem it needs to be root-caused with additional information. maybe nuke the alsa state first. blacklist snd-sof-pci-intel-mtl |
Could you point me which file should be deleted please? |
@plbossart this seems like a new problem for us. If there's a mismatch between the NHLT blob, topology audio formats and the formats advertised in the PCM capabilities, we're always going to run into issues |
Thanks for the topology file. Copied it over to /usr/lib/firmware/intel/sof-ipc4-tplg/ Either I did something wrong or the patch does not work... Also I tried compiling the tplg file locally using your instructions, it built, copied it over, rebooted, nuked the alsa state file and still the same.
|
Gash, I almost have a working set of patches to unlock the door for using tplg NHLT by default, but some parts will be good to reuse.. |
@PLTorrent, do you have the patch from #4979 applied to the kernel and using that? |
Yes I do, just browsed the source I built the kernel from and it's there:
I am booted on that kernel: Linux MBXP-VGHH-XX 6.9.0-rc5 #1 SMP PREEMPT_DYNAMIC Tue May 7 19:17:53 CEST 2024 x86_64 x86_64 x86_64 GNU/Linux |
@PLTorrent, right, I know what is the issue, you still need to select the updated tplg file:
Let me build and upload the generic one as well, so all module params can be dropped. |
Freshly built from thesofproject/sof#9102 : |
@ujfalusi Now it works like a charm :)
|
One more thing is that comparing to Windows it seems like only 2 out of 4 speakers do the playback in Linux, but I guess this should be addressed somewhere else? |
There seams to be a "Bass Speaker" switch in the audio mixers, Try |
Nope, got everything maxed out in alsa-mixer, bass as well. Still the same playback. |
…blob The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f920964 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: thesofproject#4973 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
@PLTorrent, unfortunately we cannot do much. Only Huawei knows how the speakers are connected. There is a way to get all speakers to work (using crossover) but that is out of my comfort zone. Without vendor help/interest it is not easy. |
…blob The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f920964 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: #4973 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
A check on the number of opens for this vendor will likely give the answer on Linux support. The only pragmatic way to solve the speaker configuration 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 for guidance. it's not an easy task, and as usual mucking with speaker configurations means there's a non-zero risk of blowing said speakers. Only do this if you know what you're doing and with appropriate warranty terms. |
…blob The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f920964 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: #4973 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@PLTorrent @ujfalusi can we close this NHLT-related issue? Looks like the fix is on its way to 6.10. The speaker problem is a different issue. |
Yes, of course. I am closing the issue now as fix is on the way. Thank you all for your excellent support on this issue! |
…blob The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f920964 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: thesofproject#4973 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://msgid.link/r/20240516075611.18018-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
…blob The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f920964 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: thesofproject#4973 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://msgid.link/r/20240530111918.21974-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: The existing logic to pick a DMIC blob is based on several historical assumptions that the NHLT in BIOS always contains 32-bits per sample type (first patch, [1]). The other issue with the existing logic is that it was designed to care only about the bit depth of the format and fails to find the existing and correct blob when rate/channels are different on the FE side compared to what we should be using on the DAI side (we have components in path which can change rate/channel count). These issues have not been observed in past but with new MTL based (Windows) laptops and new topologies to enhance the audio quality, we started to see weird issues around how our assumptions of vendors failed. Since some NHLT blob handling cleanup has been done for 6.10, this series will complete that work to cover even cases that we don't anticipate to see. [1] thesofproject#4973
…blob The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f920964 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: #4973 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
…blob The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f920964 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: thesofproject#4973 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://msgid.link/r/20240530111918.21974-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
…blob The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f920964 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: thesofproject/linux#4973 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://msgid.link/r/20240530111918.21974-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: The existing logic to pick a DMIC blob is based on several historical assumptions that the NHLT in BIOS always contains 32-bits per sample type (first patch, [1]). The other issue with the existing logic is that it was designed to care only about the bit depth of the format and fails to find the existing and correct blob when rate/channels are different on the FE side compared to what we should be using on the DAI side (we have components in path which can change rate/channel count). These issues have not been observed in past but with new MTL based (Windows) laptops and new topologies to enhance the audio quality, we started to see weird issues around how our assumptions of vendors failed. Since some NHLT blob handling cleanup has been done for 6.10, this series will complete that work to cover even cases that we don't anticipate to see. [1] thesofproject/linux#4973
…blob mainline inclusion from mainline-v6.10-rc2 The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f920964 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: thesofproject/linux#4973 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://msgid.link/r/20240530111918.21974-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 49cb894)
…blob mainline inclusion from mainline-v6.10-rc2 The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f920964 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: thesofproject/linux#4973 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://msgid.link/r/20240530111918.21974-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 49cb894)
…blob mainline inclusion from mainline-v6.10-rc2 The ACPI NHLT table always had 32-bit DMIC blob even if 16-bit was also present and taken as a 'rule' which obviously got broken and there is at least one device on the market which ships with only 16-bit DMIC configuration blob. This corner case has never been supported and it is going to need topology updates for DMIC copier to support multiple formats. As for the kernel side: if the copier supports multiple formats and the preferred 32-bit DMIC blob is not found then we will try to get a 16-bit DMIC configuration and look for a 16-bit copier config. Fixes: f920964 ("ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request") Link: thesofproject/linux#4973 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://msgid.link/r/20240530111918.21974-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 49cb894)
On Ubuntu 24.04 LTS there is no sound at all. The only device shown in Settings -> Sound -> Output Device is "Dummy Device"
alsa-info output: https://alsa-project.org/db/?f=691c0e832f4c1bddfd1da30b63705d4fcb0213f2
In case any additional logs are needed please let me know.
The text was updated successfully, but these errors were encountered: