Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Tiger Lake audiocontroller/sound card not found

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
16 posts • Page 1 of 1
Author
Message
AstroFloyd
n00b
n00b
User avatar
Posts: 59
Joined: Tue Oct 18, 2011 3:29 pm

Tiger Lake audiocontroller/sound card not found

  • Quote

Post by AstroFloyd » Wed Jan 12, 2022 3:09 pm

I've been trying to get the sound on my new ThinkPad working for several days, but no luck so far. I seem to be missing some driver or firmware in my kernel config.

Code: Select all

lspci -k
00:1f.3 Audio device: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
     Subsystem: Lenovo Tiger Lake-LP Smart Sound Technology Audio Controller
     Kernel driver in use: sof-audio-pci
while Arch Linux says

Code: Select all

lspci -k
00:1f.3 Audio device: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
      Subsystem: Lenovo Device 22c9
      Kernel driver in use: sof-audio-pci
      Kernel modules: snd_hda_intel, snd_sof_pci
Relevant dmesg lines seem to be

Code: Select all

dmesg | grep -Eiw -A3 'audio|alsa|sound|error|sof'  # edited
ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
Advanced Linux Sound Architecture Driver Initialized.
snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops)
ALSA device list:
platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
  No soundcards found.
sof-audio-pci 0000:00:1f.3: use msi interrupt mode
cfg80211: failed to load regulatory.db
sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
sof-audio-pci 0000:00:1f.3: DMICs detected in NHLT tables: 2
Loading firmware: intel/sof/sof-tgl.ri
sof-audio-pci 0000:00:1f.3: Firmware info: version 1:6:1-53680
sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:17:0 Kernel ABI 3:17:0
(I'm guessing the regularoty.db lines are unrelated(?)).

I seem to have tried all I can think of or find online, and it clearly isn't enough. All help is welcome!

I posted my full dmesg and kernel config.
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Wed Jan 12, 2022 3:13 pm

Which Thinkpad do you have? Which CODEC does it have? If you don't the latter, just tell us the exact model name of your Thinkpad.
Top
AstroFloyd
n00b
n00b
User avatar
Posts: 59
Joined: Tue Oct 18, 2011 3:29 pm

  • Quote

Post by AstroFloyd » Wed Jan 12, 2022 3:48 pm

It's a ThinkPad T14 Gen 2. How can I find its CODEC?
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Wed Jan 12, 2022 4:03 pm

AstroFloyd wrote:It's a ThinkPad T14 Gen 2. How can I find its CODEC?
Google this: "Chip set ThinkPad T14" and you will find:
https://support.lenovo.com/en/solutions ... 20w0z90aus
Now disable all other codecs in your kernel config.
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Wed Jan 12, 2022 4:17 pm

Your notebook seems to have a Realtek ALC3287 codec - as @pietinger already pointed out.

CONFIG_SND_HDA_CODEC_REALTEK=y must be enabled. That option is enabled, so that's fine.

It seems that CONFIG_SND_SOC is enabled, too. Disable that option. It seems that it prohibits initialization of the HDA driver:

Code: Select all

Kernel driver in use: sof-audio-pci
      Kernel modules: snd_hda_intel, snd_sof_pci 
I would like to see:

Code: Select all

Kernel driver in use: snd_hda_intel
Try a newer kernel: 5.15.
Top
AstroFloyd
n00b
n00b
User avatar
Posts: 59
Joined: Tue Oct 18, 2011 3:29 pm

  • Quote

Post by AstroFloyd » Wed Jan 12, 2022 6:24 pm

Thanks both for your help!

@pietinger: I apologise - I wasn't trying to be lazy, but under the impression that online info would not yield useful results about my laptop, since the Gen2 could have a i5/i7 CPU, Intel/NVidia graphics, etc. - I wasn't aware that the codecs would all be the same.

@mike155: disabling CONFIG_SND_SOC yields a longer list of entries in /dev/snd/ and alsamixer now works and lspci says "Kernel driver in use: snd_hda_intel", even though dmesg still claims "No soundcards found." So this seems to have solved things, but I need to have a good look when I have more time.
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Wed Jan 12, 2022 10:36 pm

Next step: take a look at the output of

Code: Select all

aplay -l
If your 'analog device' is NOT card #0, device #0, it could be necessary to configure your 'analog device' in /etc/asound.conf.
Top
AstroFloyd
n00b
n00b
User avatar
Posts: 59
Joined: Tue Oct 18, 2011 3:29 pm

  • Quote

Post by AstroFloyd » Tue Jan 25, 2022 2:30 pm

After following your suggestions, everything works (output over internal speakers, earphones, HDMI, bluetooth -> hifi and the mike of my headset) EXCEPT the internal microphone. It is listed in alsamixer and I can en/disable it using the space bar or change its volume, but it does not want to record anything. When using my headset, arecord /tmp/test.wav works and I can aplay the file. However, without headset, when I would expect the internal mike to jump in, I get

Code: Select all

Recording WAVE '/tmp/test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
ALSA lib /var/tmp/portage/media-plugins/alsa-plugins-1.2.2/work/alsa-plugins-1.2.2/pulse/pcm_pulse.c:752:(pulse_prepare) PulseAudio: Unable to create stream: Input/Output error

arecord: set_params:1407: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  U8
SUBFORMAT:  STD
SAMPLE_BITS: 8
FRAME_BITS: 8
CHANNELS: 1
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 1000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 4000
BUFFER_BYTES: 4000
TICK_TIME: [0 0]
Also, when the headset is plugged in, my Fn-F4 mute mike button with LED follows alsamixer or the other way around. However, without headset, the button does not work (no change in LED when pressed) and it doesn't seem to change anything in alsamixer either...

Do you have any idea what the issue might be or how to start figuring this out?
Top
xgivolari
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Mon Jul 26, 2021 6:55 pm

  • Quote

Post by xgivolari » Tue Jan 25, 2022 6:10 pm

I also have a Lenovo Laptop with Tiger Lake CPU. On my machine, the ALC257 chip uses the normal HDA_REALTEK driver, while the internal mic is powered by the SoC DMIC driver. To enable both at the same time, the following options must be selected:

Code: Select all

CONFIG_SND_SOC
CONFIG_SND_SOC_SOF_TOPLEVEL
CONFIG_SND_SOC_SOF_PCI
CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL
CONFIG_SND_SOC_SOF_INTEL_TIGERLAKE
CONFIG_SND_SOC_SOF_HDA_LINK
CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC
CONFIG_SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
CONFIG_SND_SOC_DMIC (this is the actual mic driver; auto-selected by the above)
CONFIG_SND_HDA_CODEC_HDMI
CONFIG_SND_HDA_CODEC_REALTEK
Top
AstroFloyd
n00b
n00b
User avatar
Posts: 59
Joined: Tue Oct 18, 2011 3:29 pm

  • Quote

Post by AstroFloyd » Sat Feb 12, 2022 3:23 pm

Thanks a lot @xgivolari, and apologies for the slow response.

Somehow, this doesn't seem to work for me - my HDA device disappears, as @mike155 would predict when reenabling CONFIG_SND_SOC. You must have done something else to get both HDA and SoC DMIC working...?

Also, do you happen to have any of the SND_SOC_INTEL_SKYLAKE_* enabled?
Top
xgivolari
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Mon Jul 26, 2021 6:55 pm

  • Quote

Post by xgivolari » Sat Feb 12, 2022 8:59 pm

Instead of CONFIG_SND_SOC_SOF_INTEL_TIGERLAKE , I meant to write CONFIG_SND_SOC_SOF_TIGERLAKE, my bad. SND_SOC_INTEL_SKYLAKE is only necessary on older systems. Tiger Lake is exclusively supported by SOF. Snd_hda_intel being blocked from loading is perfectly normal. I have it disabled alltogether. (not the hda codec drivers though!) Which driver does lspci report now for your sound card? Ideally, it should be sof-audio-intel-pci-tgl.

The relevant kernel option we need is SND_SOC_SOF_INTEL_TGL. This cannot be selected manually, it enables itself when all its dependencies are satisfied. (That's the other config options I listed in my previous post) To check wether or not it is enabled in your current config, boot up menuconfig, press "/" and type "tgl" into the search prompt. This shows you the current status of SND_SOC_SOF_INTEL_TGL, as well as all of its dependencies and their respective statuses. With my config, it looks like this:

Code: Select all

  │ Symbol: SND_SOC_SOF_INTEL_TGL [=y]                                                                                                                                                    │  
  │ Type  : tristate                                                                                                                                                                      │  
  │ Defined at sound/soc/sof/intel/Kconfig:177                                                                                                                                            │  
  │   Depends on: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_INTEL_TOPLEVEL [=y] && SND_SOC_SOF_PCI [=y]                                  │  
  │ Selects: SND_SOC_SOF_HDA_COMMON [=y] && SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE [=y]                                                                                                │  
  │ Selected by [y]:                                                                                                                                                                      │  
  │   - SND_SOC_SOF_TIGERLAKE [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_INTEL_TOPLEVEL [=y] && SND_SOC_SOF_PCI [=y]              │  
  │ Selected by [n]:                                                                                                                                                                      │  
  │   - SND_SOC_SOF_ELKHARTLAKE [=n] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_INTEL_TOPLEVEL [=y] && SND_SOC_SOF_PCI [=y]            │  
  │   - SND_SOC_SOF_ALDERLAKE [=n] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_INTEL_TOPLEVEL [=y] && SND_SOC_SOF_PCI [=y]              │  
  │                                                                                                                                                                            
Top
luna80
Veteran
Veteran
User avatar
Posts: 1569
Joined: Sun Feb 01, 2004 7:51 am
Location: switzerland

  • Quote

Post by luna80 » Sun Feb 13, 2022 7:31 am

AstroFloyd wrote:It's a ThinkPad T14 Gen 2. How can I find its CODEC?
I have the same since 5 day and me too I try to configure the audio.

The sound works with CONFIG_SND_HDA_CODEC_REALTEK=y but if I add the others required options (CONFIG_SND_SOC_*) to get works the mic, it doesn't works anymore

sorry for my bad english, I hope you understand
*** !f j00 c4n r34D tH15 tH3N j00 n33D t0 l0g Off ***
Top
AstroFloyd
n00b
n00b
User avatar
Posts: 59
Joined: Tue Oct 18, 2011 3:29 pm

  • Quote

Post by AstroFloyd » Sun Feb 13, 2022 7:54 am

@xgivolari Thanks for the clarification (and no worries about the typo; I'm really glad you're helping out). I'm going to try this. Just to be sure, is the CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL in your list (which also features SND_SOC_SOF_INTEL) correct? Edit: I see it is correct from the menuconfig deps.

@luna80 You are perfectly understandable! :)

PS:
  • I just noticed that no *TGL* exists in my kernel - I'm still on v5.10, so I'll need to upgrade to v5.15 first (I never did that after (nearly) everything started working).
  • One of the nonintuitive ones is that you need to enable GPIOLIB to select CONFIG_SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
Top
AstroFloyd
n00b
n00b
User avatar
Posts: 59
Joined: Tue Oct 18, 2011 3:29 pm

  • Quote

Post by AstroFloyd » Sun Feb 13, 2022 10:14 am

OK, I booted a 5.15.23 kernel with all _SOF_ options enabled, but no luck.

dmesg says

Code: Select all

snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
sof-audio-pci-intel-tgl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops)

ALSA device list:
  No soundcards found.

sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5
sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2

Loading firmware: intel/sof/sof-tgl.ri
sof-audio-pci-intel-tgl 0000:00:1f.3: Direct firmware load for intel/sof/sof-tgl.ri failed with error -2
sof-audio-pci-intel-tgl 0000:00:1f.3: error: sof firmware file is missing, you might need to
sof-audio-pci-intel-tgl 0000:00:1f.3:        download it from https://github.com/thesofproject/sof-bin/
sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP firmware -2
sof-audio-pci-intel-tgl 0000:00:1f.3: error: sof_probe_work failed err: -2
I've got sys-firmware/sof-firmware-1.9.3-r1 installed (also tried 1.6.1) and /lib/firmware/intel/sof/sof-tgl.ri exists. I think this worked ~2 months ago before I disabled all SOF options, but I'm not 100% sure and my notes from that time are not very clear.

In addition, I also get

Code: Select all

i915 0000:00:02.0: Direct firmware load for i915/tgl_dmc_ver2_12.bin failed with error -2
i915 0000:00:02.0: [drm] Failed to load DMC firmware i915/tgl_dmc_ver2_12.bin. Disabling runtime power management.
i915 0000:00:02.0: [drm] DMC firmware homepage: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
which loaded without errors before.

lspci -k gives

Code: Select all

00:1f.3 Audio device: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
     Subsystem: Lenovo Tiger Lake-LP Smart Sound Technology Audio Controller
     Kernel driver in use: sof-audio-pci-intel-tgl
which should look good.

I have no idea why the firmware driver cannot be loaded when the kernel asks for it and it exists...
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Feb 13, 2022 11:08 am

AstroFloyd wrote:I have no idea why the firmware driver cannot be loaded when the kernel asks for it and it exists...
It depends whether you build a kernel module as module or static into your kernel. If it is build static into your kernel AND it needs firmware, then this module has a "problem": At boot time there is no access to root partition and THEREFORE the firmware must be included INTO the kernel also.

Only if you build this kernel module as module it has the chance (because it will be loaded at a later time) to load its firmware from /lib/firmware/... residing on your root partition.

So, if you build your module static you must define it here (example from my station: loading firmware for Intel GPU and microcode for INTEL CPU):

Code: Select all

#
# Firmware loader
#
CONFIG_FW_LOADER=y
CONFIG_EXTRA_FIRMWARE="i915/skl_dmc_ver1_27.bin intel-ucode/06-5e-03"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
With this my firmware is included as binary blob in my kernel (after compiling the kernel of course).
Top
luna80
Veteran
Veteran
User avatar
Posts: 1569
Joined: Sun Feb 01, 2004 7:51 am
Location: switzerland

  • Quote

Post by luna80 » Tue Feb 15, 2022 2:35 pm

AstroFloyd

have you found a solution?

I get the audio working, if you put the CONFIG_SND_SOC_SOF_INTEL_TIGERLAKE like module in the kernel, it will load the firmware automatically, and don't forget to load the module at start (/etc/modules-load.d/, in a *.conf file put snd-sof-pci-intel-tgl)
*** !f j00 c4n r34D tH15 tH3N j00 n33D t0 l0g Off ***
Top
Post Reply

16 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic