Skip to content

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

Description

@stefdb

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

Activity

  1. added
    bugSomething isn't working as expected
    on Dec 19, 2024
  2. kv2019i commented on Dec 19, 2024

    @kv2019i
    Collaborator

    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.

  3. added
    DMICDigital Microphone
    LNLApplies to Lunar Lake platform
    on Dec 19, 2024
  4. bardliao commented on Dec 20, 2024

    @bardliao
    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.

  5. singalsu commented on Dec 30, 2024

    @singalsu
    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).

  6. self-assigned this
    on Dec 30, 2024
  7. singalsu commented on Jan 2, 2025

    @singalsu
    Collaborator

    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.

  8. added
    P2Critical bugs or normal features
    on Jan 3, 2025
  9. singalsu commented on Jan 3, 2025

    @singalsu
    Collaborator

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

  10. stefdb commented on Jan 7, 2025

    @stefdb
    Author

    NHLT.zip

    Hi,

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

    Thanks,
    Stefan

  11. singalsu commented on Jan 7, 2025

    @singalsu
    Collaborator

    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)

  12. singalsu commented on Jan 7, 2025

    @singalsu
    Collaborator

    @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.

  13. singalsu commented on Jan 8, 2025

    @singalsu
    Collaborator

    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

  14. lgirdwood commented on Jan 14, 2025

    @lgirdwood
    Member

    @stefdb any update ? did this work for you ?

  15. stefdb commented on Jan 16, 2025

    @stefdb
    Author

    Hi,

    We've tested these topologies and the dmic seems to work now, and the soundcard probes.
    However, the speaker is not currently working, and I've been trying to work out why.
    Previously we tested with SOF disabled, and the speaker worked ok.
    The strange thing is that it seems like the play command isn't being propagated to the kernel, so it seems something in userspace is not happy, but I'm still investigating.

    I've attached 2 dmesg logs of using the new topologies.

    Thanks,
    Stefan

    20240113_generic-ace1-1ch.txt
    20250113_generic-1ch.txt

  16. singalsu commented on Jan 17, 2025

    @singalsu
    Collaborator

    @stefdb Great that the microphone works now! Please create another issue for the speaker and attach the above logs there. Especially if it needs help from Cirrus (some fw upload fails seen in dmesg), it's more clear to handle it there.

  17. singalsu commented on Jan 17, 2025

    @singalsu
    Collaborator
  18. bardliao commented on Jan 17, 2025

    @bardliao
    Collaborator

    @stefdb Yes, please create another issue for the speaker issue for better tracking. Please also attach the output of alsa-info.
    And what is your playback command? Did you try aplay?

  19. lgirdwood commented on Feb 10, 2025

    @lgirdwood
    Member
  20. singalsu commented on Feb 11, 2025

    @singalsu
    Collaborator

    Yep, everything related to DMIC is now completed. Please continue in other issue with speaker problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

DMICDigital MicrophoneLNLApplies to Lunar Lake platformP2Critical bugs or normal featuresbugSomething isn't working as expectedtopologyTopology issues

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions