You are not logged in.

#1 2019-10-13 09:58:12

alphazo
Member
Registered: 2009-10-20
Posts: 164

[SOLVED] Fix for microphone on Lenovo X1 Gen 7

The current issue with the Lenovo X1 Carbon Gen 7 not having microphones working out the box drove me nuts.
I found a way to get it working by browsing this page: https://bugzilla.kernel.org/show_bug.cgi?id=201251
I tried to add the content of this post to https://wiki.archlinux.org/index.php/Ta … Microphone but the many external links it contains prevented me to do so (captcha keeps coming back).

So here is what I did to get root permissions. All commands are entered as root.

Add the following to /etc/modprobe.d/blacklist.conf
blacklist snd_hda_intel
blacklist snd_soc_skl
Add the following to /etc/pulse/default.pa
load-module module-alsa-source device=hw:0,7
Install SOF firmware

Releases are found here https://github.com/thesofproject/sof/releases. Only v1.3 is available as binary form for now.

 # wget https://github.com/thesofproject/sof/releases/download/v1.3/sof-cnl-signed-intel.ri
 # mkdir /lib/firmware/intel/sof
 # cp sof-cnl-signed-intel.ri /lib/firmware/intel/sof/sof-cnl.ri
Install SOF topology

I used the latest one found in the bugzilla thread, post #91.

But version from post #71 seems to be working as well and might be better for the volume range. https://bugzilla.kernel.org/attachment.cgi?id=284395.
[EDIT] I reverted back to the version from post #91 since I had some issues on getting the mics to work.

 # mkdir /lib/firmware/intel/sof-tplg
 # wget https://bugzilla.kernel.org/attachment.cgi?id=284395 -O hda-topology.tar.gz
 # tar xf hda-topology.tar.gz -C /lib/firmware/intel/sof-test

Not sure if symlink is still required or not.

 # mv /lib/firmware/intel/sof-tplg/sof-hda-generic.tplg /lib/firmware/intel/sof-tplg/sof-hda-generic.tplg.original
 # ln -s /lib/firmware/intel/sof-tplg/sof-hda-generic-4ch.tplg /lib/firmware/intel/sof-tplg/sof-hda-generic.tpl 
Reboot & Check

Check if the new card is listed.

  # arecord -l
 **** List of CAPTURE Hardware Devices ****
 card 0: sofsklhdacard [sof-skl_hda_card], device 0: HDA Analog (*) []
   Subdevices: 1/1
   Subdevice #0: subdevice #0
 card 0: sofsklhdacard [sof-skl_hda_card], device 1: HDA Digital (*) []
   Subdevices: 1/1
   Subdevice #0: subdevice #0
 card 0: sofsklhdacard [sof-skl_hda_card], device 6: DMIC48kHz (*) []
   Subdevices: 1/1
   Subdevice #0: subdevice #0
 card 0: sofsklhdacard [sof-skl_hda_card], device 7: DMIC16kHz (*) []
   Subdevices: 1/1
   Subdevice #0: subdevice #0

I opened Zoom and I was able to use the microphone smile. The four mics on top of the screen are detected. You can gently tap on each of them and hear that they produce their own sound.
Please note that I couldn't get arecord or Audacity to record anything from the microphone. Not a big deal for me since Zoom is the primary application I need microphones for. If someone has an idea that would be great.
[EDIT] arecord and audacity are now working. I'm not sure I changed anything except upgrade kernel few days ago.

After changing the output levels I also got the four speakers to fire properly. I noticed that the volume control doesn't offer much steps. It gets loud after 5% so you don't have much fine grain control. When I use KDE keyboard shortcut it gets very loud after just three clicks!

[EDIT] I also modified /etc/pulse/daemon.conf at some point of time and I'm no longer sure about the lfe-crossover-freq should be, 0 or 250?

enable-lfe-remixing = yes
#lfe-crossover-freq = 0
lfe-crossover-freq = 250

Last edited by alphazo (2019-10-16 19:28:08)

Offline

#2 2019-10-13 17:13:52

