Describe the bug
On Alder Lake, the SoF digital microphone input (DMIC) sometimes fails when an app tries to start microphone capture.
The failing device is:
The failure happens during ALSA set_hw_params and returns:
When this happens, PipeWire capture clients can fail immediately on startup. One example is wiremix, but the problem also affects other apps that try to open the DMIC.
This issue is intermittent. The same settings may work on one launch and fail on another.
I tested multiple buffer sizes, period settings, and sample formats:
S16LE fails randomly
S32LE also fails randomly
S24LE with smaller buffers is fully stable
The only configuration that consistently fixes the issue for me is:
S24LE
- small buffers
period-size=256
periods=4
buffer-bytes=6144
disable-mmap=true
So the problem appears to be related to certain hardware parameter combinations being accepted only inconsistently by the driver or firmware.
Workarounds tried
I tested these workarounds:
Results:
S16LE still fails randomly
S32LE still fails randomly
S24LE with the settings above gives 0 failures
To reproduce
-
Start PipeWire and WirePlumber
-
Launch any app that opens the DMIC capture device
-
The easiest test case is wiremix
-
About 1 out of 4 launches fails with:
Start error: Invalid argument
Reproduction command
Run this from foot under swayfx:
DWELL=3 /tmp/wiremix-investigate/wiremix-crash-test-long.sh 40
Test script used
#!/usr/bin/env bash
set -euo pipefail
OUTDIR=/tmp/wiremix-investigate/crash
mkdir -p "$OUTDIR"
APP_ID=wiremixterm
iters=${1:-120}
dwell=${DWELL:-3.0}
check_proc() {
pgrep -u "$(id -u)" -x wiremix >/dev/null 2>&1
}
fails=0
invalid=0
for i in $(seq 1 "$iters"); do
tag="crashlong_$(printf '%03d' $i)_$(date +%H%M%S)"
log="$OUTDIR/${tag}.log"
swaymsg "[app_id=\"$APP_ID\"] kill" >/dev/null 2>&1 || true
pkill -x wiremix 2>/dev/null || true
footclient -N -a "$APP_ID" -T "$APP_ID" --hold \
sh -lc "script -q -c 'wiremix' '$log'" &
sleep "$dwell"
p=0
if check_proc; then p=1; fi
if [ $p -eq 0 ]; then
fails=$((fails+1))
if rg -q 'Start error: Invalid argument' "$log"; then
invalid=$((invalid+1))
fi
fi
swaymsg "[app_id=\"$APP_ID\"] kill" >/dev/null 2>&1 || true
pkill -x wiremix 2>/dev/null || true
sleep 0.4
done
echo "fails=$fails/$iters invalid=$invalid/$iters"
Reproduction rate
With the default parameters:
- format:
S16LE
- rate:
16000
- period size:
512
- periods:
64
I see about:
- 10 to 12 failures out of 40 launches
- roughly 1 in 4 launches fail
With the workaround settings:
- format:
S24LE
- small buffers
I get:
- 0 failures out of 40 launches
Expected behavior
The DMIC capture device should reliably accept valid hardware parameters every time and allow microphone capture clients to start without random failures.
Actual behavior
The DMIC intermittently rejects hardware parameters during set_hw_params, returning Invalid argument.
When that happens, apps that try to open the microphone can fail immediately on launch.
Impact
This is a showstopper for microphone capture on the internal DMIC.
Because the failure is random, any app that uses this microphone may fail unpredictably, including:
- wiremix
- audio recorders
- other PipeWire capture clients
Environment
Kernel / firmware
- Kernel:
6.12.76_1 on Void Linux
- SOF firmware:
sof-firmware-2025.12.2_1
I do not have the upstream commit hashes because these came from distro packages.
Desktop environment
- Wayland compositor:
swayfx
- Terminal:
foot
Topology
intel/sof-tplg/sof-adl-max98357a-rt5682.tplg
From dmesg:
sof-audio-pci-intel-tgl 0000:00:1f.3: Topology file: intel/sof-tplg/sof-adl-max98357a-rt5682.tplg
Platform
- Alder Lake
- PCI device:
0000:00:1f.3
- driver:
sof-audio-pci-intel-tgl
Console output
PipeWire SPA ALSA log
This is the intermittent failure:
hw:0,100c: format:S16_LE access:mmap-interleaved rate:16000 channels:2
period frames 512, periods 64, buffer frames 32768
set_hw_params: Invalid argument
Kernel log excerpt
sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx error for 0x60010000 (msg/reply size: 108/20): -5
sof-audio-pci-intel-tgl 0000:00:1f.3: HW params ipc failed for stream 1
sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_pcm_component_hw_params on 0000:00:1f.3: -5
Stable workaround
This configuration completely avoids the issue in my testing:
format: S24_LE
rate: 16000
channels: 2
period-size: 256
periods: 4
buffer-bytes: 6144
access: RW_INTERLEAVED
disable-mmap: true
Additional logs
I can provide full logs on request, including:
- PipeWire debug logs
dmesg
sof-logger
Commands used:
# enable PipeWire debug
export SPA_LOG_LEVEL=5
export SPA_DEBUG=alsa:5
export PIPEWIRE_DEBUG=4
# reproduce, then grab logs
DWELL=3 /tmp/wiremix-investigate/wiremix-crash-test-long.sh 40
cp ~/.local/state/user-runit/pipewire.log /tmp/pipewire-debug.log
sudo dmesg > /tmp/dmesg.log
Describe the bug
On Alder Lake, the SoF digital microphone input (DMIC) sometimes fails when an app tries to start microphone capture.
The failing device is:
hw:0,100pro-input-100The failure happens during ALSA
set_hw_paramsand returns:Invalid argumentWhen this happens, PipeWire capture clients can fail immediately on startup. One example is wiremix, but the problem also affects other apps that try to open the DMIC.
This issue is intermittent. The same settings may work on one launch and fail on another.
I tested multiple buffer sizes, period settings, and sample formats:
S16LEfails randomlyS32LEalso fails randomlyS24LEwith smaller buffers is fully stableThe only configuration that consistently fixes the issue for me is:
S24LEperiod-size=256periods=4buffer-bytes=6144disable-mmap=trueSo the problem appears to be related to certain hardware parameter combinations being accepted only inconsistently by the driver or firmware.
Workarounds tried
I tested these workarounds:
changing PipeWire and WirePlumber buffer and period settings
switching format from
S16LEtoS32LEforcing a stable config:
S24LEperiod-size=256periods=4buffer-bytes=6144disable-mmap=trueResults:
S16LEstill fails randomlyS32LEstill fails randomlyS24LEwith the settings above gives 0 failuresTo reproduce
Start PipeWire and WirePlumber
Launch any app that opens the DMIC capture device
The easiest test case is
wiremixAbout 1 out of 4 launches fails with:
Start error: Invalid argumentReproduction command
Run this from
footunderswayfx:Test script used
Reproduction rate
With the default parameters:
S16LE1600051264I see about:
With the workaround settings:
S24LEI get:
Expected behavior
The DMIC capture device should reliably accept valid hardware parameters every time and allow microphone capture clients to start without random failures.
Actual behavior
The DMIC intermittently rejects hardware parameters during
set_hw_params, returningInvalid argument.When that happens, apps that try to open the microphone can fail immediately on launch.
Impact
This is a showstopper for microphone capture on the internal DMIC.
Because the failure is random, any app that uses this microphone may fail unpredictably, including:
Environment
Kernel / firmware
6.12.76_1on Void Linuxsof-firmware-2025.12.2_1I do not have the upstream commit hashes because these came from distro packages.
Desktop environment
swayfxfootTopology
intel/sof-tplg/sof-adl-max98357a-rt5682.tplgFrom
dmesg:Platform
0000:00:1f.3sof-audio-pci-intel-tglConsole output
PipeWire SPA ALSA log
This is the intermittent failure:
Kernel log excerpt
Stable workaround
This configuration completely avoids the issue in my testing:
Additional logs
I can provide full logs on request, including:
dmesgsof-loggerCommands used: