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] sof-hda-generic-1ch.tplg not found #9748

Open
stefdb opened this issue Dec 19, 2024 · 9 comments
Open

[BUG] sof-hda-generic-1ch.tplg not found #9748

stefdb opened this issue Dec 19, 2024 · 9 comments
Assignees
Labels
bug Something isn't working as expected DMIC Digital Microphone LNL Applies to Lunar Lake platform P2 Critical bugs or normal features topology Topology issues

Comments

@stefdb
Copy link

stefdb commented Dec 19, 2024

Describe the bug
No Soundcards are initialised.

To Reproduce
Boot the System (ASUS NUC14LNS)

Reproduction Rate
100%

Expected behavior
Topology is loaded, and soundcard is initialised

Impact
No audio

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: Linux version 6.12.0-next-20241127-test-kernel (dd@dd-ASUS-EXPERTBOOK) (gcc (Ubuntu 14.2.0-4ubuntu2) 14.2.0, GNU ld (GNU Binutils for Ubuntu) 2.43.1) Cavs common #4 SMP PREEMPT_DYNAMIC Wed Nov 27 17:53:05 CST 2024
    • SOF: v2.11.1
  2. Name of the topology file
    • Topology: sof-hda-generic-1ch.tplg
  3. Name of the platform(s) on which the bug is observed.
    • Platform: Intel(R) Core(TM) Ultra 9 288V 3.30GHz
    • ASUS NUC14LNS

Screenshots or console output
Initial log with missing file:
NUC14LNS_dmesg.txt

I also attempted to generate sof-hda-generic-1ch.tplg by modifying tools/topology/topology2/production/tplg-targets-hda-generic.cmake, to add the configuration where NUM_DMICS=1:

///"sof-hda-generic;sof-hda-generic-1ch;HDA_CONFIG=mix,NUM_DMICS=1,
DMIC0_ENHANCED_CAPTURE=true,EFX_DMIC0_TDFB_PARAMS=line2_generic_pm10deg,
EFX_DMIC0_DRC_PARAMS=dmic_default"///

But this didn't work due, producing these error messages:

[ 7.026064] DMIC Raw: substream DMIC Raw has no playback, no capture
[ 7.026071] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: can't create pcm DMIC Raw :-22
[ 7.026722] skl_hda_dsp_generic skl_hda_dsp_generic: probe with driver skl_hda_dsp_generic failed with error -22

Full log attached here:
1219_dmesg.txt

@stefdb stefdb added the bug Something isn't working as expected label Dec 19, 2024
@kv2019i
Copy link
Collaborator

kv2019i commented Dec 19, 2024

This is a curious case, I don't believe we've seen a single dmic configuration before. @singalsu @bardliao @ujfalusi do you recall?

@stefdb Can quick workaround to try is to force the dmic count to 2 with:

/etc/modprobe.d/sof.conf (or some file under modprobe.d):

options snd_sof_intel_hda_generic dmic_num=2

This should instruct the drive to load sof-hda-generic-2ch.tplg which is part of standard distribution. If this works, you'll probably have audio only on the left channel of the recorded stream, but at least allows audio device to probe successfully.

@kv2019i kv2019i added DMIC Digital Microphone LNL Applies to Lunar Lake platform labels Dec 19, 2024
@bardliao
Copy link
Collaborator

This is a curious case, I don't believe we've seen a single dmic configuration before. @singalsu @bardliao @ujfalusi do you recall?

No, it is the first time I am aware of that.

@singalsu
Copy link
Collaborator

First time for me too. Please use as @kv2019i suggested the 2ch topology as replacement. Due to PDM bus characteristic, it will give a dual mono capture stream as e.g. HDA generic headset (mono) mic also appears to system.

I will try to replicate the issue with my devices.

@stefdb Can you please also dump the NHLT content of your PC and attach here (sudo cat /sys/firmware/acpi/tables/NHLT >NHLT.bin).

@singalsu singalsu self-assigned this Dec 30, 2024
@singalsu
Copy link
Collaborator

singalsu commented Jan 2, 2025

Confirming that I'm able to replicate the issue by forcing options snd_sof_intel_hda_generic dmic_num=1 plus and options snd_sof_intel_hda_common sof_use_tplg_nhlt=1 and similarly creating a topology sof-hda-generic-cavs25-1ch.tplg renamed to sof-hda-generic-1ch.tplg. I get the same error as reported.

@kv2019i kv2019i added topology Topology issues P2 Critical bugs or normal features labels Jan 3, 2025
@singalsu
Copy link
Collaborator

singalsu commented Jan 3, 2025

Update - I'm testing a fix in #9763.

@stefdb
Copy link
Author

stefdb commented Jan 7, 2025

NHLT.zip

Hi,

I've attached NHLT.bin (inside NHLT.zip) from the system, as requested.

Thanks,
Stefan

@singalsu
Copy link
Collaborator

singalsu commented Jan 7, 2025

Thanks a lot for sharing the NHLT @stefdb !

It looks like there's an issue in DMIC HW setting. The NHLT headers show 1 channel but some actual DMIC decimators settings activate parts of HW as stereo. If there's a problem we should contact Asus.

Can you first remove options snd_sof_intel_hda_generic dmic_num=2 from /etc/modprobe.d/sof.conf (or what you used) and try sof-hda-generic-1ch.tplg from the attached tar bundle. Check if the SOF boots and if capture produces a sane recording (no noise, no mickey mouse or stretched deep voice effect). There's a big risk that the recording might not be good quality if it can run.

I ran on my test device the capture (had forced dmic_num=1 on a 4ch device) like this:

time arecord -Dhw:0,6 -f S32_LE -r 48000 -c 1 -d 10 rec.wav

The capture should take about 10s.

There's a way to override the BIOS NHLT and use NHLT from topology (a method used in Chromebooks). Add these options to e.g. /etc/modprobe.d/sof.conf and then try with sof-hda-generic-ace1-1ch.tplg from the bundle. If the first way failed, this should always work.

options snd_sof_intel_hda_common sof_use_tplg_nhlt=1
options snd_sof tplg_filename=sof-hda-generic-ace1-1ch.tplg

The topologies were generated with #9763.

(removed the files bundle because of issue in ace1/ace3 version)

@singalsu
Copy link
Collaborator

singalsu commented Jan 7, 2025

@stefdb Please wait testing attached sof-hda-generic-ace1-1ch.tplg. I don't have suitable MTL/LNL hardware to test this so I ran it here with the cAVS version that worked. There may be a bug in alsa-utils topology NHLT generator for ACE. I will do more checks and try to fix it.

@singalsu
Copy link
Collaborator

singalsu commented Jan 8, 2025

Here's new topologies bundle (fix in alsa-project/alsa-utils#286). Please try sof-hda-generic-ace1-1ch.tplg from here:

dmic_1ch_tplgs_20250108.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected DMIC Digital Microphone LNL Applies to Lunar Lake platform P2 Critical bugs or normal features topology Topology issues
Projects
None yet
Development

No branches or pull requests

4 participants