Skip to content

Instantly share code, notes, and snippets.

@tanji
Created February 6, 2026 11:06
Show Gist options
  • Select an option

  • Save tanji/3ace56e1587f3d167e9d7b099e5ce2a0 to your computer and use it in GitHub Desktop.

Select an option

Save tanji/3ace56e1587f3d167e9d7b099e5ce2a0 to your computer and use it in GitHub Desktop.
thinkpad x1 carbon gen10 audio fix

ThinkPad X1 Carbon Gen 10 Audio Fix

System Information

  • Model: Lenovo ThinkPad X1 Carbon Gen 10 (21CBCTO1WW)
  • Audio Codec: Realtek ALC287 (Subsystem ID: 0x17aa22e7)
  • Audio Controller: Intel Alder Lake PCH-P High Definition Audio Controller
  • OS: Manjaro Linux (Kernel 6.12)

Problem Description

After a fresh installation or system update, the integrated microphone and built-in speakers were not working:

  • Microphone: Did not appear as available in PulseAudio/PipeWire (showed as "not available" or "unplugged")
  • Speakers: No audio output even though they appeared in audio settings

Root Cause

The ThinkPad X1 Carbon Gen 10 uses:

  1. Digital MEMS microphones connected via Intel Smart Sound Technology (not traditional HDA analog inputs)
  2. SOF (Sound Open Firmware) driver for proper DSP routing

The system was initially configured to use the legacy HDA Intel driver (dsp_driver=1 auto mode), which doesn't support the digital microphone array and doesn't initialize SOF DSP gain stages correctly.

Solution

Step 1: Force SOF Driver Mode

Edit the ALSA DSP configuration:

File: /etc/modprobe.d/alsa-base.conf

# Force SOF driver for ThinkPad X1 Carbon Gen 10 digital microphones
# dsp_driver: 1=auto, 2=legacy/AVS, 3=SOF, 4=Intel SST
options snd-intel-dspcfg dsp_driver=3

Step 2: Update GRUB Boot Parameters

Edit GRUB configuration:

File: /etc/default/grub

Change the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet snd-intel-dspcfg.dsp_driver=1 apparmor=1 security=apparmor udev.log_priority=3"

To:

GRUB_CMDLINE_LINUX_DEFAULT="quiet snd-intel-dspcfg.dsp_driver=3 apparmor=1 security=apparmor udev.log_priority=3"

Then regenerate GRUB configuration:

sudo grub-mkconfig -o /boot/grub/grub.cfg

Step 3: Reboot

Reboot the system to load the SOF driver.

Step 4: Fix Mixer Settings (Post-Reboot)

After rebooting with SOF driver, the mixer settings need to be configured:

# Disable auto-mute mode (prevents speakers from being muted)
amixer -c 0 sset 'Auto-Mute Mode' 'Disabled'

# Set DAC volumes to maximum
amixer -c 0 cset numid=1 87,87  # DAC1
amixer -c 0 cset numid=3 87,87  # DAC2

# Set SOF DSP pipeline gain stages (PGA) to maximum
amixer -c 0 cset numid=37 32,32  # PGA1.0
amixer -c 0 cset numid=40 32,32  # PGA7.0
amixer -c 0 cset numid=41 32,32  # PGA8.0
amixer -c 0 cset numid=42 32,32  # PGA9.0
amixer -c 0 cset numid=48 32,32  # PGA30.0
amixer -c 0 cset numid=49 32,32  # PGA31.0

# Save settings to persist across reboots
sudo alsactl store

Verification

After applying the fix, verify the setup:

Check SOF Driver Loaded

sudo dmesg | grep -i sof

Expected output should include:

  • sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 4
  • Topology file: intel/sof-tplg/sof-hda-generic-4ch.tplg
  • Firmware loaded successfully

Check Audio Devices

arecord -l  # Should show DMIC devices
aplay -l    # Should show Speaker and HDMI outputs

Expected capture devices:

  • card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*)
  • card 0: sofhdadsp [sof-hda-dsp], device 6: DMIC (*)
  • card 0: sofhdadsp [sof-hda-dsp], device 7: DMIC16kHz (*)

Test Audio

# Test speakers
paplay /usr/share/sounds/alsa/Front_Center.wav

# Test microphone (record 3 seconds)
arecord -f cd -d 3 test.wav
aplay test.wav

Technical Details

Why SOF is Required

The ThinkPad X1 Carbon Gen 10 uses:

  • 4 digital MEMS microphones connected via I2S/PDM interfaces (not HDA analog pins)
  • Intel Smart Sound Technology (SST) DSP for audio processing
  • SOF firmware (intel/sof/sof-adl.ri) for DSP control
  • SOF topology (intel/sof-tplg/sof-hda-generic-4ch.tplg) for audio routing

The legacy HDA driver only supports analog audio connections and cannot access the digital microphone array.

Mixer Controls Explanation

  • Auto-Mute Mode: When enabled, automatically mutes speakers when headphones are detected (or when jack detection fails)
  • DAC1/DAC2: Digital-to-Analog Converter volumes for the HDA codec
  • PGA (Programmable Gain Amplifier): DSP pipeline gain stages in SOF firmware
    • PGA values range from 0-32 (0 = -64dB/mute, 32 = 0dB)
    • All PGA stages must be set properly for audio to flow through the DSP

File Locations

  • SOF Firmware: /lib/firmware/intel/sof/sof-adl.ri
  • SOF Topology: /lib/firmware/intel/sof-tplg/sof-hda-generic-4ch.tplg
  • ALSA State: /var/lib/alsa/asound.state

Alternative Approaches Attempted (Did Not Work)

  1. HDA codec pin remapping: Attempted to remap pin 0x19 as internal mic using firmware patches

    • Created /lib/firmware/hda-jack-retask.fw with pin configuration
    • Failed because the microphone is not connected to HDA pins at all
  2. Model quirks: Tried various model parameters (model=thinkpad, etc.)

    • Did not work because the hardware requires SOF, not HDA quirks
  3. Auto mode (dsp_driver=1): System chose HDA over SOF

    • Auto-detection logic preferred legacy HDA driver
    • Manual override to SOF was necessary

References

Credits

Issue diagnosed and resolved through systematic investigation of:

  • Kernel audio subsystem (HDA vs SOF)
  • ALSA mixer control states
  • SOF DSP pipeline configuration
  • PipeWire/PulseAudio routing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment