Skip to content

Microphone not working (Lenovo Thinkbook 13S, CML-U) #2460

Closed

Description

@phocean

The microphone is not working with my laptop : Lenovo Thinkbook 13S.

Distribution : openSUSE Tumbleweed (20200829)

~ ❯ uname -a
Linux thinkpad 5.8.4-1-default #1 SMP Wed Aug 26 10:53:09 UTC 2020 (64fe492) x86_64 x86_64 x86_64 GNU/Linux


~ ❯ inxi -A                               
Audio:
  Device-1: Intel driver: sof-audio-pci 
  Sound Server: ALSA v: k5.8.4-1-default 

~ ❯ dmesg | grep snd
[   13.184060] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   13.184064] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[   13.649953] snd_soc_skl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   13.649957] snd_soc_skl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[   14.062251] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC257: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[   14.062254] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   14.062256] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   14.062258] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[   14.062259] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[   14.062261] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19
[   14.108320] snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten
[   14.108327] snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten
[   14.108400] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> DMIC 6 mapping ok
[   14.108408] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> DMIC16kHz 7 mapping ok
[   14.108421] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDA Analog 0 mapping ok
[   14.108433] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDA Digital 1 mapping ok
[   14.108442] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI1 3 mapping ok
[   14.108449] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI2 4 mapping ok
[   14.108459] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI3 5 mapping ok

Using arecord results in no sound, except a high pitch noise that last less than 1 sec at the begining.

/tmp ❯ arecord -l
**** Liste des Périphériques Matériels CAPTURE ****
carte 1: sofhdadsp [sof-hda-dsp], périphérique 0: HDA Analog (*) []
  Sous-périphériques: 1/1
  Sous-périphérique #0: subdevice #0
carte 1: sofhdadsp [sof-hda-dsp], périphérique 1: HDA Digital (*) []
  Sous-périphériques: 1/1
  Sous-périphérique #0: subdevice #0
carte 1: sofhdadsp [sof-hda-dsp], périphérique 6: DMIC (*) []
  Sous-périphériques: 1/1
  Sous-périphérique #0: subdevice #0
carte 1: sofhdadsp [sof-hda-dsp], périphérique 7: DMIC16kHz (*) []
  Sous-périphériques: 1/1
  Sous-périphérique #0: subdevice #0

/tmp ❯ arecord -Dhw:1,6 -c2 -r48000 -fS32_LE -d 10 mytest.wav
Capture WAVE 'mytest.wav' : Signed 32 bit Little Endian, Fréquence 48000 Hz, Stéréo

^CInterrompu par le signal Interrupt...

/tmp 7s ❯ open mytest.wav

Attachments:

alsa-info.txt

dmesg.txt

Downstream bug report