Mocco
Member
Registered: 2012-07-12
Posts: 53

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

Thank you for these detailed steps! I have followed them but after reboot

arecord -l

returns no results. I rolled back the changes and right now `arecord -l` returns just one analog device (which is what I had before):

arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC285 Analog [ALC285 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Last edited by Mocco (2019-10-13 17:15:03)

Offline

#3 2019-10-13 19:03:09

alphazo
Member
Registered: 2009-10-20
Posts: 164

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

Mocco wrote:

Thank you for these detailed steps! I have followed them but after reboot

arecord -l

returns no results. I rolled back the changes and right now `arecord -l` returns just one analog device (which is what I had before):

arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC285 Analog [ALC285 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Are you sure that you have commented back the following in /etc/modprobe.d/blacklist.conf

#blacklist snd_hda_intel
#blacklist snd_soc_skl

and also /etc/pulse/default.pa

#load-module module-alsa-source device=hw:0,7

You should at least see the legacy HDaudio driver showing up with arecord -l.

Offline

#4 2019-10-14 04:59:43

Mocco
Member
Registered: 2012-07-12
Posts: 53

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

alphazo wrote:

Are you sure that you have commented back the following in /etc/modprobe.d/blacklist.conf

Yes, if I do not blacklist the modules, the legacy hdaudio driver shows up:

arecord -l      
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC285 Analog [ALC285 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

However, if I blacklist those two modules then the audio stops working entirely (I cannot even play sounds) and

arecord -l

shows no results at all.

Following all your instructions except from blacklisting those two modules does not help my system recognizing the microphone. Maybe I need to specify a different address for the hw device in /etc/pulse/default.pa?

Offline

#5 2019-10-14 07:01:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,172

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

What PA thinks is irrelevant if the card is not enumerated on an ALSA level. Are you sure that you actually have the same hardware? What's your output for amixer -c0 with the "old" driver?

@alphazo it is usually frowned upon to post presolved threads, if this is generally useful information you should add it to the wiki page of the laptop model. However since this transformed into a support thread I guess we can continue here. Did you also get that realtek chipset before doing your changes? Can you both post your lspci's to verify we are actually on the same page?

Online

#6 2019-10-14 09:49:48

alphazo
Member
Registered: 2009-10-20
Posts: 164

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

I tried to post my proposal on the Talk section found in the Wiki but couldn't pass the Captcha step due to the many external embedded links. I tried many times but couldn't find a way. This is why I used this forum post because I thought
it would be valuable to many other people who went through the same frustration of not being able to use the onboard microphone.

Here are some information about my hardware (I have the 4K edition):

# lspci
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-LM (rev 11)
03:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)

Using the legacy Intel driver, with both line commented in /etc/modprobe.d/blacklist.conf

#blacklist snd_hda_intel
#blacklist snd_soc_skl

And also the one in /etc/pulse/default.pa

#load-module module-alsa-source device=hw:0,7
# amixer -c0
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 60 [69%] [-20.25dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Bass Speaker',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Mic Mute-LED Mode',0
  Capabilities: enum
  Items: 'On' 'Off' 'Follow Capture' 'Follow Mute'
  Item0: 'Follow Mute'
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',3
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',4
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 39 [62%] [12.00dB] [on]
  Front Right: Capture 39 [62%] [12.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC285 Analog [ALC285 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

With above SOF settings I get the following:

# amixer -c0
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 83 [95%] [-3.00dB] [off]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'Bass Speaker',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [off]
  Front Right: Playback [off]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Mic Mute-LED Mode',0
  Capabilities: enum
  Items: 'On' 'Off' 'Follow Capture' 'Follow Mute'
  Item0: 'Follow Mute'
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 39 [62%] [12.00dB] [on]
  Front Right: Capture 39 [62%] [12.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'PGA1.0 1 Master',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 32
  Mono:
  Front Left: Playback 32 [100%] [0.00dB]
  Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA10.0 10 Master',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 80
  Front Left: Capture 50 [62%] [0.00dB]
  Front Right: Capture 50 [62%] [0.00dB]
Simple mixer control 'PGA11.0 11 Master',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 80
  Front Left: Capture 50 [62%] [0.00dB]
  Front Right: Capture 50 [62%] [0.00dB]
Simple mixer control 'PGA2.0 2 Master',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 80
  Front Left: Capture 50 [62%] [0.00dB]
  Front Right: Capture 50 [62%] [0.00dB]
Simple mixer control 'PGA3.0 3 Master',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 32
  Mono:
  Front Left: Playback 32 [100%] [0.00dB]
  Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA4.0 4 Master',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 80
  Front Left: Capture 50 [62%] [0.00dB]
  Front Right: Capture 50 [62%] [0.00dB]
Simple mixer control 'PGA7.0 7 Master',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 32
  Mono:
  Front Left: Playback 32 [100%] [0.00dB]
  Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA8.0 8 Master',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 32
  Mono:
  Front Left: Playback 32 [100%] [0.00dB]
  Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'PGA9.0 9 Master',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 32
  Mono:
  Front Left: Playback 32 [100%] [0.00dB]
  Front Right: Playback 32 [100%] [0.00dB]
Simple mixer control 'Pin5-Port0 Mux',0
  Capabilities: enum
  Items: 'NONE' 'cvt 2' 'cvt 3' 'cvt 4'
  Item0: 'NONE'
Simple mixer control 'Pin5-Port1 Mux',0
  Capabilities: enum
  Items: 'NONE' 'cvt 2' 'cvt 3' 'cvt 4'
  Item0: 'NONE'
Simple mixer control 'Pin5-Port2 Mux',0
  Capabilities: enum
  Items: 'NONE' 'cvt 2' 'cvt 3' 'cvt 4'
  Item0: 'NONE'
Simple mixer control 'Pin6-Port0 Mux',0
  Capabilities: enum
  Items: 'NONE' 'cvt 2' 'cvt 3' 'cvt 4'
  Item0: 'NONE'
Simple mixer control 'Pin6-Port1 Mux',0
  Capabilities: enum
  Items: 'NONE' 'cvt 2' 'cvt 3' 'cvt 4'
  Item0: 'NONE'
Simple mixer control 'Pin6-Port2 Mux',0
  Capabilities: enum
  Items: 'NONE' 'cvt 2' 'cvt 3' 'cvt 4'
  Item0: 'NONE'
Simple mixer control 'Pin7-Port0 Mux',0
  Capabilities: enum
  Items: 'NONE' 'cvt 2' 'cvt 3' 'cvt 4'
  Item0: 'NONE'
Simple mixer control 'Pin7-Port1 Mux',0
  Capabilities: enum
  Items: 'NONE' 'cvt 2' 'cvt 3' 'cvt 4'
  Item0: 'NONE'
Simple mixer control 'Pin7-Port2 Mux',0
  Capabilities: enum
  Items: 'NONE' 'cvt 2' 'cvt 3' 'cvt 4'
  Item0: 'NONE'
Simple mixer control 'hif5-0 Jack',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'hif5-1 Jack',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'hif5-2 Jack',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'hif6-0 Jack',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'hif6-1 Jack',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'hif6-2 Jack',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'hif7-0 Jack',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'hif7-1 Jack',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'hif7-2 Jack',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sofsklhdacard [sof-skl_hda_card], device 0: HDA Analog (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 1: HDA Digital (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 6: DMIC32 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 7: DMIC16 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Offline

#7 2019-10-14 10:34:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,172

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

@Mocco you should probably post a dmesg when booting on a "not working" boot and/or load the kernel module manually and check what kind of errors you get

Online

#8 2019-10-15 00:49:01

Mocco
Member
Registered: 2012-07-12
Posts: 53

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

I have the 4K version too, here some details about my configuration:

lspci                                
00:00.0 Host bridge: Intel Corporation Coffee Lake HOST and DRAM Controller (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 11)
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 11)
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 11)
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 11)
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 11)
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 11)
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f1)
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 11)
00:1f.3 Audio device: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 11)
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 11)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 11)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 11)
03:00.0 Non-Volatile memory controller: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD
05:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
06:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
06:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
06:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
06:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
07:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)
2d:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)
amixer -c0
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 73 [84%] [-10.50dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Bass Speaker',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 253 [99%] [-0.40dB]
  Front Right: Playback 253 [99%] [-0.40dB]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Mic Mute-LED Mode',0
  Capabilities: enum
  Items: 'On' 'Off' 'Follow Capture' 'Follow Mute'
  Item0: 'Follow Mute'
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',3
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',4
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 39 [62%] [12.00dB] [on]
  Front Right: Capture 39 [62%] [12.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC285 Analog [ALC285 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I have checked my dmesg regularly and I have never seen audio-related errors, I think the microphone is simply not visible to the kernel. How can I load the sof audio driver manually to see if I can get more info for troubleshooting?

Offline

#9 2019-10-20 11:15:48

tbw
Member
Registered: 2017-01-01
Posts: 9

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

Thanks for the guide!

There're a few typos that could be corrected:
* tar xf hda-topology.tar.gz -C /lib/firmware/intel/sof-tplg
* ln -s /lib/firmware/intel/sof-tplg/sof-hda-generic-4ch.tplg /lib/firmware/intel/sof-tplg/sof-hda-generic.tplg

Even though all 4 cards are recognized in arecord -l, I only managed to get the speakers to work and not the microphone

# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sofsklhdacard [sof-skl_hda_card], device 0: HDA Analog (*) []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 1: HDA Digital (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 6: DMIC48kHz (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 7: DMIC16kHz (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

However no sound seems to be captured when trying to record

EDIT : managed to get it working, not very clear how (see edits below). The mic mute LED (on the F4 key) does not seem to work though.

EDIT 1 :  managed to get it working by applying those two parameters in /etc/pulse/daemon.conf that you detailed and that I had removed while fine-tuning wink Thanks again!

enable-lfe-remixing = yes
#lfe-crossover-freq = 0
lfe-crossover-freq = 250

EDIT 2 : I removed the 2 parameters above and tested again, as I didn't understand why they would help and... it's still working after multiple reboots. Sometimes the driver doesn't seem to load at boot but most of the time it works...

Last edited by tbw (2019-10-22 21:19:06)

Offline

#10 2019-11-10 05:31:19

Mocco
Member
Registered: 2012-07-12
Posts: 53

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

Thank you tbw, I got it working too!

Offline

#11 2019-11-11 02:43:21

Multimoon
Member
From: /usr/share/zoneinfo/US/Eastern
Registered: 2012-09-30
Posts: 170

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

alphazo wrote:

After changing the output levels I also got the four speakers to fire properly. I noticed that the volume control doesn't offer much steps. It gets loud after 5% so you don't have much fine grain control. When I use KDE keyboard shortcut it gets very loud after just three clicks!

I had the 4 speakers working before doing the microphone fix, however the 'front' channel was extremely quiet, After this fix the microphone seems to work, but the sound output now shows up as "Cannon Point"..., and it seems that only the bottom firing speakers are working.

How did you get all 4 to work?


It always makes me laugh when people complain and rage over any distro's management ideal, when this is a linux community, and you could always make your own distro and experience the pains yourself.

Offline

#12 2019-11-17 16:18:21

Kubuxu
Member
Registered: 2019-11-17
Posts: 11

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

Seems like SOF is disabled in recent kernel:

zcat /proc/config.gz | grep SND | grep SOF
# CONFIG_SND_SOC_SOF_TOPLEVEL is not set

EDIT:

SOF in Linux was disabled due to: https://bugs.archlinux.org/task/63464

Last edited by Kubuxu (2019-11-17 16:43:09)

Offline

#13 2019-11-17 18:55:38

Kubuxu
Member
Registered: 2019-11-17
Posts: 11

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

My solution is installing linux-pf with a bit modified config.
The only thing you have to do is disable  CONFIG_SND_SOC_INTEL_SST.
After installing linux-pf and following steps from initial comment the mic is working.

Offline

#14 2019-11-22 22:09:55

ZeroLinux
Member
Registered: 2011-10-07
Posts: 157

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

Kubuxu wrote:

My solution is installing linux-pf with a bit modified config.
The only thing you have to do is disable  CONFIG_SND_SOC_INTEL_SST.
After installing linux-pf and following steps from initial comment the mic is working.

Can you make step-by-step manual?

Offline

#15 2019-11-26 17:08:17

Kubuxu
Member
Registered: 2019-11-17
Posts: 11

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

ZeroLinux wrote:

Can you make step-by-step manual?

1. Start installation of linux-pf from AUR.
2. When prompted about running kernel options press: N
3. When prompted about kernel option press: N
4. Go to Device Drivers -> Sound Card support -> Advanced Linux Sound Architecture -> ALSA for SoC audio support
5. Disable: Intel ASoC SST drivers
6. Exit config program.
7. Let it build.
8. Add it to your boot manager.
9. Follow instructions from initial post.

The issue with SOF having to be disabled in default kernel should be resolved in Linux 5.4.

Offline

#16 2019-11-27 22:24:32

ZeroLinux
Member
Registered: 2011-10-07
Posts: 157

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

Kubuxu , thank you for your reply.
Linux 5.4 was released on 24 November 2019. In changes:

13.5. Audio
Sound Open Firmware
topology: initial support for Intel ALH DAI type commit
pcm: add ALH support commit
Add OF DSP device support commit
Intel: hda: Enable jack detection commit
Intel: hda: add a parameter to disable MSI commit
Intel: initial support for Elkhart Lake commit
Intel: initial support for Tiger Lake commit
imx: Add i.MX8 HW support commit

ASoC
Intel: boards: Add Cometlake machine driver support commit
Intel: sof-rt5682: add dmic dapm widget to support dmic PCM commit
codecs: Add uda1334 codec driver commit
cs47l15: Add codec driver for Cirrus Logic CS47L15 commit
cs47l92: Add codec driver for Cirrus Logic CS47L92 commit
fsl_sai: Add support for SAI new version commit
fsl_sai: Add support for imx7ulp/imx8mq commit
fsl_sai: Add support for imx8qm commit
jz4740: Drop lb60 board code commit
sun4i-i2s: Add support for DSP formats commit
sun4i-i2s: Support more channels commit
ti: davinci-i2s: Add S32_LE as support format commit
Remove w90x900/nuc900 platform drivers commit

Which of these changes solve the problem of our mics?

Offline

#17 2019-11-28 22:18:36

Kubuxu
Member
Registered: 2019-11-17
Posts: 11

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

This commit should allow for SOF to be enabled by default. Which was an issue in 5.3.

Offline

#18 2019-11-28 23:11:46

Kubuxu
Member
Registered: 2019-11-17
Posts: 11

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

Although you will still need to do steps from this post maybe apart from the blacklist step.

Offline

#19 2019-11-28 23:20:28

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

Kubuxu, please do not serial post (one post after another if no one has replied). Edit your first post to add information if necessary.

Offline

#20 2019-12-01 18:26:05

dpward
Member
Registered: 2019-11-28
Posts: 4

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

Kubuxu wrote:

This commit should allow for SOF to be enabled by default. Which was an issue in 5.3.

That commit does not change which drivers are enabled/disabled in the kernel configuration. (SOF is still disabled by default in the vanilla kernel.)

Instead, when more than one driver has been enabled for the platform, the commit is intended to ensure that the "preferred" driver is the one that is loaded. This patch does not completely handle platforms such as Baytrail and Broadwell.


For the issue described in this thread — please try with the linux 5.4.1-arch1 package (in testing) and the sof-firmware package (new).

Last edited by dpward (2019-12-01 18:27:27)

Offline

#21 2019-12-01 19:20:19

daaku
Member
Registered: 2019-12-01
Posts: 5

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

dpward, using the linux 5.4.1-arch1 package from testing and the new sof-firmware I finally see the input device. I've made none of the modifications described on this thread, besides installing these two packages. But while the device shows up, it doesn't seem to work (I've tried arecord as well as using it in Chrome via pulseaudio). Here's some debug information that might be useful:

# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sofsklhdacard [sof-skl_hda_card], device 0: HDA Analog (*) []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 1: HDA Digital (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 6: DMIC32 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofsklhdacard [sof-skl_hda_card], device 7: DMIC16 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Finally hoping for a out-of-the-box experience that works!

Offline

#22 2019-12-02 01:18:07

Kubuxu
Member
Registered: 2019-11-17
Posts: 11

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

dpward wrote:
Kubuxu wrote:

This commit should allow for SOF to be enabled by default. Which was an issue in 5.3.

That commit does not change which drivers are enabled/disabled in the kernel configuration. (SOF is still disabled by default in the vanilla kernel.)

Instead, when more than one driver has been enabled for the platform, the commit is intended to ensure that the "preferred" driver is the one that is loaded. This patch does not completely handle platforms such as Baytrail and Broadwell.
.

Yes, but the reason SOF got disabled in Arch kernel is because it wasn't properly coexisting with SST driver. It was breaking sound for people using SST and this got SOF disabled in Arch kernel config.
That patch allows SOF to get re-enabled in Arch kernel config (which was done as seed in v5.4 from testing repo).

----------

daaku wrote:

Finally hoping for a out-of-the-box experience that works!



You probably have to install the SOF topology as described in the: Install SOF topology step. I don't think it is something Arch pkgs can provide (it is very hardware specific), but maybe.

Last edited by Kubuxu (2019-12-02 01:21:18)

Offline

#23 2019-12-02 08:39:03

daaku
Member
Registered: 2019-12-01
Posts: 5

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

The sof-firmware package seems to include some of those files:

# pacman -Ql sof-firmware | grep sof-hda-generic
sof-firmware /usr/lib/firmware/intel/sof-tplg/sof-hda-generic-2ch.tplg
sof-firmware /usr/lib/firmware/intel/sof-tplg/sof-hda-generic-4ch.tplg
sof-firmware /usr/lib/firmware/intel/sof-tplg/sof-hda-generic-idisp-2ch.tplg
sof-firmware /usr/lib/firmware/intel/sof-tplg/sof-hda-generic-idisp-4ch.tplg

I'll play around with it and see if they're outdated or something. The upstream sof github repository also has a new v1.4.1 release.

Offline

#24 2019-12-02 13:06:56

gilroy
Member
Registered: 2019-12-02
Posts: 1

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

fresh install of linux 5.3.13-arch1-1 this morning and experiencing the same issues Mocco had

@Mocco how did you manage to get yours working?

Offline

#25 2019-12-02 15:45:26

dpward
Member
Registered: 2019-11-28
Posts: 4

Re: [SOLVED] Fix for microphone on Lenovo X1 Gen 7

Kubuxu wrote:
dpward wrote:
Kubuxu wrote:

This commit should allow for SOF to be enabled by default. Which was an issue in 5.3.

That commit does not change which drivers are enabled/disabled in the kernel configuration. (SOF is still disabled by default in the vanilla kernel.)

Instead, when more than one driver has been enabled for the platform, the commit is intended to ensure that the "preferred" driver is the one that is loaded. This patch does not completely handle platforms such as Baytrail and Broadwell.
.

Yes, but the reason SOF got disabled in Arch kernel is because it wasn't properly coexisting with SST driver. It was breaking sound for people using SST and this got SOF disabled in Arch kernel config.
That patch allows SOF to get re-enabled in Arch kernel config (which was done as seed in v5.4 from testing repo).

  1. That patch is not in v5.4 (or v5.4.1). It has been merged for v5.5-rc1.

  2. Even with that patch, the SOF driver cannot coexist with the SST driver (on Broadwell and Baytrail platforms). Please see upstream comments.

The reason SOF has been re-enabled in Arch Linux is because the package maintainer changed the kernel configuration, so that the SOF driver is not built for Broadwell or Baytrail, but is built for other platforms.

Last edited by dpward (2019-12-03 05:58:44)

Offline

Board footer

Powered by FluxBB