Keep the DSPs out of the initramfs, and let the headphone port be chosen
Some checks failed
build image / build (push) Has been cancelled

Rebuilding the initramfs on the machine rather than in the build container
pulled qcom_q6v5_pas into it. There it probes while the initramfs is still the
root filesystem, asks for qcadsp850.mbn, gets -2, and never retries — the same
race 10-c630.conf already documents for the Adreno firmware. The ADSP hosts
the whole audio path, so the machine comes up with no sound card and a sound
device deferring on "error getting cpu dai name", which points nowhere near
firmware. The blobs cannot go in the initramfs to fix it: they are ~20 MiB and
are extracted from Windows, so they need not exist at build time. Omitting the
driver instead means it loads once the real root is there. The modem driver
goes with it, since it is not needed early either.

Separately, the WCD9340 decides what is plugged in by measuring impedance, so
an amplifier on the headphone socket reads as an open circuit and the jack
control never leaves 'off'. PipeWire marks the port not available, will not
keep it as the default sink, and GNOME hides it — an output that works when
driven directly becomes unreachable from the desktop. Dropping JackControl
from the Headphones device leaves availability unknown rather than no, and the
port becomes permanently selectable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011XgGF5wfxLDAybVnNz6eNQ
This commit is contained in:
2026-08-14 16:41:03 +03:00
parent 477d43aacd
commit 36dc54e8db
3 changed files with 159 additions and 0 deletions

View File

@@ -620,6 +620,41 @@ suspend/resume or per-stream volumes, all of which look guilty and are not.
built-in card to S16_LE, which fixes every client. The underlying q6asm
format bug is worth a report to alsa-devel.
**The DSPs have to load after the switch to the real root.** `qcom_q6v5_pas`
boots the ADSP, CDSP and SLPI as soon as it probes. If it is in the initramfs
it probes while the initramfs is still the root filesystem, asks for
`qcom/sdm850/LENOVO/81JL/qcadsp850.mbn`, gets `-2`, and never retries — the
same race the Adreno firmware loses, and the reason
`overlay/etc/dracut.conf.d/10-c630.conf` omits both remoteproc drivers. The
symptom points nowhere near firmware: the ADSP hosts the entire audio path, so
what you see is no sound card at all and a sound device stuck in deferred
probe complaining `msm-snd-sdm845: MultiMedia1: error getting cpu dai name`,
because the q6 DAIs it wants to bind to were never registered. `dmesg` is no
help either if the modem is crash-looping, since 80-odd crashes will have
pushed the early firmware failures out of the ring buffer — use
`journalctl -b -k`. To confirm the diagnosis in one step:
```sh
cat /sys/class/remoteproc/remoteproc0/state # 'offline' when this has bitten
echo start | sudo tee /sys/class/remoteproc/remoteproc0/state
cat /proc/asound/cards # card appears within seconds
```
**Headphone detection does not work with an amplifier.** The WCD9340 decides
what is in the socket by measuring impedance, which suits headphones (16-32
ohm) and not a line input — an amplifier looks like an open circuit, so
`Headphone Jack` (numid=108) never leaves `off`. PipeWire takes that as
authoritative, marks the port `not available`, refuses to keep it as the
default sink, and GNOME hides it from Settings, so a perfectly working output
becomes unreachable. The output itself is fine: `speaker-test -D plughw:0,2`
(the headphone PCM, MultiMedia3 — the speakers are `hw:0,0`) plays through it.
`overlay/usr/share/alsa/ucm2/Qualcomm/sdm845/HiFi-MM1.conf` is a copy of the
alsa-ucm file with the Headphones device's `JackControl` line removed, which
leaves availability `unknown` instead of `no` and makes the port permanently
selectable. The trade is that real headphones no longer switch automatically.
Since it shadows a packaged file, an `alsa-ucm` update puts the stock one back
and the port vanishes from Settings again.
Unrelated to the hardware, two pieces of routing politics are worth knowing
on a machine like this: PipeWire's RAOP discovery will happily make a
neighbour's AirPlay speaker the default sink, and a newly connected