Activity

  1. plbossart commented on Sep 21, 2020

    @plbossart
    Member

    @phocean could you provide a screenshot of what the waveform looks like? You can do this with audacity and screenshot. Thanks!

    @singalsu @juimonen @kv2019i FYI

  2. added
    bug
    HDA
    dmic
    CML
    and removed
    HDA
    on Sep 22, 2020
  3. changed the title [-]Microphone not working (Lenovo Thinkbook 13S, Skylake)[/-] [+]Microphone not working (Lenovo Thinkbook 13S, CML-U)[/+] on Sep 22, 2020
  4. phocean commented on Sep 22, 2020

    @phocean
    Author

    @plbossart here it is:

    image

    Let me know if I can help further.

  5. plbossart commented on Sep 22, 2020

    @plbossart
    Member

    @singalsu do we have a means to disable DC offset and ramps on the DMIC? Wondering if something goes in the weeds here.

  6. plbossart commented on Sep 22, 2020

    @plbossart
    Member

    @phocean Can you make sure all switches are on in alsamixer (nothing odd muted).

    Also wondering if the information on DMIC is actually correct. Can you add this in /etc/modprobe.d/hda-legacy.conf

    options snd_intel_dspcfg dsp_driver=1

    If the mic works with this, it means that you don't have a DMIC and your BIOS is incorrect. It's a long shot but we need to double-check this.

  7. phocean commented on Sep 23, 2020

    @phocean
    Author

    @plbossart For sure nothing has never been muted on the side of alsamixer, that something I checked multiple times and in all possible ways.

    options snd_intel_dspcfg dsp_driver=1 does not seem to change anything.

  8. plbossart commented on Sep 30, 2020

    @plbossart
    Member

    @phocean could you try the updated firmware 1.6 (https://github.com/thesofproject/sof-bin/tree/stable-v1.6)? It's a long shot but worth double-checking. Make sure you save /lib/firmware before installing stuff.

  9. phocean commented on Oct 10, 2020

    @phocean
    Author

    @plbossart sorry for the late answer. I just tested it but no change so far...

  10. added
    P3
    on Oct 12, 2020
  11. singalsu commented on Oct 13, 2020

    @singalsu
    Collaborator

    @phocean Do you still have the wav file from above recording left to attach it here? I'd like to take a closer look to what it contains (noise or perfect digital silence). Or preferably make a new recording with check done that there's nothing private accidentally recorded.

    I wonder if the capture gain just very low. Those power-on start transients can correspond to jet fighter loudness like noises of real world and they are in some platforms mitigated in firmware with volume ramp and IIR filter tricks.

  12. 53 remaining items

  13. added
    Community
    DMIC-PDM1
    and removed
    dmic
    on Jun 10, 2021
  14. sunweaver commented on Aug 13, 2021

    @sunweaver

    Based on the observation I created this pull request thesofproject/sof#3847 . @gbrdead Can you please try this topology:

    sof-hda-generic-2ch-pdm1.zip

    Unzip and copy sof-hda-generic-2ch-pdm1.tplg over /lib/firmware/intel/sof-tplg/sof-hda-generic-2ch.tplg. I just tested with my 4 mic device (Lenovo X1) that these commands captured microphones 3 and 4 as stereo.

    arecord -Dhw:0,6 -f dat -d 10 rec06.wav
    arecord -Dhw:0,7 -f dat -r 16000 -d 10 rec07.wav
    

    Since alsamixer view changes from 4ch back to 2ch check that Dmic0 and Dmic1 gains and mute switches are sane.

    @singalsu I just took your topology file and replaced sof-hda-generic-2ch.tplg on a freshly installed Debian 11 system. Test device is a Lenovo 13s (which my school customer has plenty of).

    Without your topology file, the internal "Digital Microphone" is shown in Pulseaudio and alsamixer, but I cannot record sound with the internal mic. Neither do I see any input level in pavucontrol for the "Digital Microphone".

    With your binary topology file offered for download further up in #2460, I can start using the microphone.

    So for the Lenovo Thinkpad 13S, this bug is definitely still an issue in Debian 11.

    About your PR, I saw that upstream closed the PR when renaming the "master" branch to "main" and it seems like noone ever cared about re-opening it.

    So, I wonder what the status of this problem currently is in SOF upstream and how we (I am a Debian Developer) can get SOF HDA DSP working for the Lenovo Thinkpad 13S in Debian 11.

    Thanks for your work on this! Looking forward to some extra info.

  15. plbossart commented on Aug 13, 2021

    @plbossart
    Member

    @sunweaver the status has not changed: the SOF driver as currently implemented cannot know which PDM interface is used. Most platforms use PDM0 but Lenovo for some reason used PDM1. Unfortunately this information is set in the 'topology file' and we just don't know how to select this topology.

    Rather than adding multiple topology files and try to figure out what platform needs what topology, we wanted to change the approach and instead of using the information stored in a topology file we could use the information provided in the platform firmware (DSDT/NHLT). I believe @singalsu did quite a bit of work on this already at the firmware level, this will hopefully come in a future SOF release.

  16. johnnrandall commented on Feb 17, 2022

    @johnnrandall

    I've got a similar issue to @phocean above. My laptop is also a Thinkbook 13.

    My outputs are below:

    uname -a
    Linux lenovo 5.4.0-100-generic #113-Ubuntu SMP Thu Feb 3 18:43:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

    inxi -A
    Audio: Device-1: Intel driver: sof-audio-pci
    Sound Server: ALSA v: k5.4.0-100-generic

    dmesg | grep snd
    [ 4.973474] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
    [ 4.973699] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
    [ 5.369091] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC257: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
    [ 5.369103] snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
    [ 5.369111] snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
    [ 5.369116] snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0
    [ 5.369120] snd_hda_codec_realtek ehdaudio0D0: inputs:
    [ 5.369127] snd_hda_codec_realtek ehdaudio0D0: Mic=0x19
    [ 5.417987] snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten
    [ 5.418028] snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten
    [ 5.419118] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> DMIC 6 mapping ok
    [ 5.419300] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> DMIC16kHz 7 mapping ok
    [ 5.419556] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDA Analog 0 mapping ok
    [ 5.419784] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDA Digital 1 mapping ok
    [ 5.419944] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI1 3 mapping ok
    [ 5.420100] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI2 4 mapping ok
    [ 5.420247] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI3 5 mapping ok

    The headphone microphone works but the internal one has never shown any kind of input level.

    Any assistance would be gratefully received.

  17. plbossart commented on Feb 17, 2022

    @plbossart
    Member

    @johnnrandall "Linux lenovo 5.4.0-100-generic" is likely rather too old for proper SOF support. It's probably one of the first versions we upstreamed. Please consider updating your system if possible, it's very difficult to solve problems on kernels that are 12 versions old. Thanks for your understanding.

  18. johnnrandall commented on Feb 17, 2022

    @johnnrandall

    Which kernel do you recommend? I've tried a more recent one but unfortunately that alone didn't resolve it which is why I reverted to this one.

  19. plbossart commented on Feb 17, 2022

    @plbossart
    Member

    5.10+ is recommended.

    The solution for Lenovo devices is to try to use the topology provided in https://github.com/thesofproject/linux/files/5981682/sof-hda-generic-2ch-pdm1.zip

    Unzip and copy sof-hda-generic-2ch-pdm1.tplg over /lib/firmware/intel/sof-tplg/sof-hda-generic-2ch.tplg (KEEP THE INITIAL VERSION AS A BACKUP).

  20. johnnrandall commented on Feb 17, 2022

    @johnnrandall

    I tried the link and followed the instructions. And yes it was the solution. I can hardly contain my thankfulness! On this basis I will stick with my current kernel unless you recommend otherwise. Thank you once again, and have a great evening.

  21. plbossart commented on Feb 17, 2022

    @plbossart
    Member

    @johnnrandall glad it works for you. At some point we may be able to do this switch automagically but for now we have to override this topology file. You can update the kernel to a more recent version, it will not change anything. The one thing you need to watch out for is that distribution updates may override this file, so you may have to redo this override if the mic becomes silent again.

  22. plbossart commented on Jul 20, 2022

    @plbossart
    Member

    There will be no magical solution to this problem, the only work-around is to load an alternate topology. This will be enabled starting with kernel 5.20 and SOF 2.3. see details of the documentation here: https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#digital-mic-issues

  23. unoexperto commented on May 22, 2024

    @unoexperto

    Folks, I'm on Lenovo T14 AMD Gen4. I don't have *.tplg files on the disk at all. Could you please advise what to do ?

    My stats:

    uname -a
    Linux expert-thinkpad 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
    
    inxi -A
    Audio:
      Device-1: AMD Rembrandt Radeon High Definition Audio driver: snd_hda_intel
      Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor driver: snd_pci_acp6x
      Device-3: AMD Family 17h/19h HD Audio driver: snd_hda_intel
      API: ALSA v: k6.8.0-31-generic status: kernel-api
      Server-1: PipeWire v: 1.0.5 status: active
    
    
  24. plbossart commented on May 22, 2024

    @plbossart
    Member

    @unoexperto that's a different platform, please file a separate issue for AMD to support

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CMLCommunityDMIC-PDM1P3bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions