Skip to content

[BUG] ASUS Zenbook S 14: No sound from DMIC #5325

Closed

Description

@dantmnf

Describe the bug
Recording from DMIC generates a few pulses then a flat signal.

To Reproduce

% arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sofsoundwire [sof-soundwire], device 1: Jack In (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsoundwire [sof-soundwire], device 4: Microphone (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
% arecord -D hw:0,4 -f s16_le -r 48000 -c 2 -t wav -d 5 record.wav
Recording WAVE 'record.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

Reproduction Rate
All the time

Expected behavior
Should be able to record some sound

Impact
Unusable built-in microphone

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: stable 6.12.6
    • SOF: release v2024.09.2
  2. Name of the topology file
    • Topology: intel/sof-ipc4-tplg/sof-lnl-cs42l43-l0-cs35l56-l23.tplg
  3. Name of the platform(s) on which the bug is observed.
    • Platform: Lunar Lake

Screenshots or console output
image

alsa-info output for reference:
alsa-info.txt

P.S. recording from audio jack works.

Activity

  1. added
    bug
    on Dec 26, 2024
  2. iradraconis commented on Dec 31, 2024

    @iradraconis

    Same here.. Using Linux Kernel 13.0 RC5 on Fedora and still the microphone is not functioning.

    Inxi output for Audio:

    Audio:
      Device-1: Intel Lunar Lake-M HD Audio driver: sof-audio-pci-intel-lnl
      API: ALSA v: k6.13.0-0.rc5.42.fc42.x86_64 status: kernel-api
      Server-1: PipeWire v: 1.2.7 status: active
    
  3. singalsu commented on Jan 3, 2025

    @singalsu
    Collaborator

    Can you list what controls you have with amixer -c0 controls . I wonder what processing components you have. In the latest version there's these:

    numid=186,iface=MIXER,name='Microphone Capture DRC bytes'
    numid=187,iface=MIXER,name='Microphone Capture DRC switch'
    numid=188,iface=MIXER,name='Microphone Capture IIR Eq'
    numid=185,iface=MIXER,name='Microphone Capture TDFB angle set enum'
    numid=184,iface=MIXER,name='Microphone Capture TDFB beam switch'
    numid=183,iface=MIXER,name='Microphone Capture TDFB bytes'
    
    

    But I doubt the SOF processing would cause what you see.

    Another idea is that has UCM correctly enabled the SDW codec DMIC. You can check with amixer cget if these csets in EnableSequence are done:

    https://github.com/alsa-project/alsa-ucm-conf/blob/cde064fd3a1a7cd57b56d32d42ae57f7e8b454e7/ucm2/sof-soundwire/cs42l43-dmic.conf#L10

  4. added
    SDW
    LNL
    on Jan 3, 2025
  5. dantmnf commented on Jan 3, 2025

    @dantmnf
    Author

    Can you list what controls you have with amixer -c0 controls . I wonder what processing components you have. In the latest version there's these:

    numid=186,iface=MIXER,name='Microphone Capture DRC bytes'
    numid=187,iface=MIXER,name='Microphone Capture DRC switch'
    numid=188,iface=MIXER,name='Microphone Capture IIR Eq'
    numid=185,iface=MIXER,name='Microphone Capture TDFB angle set enum'
    numid=184,iface=MIXER,name='Microphone Capture TDFB beam switch'
    numid=183,iface=MIXER,name='Microphone Capture TDFB bytes'
    

    I don't have these controls on my system. List of controls is available in alsa-info.txt in the top comment.

    Another idea is that has UCM correctly enabled the SDW codec DMIC. You can check with amixer cget if these csets in EnableSequence are done:

    https://github.com/alsa-project/alsa-ucm-conf/blob/cde064fd3a1a7cd57b56d32d42ae57f7e8b454e7/ucm2/sof-soundwire/cs42l43-dmic.conf#L10

    Confirmed that the EnableSequence is all done.

  6. singalsu commented on Jan 7, 2025

    @singalsu
    Collaborator

    Thanks @dantmnf . @bardliao Do you have ideas what could cause this?

  7. bardliao commented on Jan 8, 2025

    @bardliao
    Collaborator
  8. pcgrosen commented on Jan 8, 2025

    @pcgrosen

    Hi @bardliao, I have the same system and am experiencing the same issue. I tried the latest from that repo (installed via instructions in the README, including state purge), but no change -- still just a click at the beginning, then silence.

    Is there something else I can try, or additional debug info I can gather? Thanks!

  9. bardliao commented on Jan 8, 2025

    @bardliao
    Collaborator

    @pcgrosen Can you upgrade cs42l43.bin ? I thought it is a muted issue but it should not be. Because you could record a pop noise at the beginning. Now I guess you may need an upgraded cs42l43 firmware.

  10. dantmnf commented on Jan 8, 2025

    @dantmnf
    Author

    @pcgrosen Can you upgrade cs42l43.bin ? I thought it is a muted issue but it should not be. Because you could record a pop noise at the beginning. Now I guess you may need an upgraded cs42l43 firmware.

    I think we are already on the latest version since it has been in linux-firmware for (exactly) one year.

  11. bardliao commented on Jan 8, 2025

    @bardliao
    Collaborator

    Does anyone know exactly which DMIC is used by this device?

    [    3.831584] sof-audio-pci-intel-lnl 0000:00:1f.3: DMICs detected in NHLT tables: 2
    

    It seems PCH DMIC is detected in the NHLT table, but I am not sure if it matches the real HW design or not.
    If PCH DMIC is used, we probably need to create sof-lnl-cs42l43-l0-cs35l56-l23-2ch.tplg and some kernel change is required.

  12. dantmnf commented on Jan 8, 2025

    @dantmnf
    Author

    It do have 2-channel microphone and can be verified in Windows by moving a speaker around two microphones while recording:
    image

  13. charleskeepax commented on Jan 8, 2025

    @charleskeepax

    This laptop has host DMICs but is missing a quirk for such, we are looking at putting together a patch.

  14. bardliao commented on Jan 8, 2025

    @bardliao
    Collaborator

    This laptop has host DMICs but is missing a quirk for such, we are looking at putting together a patch.

    @charleskeepax We may need to do some change other than adding a quirk.

    			/*
    			 * DMICs use up to 4 pins and are typically pin-muxed with SoundWire
    			 * link 2 and 3, or link 1 and 2, thus we only try to enable dmics
    			 * if all conditions are true:
    			 * a) 2 or fewer links are used by SoundWire
    			 * b) the NHLT table reports the presence of microphones
    			 */
    			if (hweight_long(mach->link_mask) <= 2)
    				dmic_fixup = true;
    			else
    				mach->mach_params.dmic_num = 0;

    https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/sof/intel/hda.c#L1332
    I think that's why the kernel didn't look for sof-lnl-cs42l43-l0-cs35l56-l23-2ch.tplg

  15. 98 remaining items

  16. vanheck commented on Apr 11, 2025

    @vanheck

    @singalsu

    Is the end of file /usr/share/alsa/ucm2/sof-soundwire/sof-soundwire.conf same as here https://github.com/singalsu/alsa-ucm-conf/blob/772d337e0e8e5871996e6a925f0601bdaf9558e0/ucm2/sof-soundwire/sof-soundwire.conf#L201 with Macro.MicArrayIir.SofEqBootSetup ?

    My ouput of the file (tail -n 17 /usr/share/alsa/ucm2/sof-soundwire/sof-soundwire.conf):

    # Define macros to set up processing controls
    Include.dsp-variables.File "../Intel/sof-hda-dsp/dsp.conf"
    
    # Set BootSequence and FixedBootSequence for drc, eqiir, eqfir
    Macro.SpeakerDrc.SofDrcBootSetup "endpoint='PostMixerSpeaker' direction='Playback'"
    Macro.SpeakerIir.SofEqBootSetup "endpoint='PostMixerSpeaker' direction='Playback' eqtype='Iir'"
    Macro.SpeakerFir.SofEqBootSetup "endpoint='PostMixerSpeaker' direction='Playback' eqtype='Fir'"
    
    # Set BootSequence and FixedBootSequence for Mic array eqiir, tdfb, drc
    Macro.MicArrayIir.SofEqBootSetup "endpoint='MicArray' direction='Capture' eqtype='Iir'"
    Macro.MicArrayDrc.SofDrcBootSetup "endpoint='MicArray' direction='Capture'"
    Macro.MicarrayTdfb.SofBeamformerBootSetup "endpoint='MicArray' direction='Capture'"
    
    # For SoundWire PC with PCH-DMIC set BootSequence and FixedBootSequence for eqiir, tdfb, drc
    Macro.Dmic0ArrayIir.SofEqBootSetup "endpoint='Dmic0' direction='Capture' eqtype='Iir'"
    Macro.Dmic0ArrayDrc.SofDrcBootSetup "endpoint='Dmic0' direction='Capture'"
    Macro.Dmic0ArrayTdfb.SofBeamformerBootSetup "endpoint='Dmic0' direction='Capture'"
    
  17. singalsu commented on Apr 11, 2025

    @singalsu
    Collaborator

    Thanks @vanheck , then it should be up-to-date and the issue must be somewhere in UCM. I'll try to replicate a similar setup here.

  18. singalsu commented on Apr 11, 2025

    @singalsu
    Collaborator

    @vanheck At least with the UCM2 git master version the IIR setup in a SoundWire PC worked for me. I didn't test with Fedora's UCM version that is likely a bit older. I have /usr/share/alsa/ucm2 tree copied from git. I added for the Dell computer that I forced with kernel options to have DMIC DAI (with great help from @ujfalusi ) into appropriate the <sys_vendor>/<product_name>.conf. this line:

    Define.Dmic0CaptureIirBlob "/usr/share/alsa/ucm2/blobs/sof/ipc4/eq_iir/highpass_40hz_40db_48khz.bin"

    And I got the +40 dB blob with data (last number changes depending on gain in the 40 Hz high-pass blobs)

    (3,120,)877023059,0,88,50450433,0,0,0,0,88,2,1,0,0,0,0,0,0,1,1,0,0,0,0,3229146956,2139532835,536156946,3222653403,536156946,4294967289,25539

    I would check that all the files you added to UCM tree have proper read access and that .bin file is in the referenced directory. Also it might be needed to reset the UCM and reboot after for it to apply the new FixedBootSequence:

    sudo systemctl stop alsa-state
    sudo rm /var/lib/alsa/asound.state
    sudo systemctl start alsa-state
    
    

    Also, it seems that you are missing a fix in UCM

    Include.dsp-variables.File "../Intel/sof-hda-dsp/dsp.conf"

    It was changed in this patch alsa-project/alsa-ucm-conf#542 . In some cases the relative path to dsp.conf caused problems. Maybe omitting all the lines after that.

  19. vanheck commented on Apr 16, 2025

    @vanheck

    I upgraded the OS to from Fedora 41 to Fedora 42:

    • version of packages linux-firmware 20250311, alsa-ucm 1.2.13
    • I removed the external kernel instalation and now I'm using the native kernel in Fedora: 6.14.2-300.fc42.x86_64+debug. But the sound again doesn't work.

    Tried to reproduce @singalsu #5325 (comment):

    @bardliao dmesg.log.txt

    amixer.log

  20. rfvirgil commented on Apr 17, 2025

    @rfvirgil

    @vanheck "the sound still doesn't work"
    All sound? Speakers, headphone, headset mic, internal mic - none of them are working?
    Or are some working and other are not working?

  21. vanheck commented on Apr 17, 2025

    @vanheck

    @rfvirgil I have no sound at all

    Speakers are detected, volume could be changed without effect.

    Microphones are detected, also here volume could be changed without effect.

  22. bardliao commented on Apr 17, 2025

    @bardliao
    Collaborator

    @vanheck Can you run "alsaucm dump text" and share the output?

  23. rpolyano commented on Apr 17, 2025

    @rpolyano

    I upgraded the OS to from Fedora 41 to Fedora 42:

    * version of packages `linux-firmware 20250311`, `alsa-ucm 1.2.13`
    
    * I removed the external kernel instalation and now I'm using the native kernel in Fedora: `6.14.2-300.fc42.x86_64+debug`. But the sound again doesn't work.
    

    Did everything else work? I had a similar experience in Fedora 42,, but wifi and bluetooth also didn't work for me, with those same versions. I wonder if that's related?

  24. retrixe commented on Apr 17, 2025

    @retrixe

    I'm on Fedora 42 and the only change I've done to get my sound working is replace the ucm2 folder

    The firmware is already updated with the latest version of alsa-sof-firmware 2025.01.1 in Fedora 42, perhaps remove the file you placed there and run dnf reinstall alsa-sof-firmware? @vanheck

    Edit: though I realise this might be a regression in alsa-ucm too, I'll test out the latest commit later and see if it still works

  25. vanheck commented on Apr 17, 2025

    @vanheck

    @rpolyano yes bluetooth doesn't work, but it didn't work before the upgrade either (bluetooth worked only with kernel 6.13.3). Usb-c 4k monitor also doesn't work (monitor writes connection not detected, but hdmi works). Wifi works well.

    @retrixe dnf reinstall alsa-sof-firmware doesnt work

    @bardliao here is alsaucm_dump_text.txt

  26. scngo commented on Apr 18, 2025

    @scngo

    I am also running Fedora 42 on Intel Lunar Lake CPU, with the following packages and setup

    • Linux kernel-6.14.2-300.fc42
    • alsa-sof-firmware-2025.01.1-1 (the release with sof-lnl-cs42l43-l0-cs35l56-l23-2ch)
    • alsa-lib-1.2.14-2.fc42 (the newest release came several hours ago, covers the updates in ucm2 discussed here)
    • I have the same alsaucm dump text output as @vanheck .

    By this setting,

    • Speaker doesn't have any actual output, although in the setting page device is detected and sound bar shows output signal when playing music.
    • Digital Microphone works, LED mute indicator on media key works.
    • Headphones work.

    @vanheck For the Bluetooth, have you tried the solution provided at the bottom of this page? https://bodhi.fedoraproject.org/updates/FEDORA-2025-7f56eb37a0

  27. vanheck commented on Apr 18, 2025

    @vanheck

    @scngo I've tried update these newest packages, without any change. Microphone LED control and changing volume works, but no input real sound is capturing (sound bar shows nothing also in speakers).
    Blutooth - create a symbolic link didn't help

  28. JakubBujnowicz commented on Apr 18, 2025

    @JakubBujnowicz

    @vanheck What fixed sound for me (on Fedora 42, kernel 6.14.2-300), was following the instructions from the main README of alsa-ucm-conf GitHub to get the version from the latest commit. In particular, I run the lines below yesterday (before alsa-ucm update was pushed to Fedora 42):

    curl -L -o alsa-ucm-conf.tar.gz https://github.com/alsa-project/alsa-ucm-conf/archive/refs/heads/master.tar.gz
    tar xvzf alsa-ucm-conf.tar.gz -C /usr/share/alsa --strip-components=1 --wildcards "*/ucm" "*/ucm2"
    

    Sound started working after reboot + microphone keyboard LED as well. Today I upgraded my packages (including alsa-ucm 1.2.14-2) and sound still works. I am not sure if that helps, but maybe worth trying out.

  29. retrixe commented on Apr 18, 2025

    @retrixe

    Sound works for me without any modifications to Fedora 42 now with the latest kernel 6.14.2-300, alsa-ucm 1.2.14 and alsa-sof-firmware 2025.01.1 packages 🎉

    Bluetooth works with linux-firmware 20250410 too (it was broken in 20250311)

  30. vanheck commented on Apr 20, 2025

    @vanheck

    @retrixe thank you for your post. I had to reinstall whole fedora from scratch and after upgrade alsa-ucm, alsa-sof-firmware and linux-firmware packages to newest version, Audio and also Bluethoot work well.

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

Metadata

Metadata

Assignees

Labels

LNLP2SDWbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions