Repository navigation
Closed
Description
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:
Activity
plbossart commentedon Sep 21, 2020
@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
[-]Microphone not working (Lenovo Thinkbook 13S, Skylake)[/-][+]Microphone not working (Lenovo Thinkbook 13S, CML-U)[/+]phocean commentedon Sep 22, 2020
@plbossart here it is:
Let me know if I can help further.
plbossart commentedon Sep 22, 2020
@singalsu do we have a means to disable DC offset and ramps on the DMIC? Wondering if something goes in the weeds here.
plbossart commentedon Sep 22, 2020
@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.
phocean commentedon Sep 23, 2020
@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=1does not seem to change anything.plbossart commentedon Sep 30, 2020
@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.
phocean commentedon Oct 10, 2020
@plbossart sorry for the late answer. I just tested it but no change so far...
singalsu commentedon Oct 13, 2020
@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.
53 remaining items
sunweaver commentedon Aug 13, 2021
@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.
plbossart commentedon Aug 13, 2021
@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.
johnnrandall commentedon Feb 17, 2022
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.
plbossart commentedon Feb 17, 2022
@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.
johnnrandall commentedon Feb 17, 2022
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.
plbossart commentedon Feb 17, 2022
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).
johnnrandall commentedon Feb 17, 2022
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.
plbossart commentedon Feb 17, 2022
@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.
plbossart commentedon Jul 20, 2022
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
unoexperto commentedon May 22, 2024
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:
plbossart commentedon May 22, 2024
@unoexperto that's a different platform, please file a separate issue for AMD to support