Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7d8f7d0
Add HP EliteBook X G2i audio and camera packages
meirdick Aug 7, 2026
5f02795
Source DKMS trees from a public repo
meirdick Aug 7, 2026
5044966
linux-ptl: carry the HP EliteBook X G2i audio and camera patches
meirdick Aug 9, 2026
42b8cd6
Split intel-ipu7-drivers out of intel-ipu7-camera
meirdick Aug 9, 2026
29c1444
hp-elitebook-x-g2i-audio: drop DKMS, stop overwriting alsa-ucm-conf
meirdick Aug 9, 2026
755367e
hp-elitebook-x-g2i-camera: depend on the ipu7 drivers, ship only ov05c10
meirdick Aug 9, 2026
4e0d25c
linux-ptl: 7.1.5.arch1, matching what the repo already publishes
meirdick Aug 9, 2026
4847a70
linux-ptl: track Arch's 7.1.5 config verbatim
meirdick Aug 11, 2026
7bd203f
intel-ipu7-drivers: conflict with the AUR packaging of the same modules
meirdick Aug 11, 2026
5c688c3
Correct the CamHAL diagnosis: the negative crop is not the bug
meirdick Aug 11, 2026
0d8970a
Ignore the git sources the two camera packages clone
meirdick Aug 11, 2026
c27716d
Record the libcamera route off the software ISP
meirdick Aug 11, 2026
d1d4175
Load v4l2loopback from the service that needs it
meirdick Aug 11, 2026
f765aa4
Stop the WirePlumber guard from being able to kill audio
meirdick Aug 12, 2026
7e696f8
Give the libcamera colour tuning an owner
meirdick Aug 12, 2026
423f346
Silence the raw-node permission errors WirePlumber logs
meirdick Aug 12, 2026
62dad7a
Replace the ffmpeg pipeline with libcamera
meirdick Aug 12, 2026
d8c7272
Merge upstream master: linux-ptl 7.1.5 -> 7.1.8
meirdick Aug 12, 2026
449a3cf
Merge upstream master: linux-ptl 7.1.8.arch1-2
meirdick Aug 13, 2026
7adbcf1
linux-ptl: do not block system resume on the TAS2783 amps
meirdick Aug 28, 2026
0bcd6ba
audio-recover: any profile other than HiFi is a fault
meirdick Aug 28, 2026
211b721
linux-ptl: backport the TAS2783 resume-correctness wave (0034-0039)
meirdick Aug 29, 2026
1b4d68c
linux-ptl: carry jml's .startup amp re-init (0040, unmerged v2)
meirdick Aug 30, 2026
0a0acf1
Camera v2: CamHAL engine by default, SoftISP fallback, NR engaged
meirdick Aug 31, 2026
c74b665
Camera: ship NR strength -120 after the daylight check
meirdick Aug 31, 2026
2efa77f
Camera 2.0.2: VEBOX temporal denoise stage plus AE knobs
meirdick Aug 31, 2026
54c13ca
linux-ptl: true four-speaker stereo, and room for the shared series
meirdick Sep 4, 2026
18cfdf7
hp-elitebook-x-g2i-audio: rescue zeroed speaker gains, clean up capture
meirdick Sep 4, 2026
d151f92
hp-elitebook-x-g2i-audio: document the stereo series
meirdick Sep 4, 2026
3ed5ba0
linux-ptl: 7.2.3 rebase, amp calibration, camera cold start
meirdick Sep 11, 2026
038c640
camhal-runtime: note the jsoncpp soname hazard
meirdick Sep 14, 2026
d881977
linux-ptl: one late amp must not take the card down; camhal-runtime p…
meirdick Sep 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ pkgbuilds/*/squashfs-root/
pkgbuilds/*/starter/
pkgbuilds/asdcontrol/asdcontrol/
pkgbuilds/dropbox-cli/dropbox-cli-*.py
pkgbuilds/hp-elitebook-x-g2i-camera/ipu6-drivers/
pkgbuilds/libcamera-ov05c10/libcamera/
pkgbuilds/intel-ipu7-drivers/ipu7-drivers/
pkgbuilds/intel-ipu7-drivers/vision-drivers/
pkgbuilds/macbook12-spi-driver-dkms/macbook12-spi-driver/
pkgbuilds/omazed/steps.txt
pkgbuilds/symfony-cli/symfony*
Expand Down
3 changes: 3 additions & 0 deletions pkgbuilds/hp-elitebook-x-g2i-audio/.omarchy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"source": "local"
}
16 changes: 16 additions & 0 deletions pkgbuilds/hp-elitebook-x-g2i-audio/50-wait-tas2783.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Service]
# Wait for the TAS2783 amp controls to appear before WirePlumber enumerates the
# card, so it does not build a profile from a half-enumerated device.
#
# The leading "-" is deliberate and load-bearing. This guard is an optimisation:
# without it the amps sometimes enumerate late and the audio-recover user unit
# heals it a moment later. But WirePlumber treats a failed ExecStartPre as a
# failed start, and a failed WirePlumber is not "no speakers", it is no audio at
# all -- no card, no sinks, nothing. Trading a boot race for total silence is a
# bad trade, so a guard that cannot run must not be able to stop WirePlumber.
#
# Observed on the reference machine: a stale drop-in of this name left in
# /etc/systemd/user, which outranks this file, pointed ExecStartPre at a path
# that no longer existed. WirePlumber hit 203/EXEC, exhausted its restart limit
# and gave up. The kernel side was perfectly healthy the entire time.
ExecStartPre=-/usr/bin/wait-tas2783-controls
81 changes: 81 additions & 0 deletions pkgbuilds/hp-elitebook-x-g2i-audio/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Maintainer: Meir Dick <mdick85@gmail.com>
#
# Speakers and microphone for the HP EliteBook X G2i (Panther Lake).
#
# The board pairs an RT712 SDCA codec with four TAS2783 smart amps. The kernel
# changes needed to drive that combination all ship in linux-ptl, the same
# kernel this machine already installs for its other Panther Lake backports: a
# Panther Lake ACPI match-table entry, a component name for the TAS2783A amp so
# the card advertises " spk:tas2783", and the three-patch series that splits the
# four-amp link across two PDIs so the speakers are stereo rather than four
# copies of the left channel.
#
# With those in place stock alsa-ucm-conf does the rest, and this package is
# only the userspace remainder:
#
# - the Speaker device definition, at the path HiFi.conf already looks for
# - firmware filename symlinks the tas2783 driver asks for
# - two layers of protection against the amp enumeration race at boot
#
# No DKMS. Nothing here overrides a file another package owns.
#
# It carries no vendor tuning data. The perceptual voicing ships separately as
# an Omarchy audio tuning.

pkgname=hp-elitebook-x-g2i-audio
pkgver=1.1.0
pkgrel=4
pkgdesc="Speaker and microphone support for HP EliteBook X G2i (TAS2783 + RT712)"
arch=('x86_64')
url="https://github.com/omacom-io/omarchy-pkgs"
license=('GPL-2.0-or-later')
# alsa-utils for amixer, which both the boot guard and the self-heal use.
#
# The dependency on linux-ptl is deliberate and is the point of this shape: the
# match-table entry and the TAS2783A component name live there, and without
# them everything else in this package is inert. install/hardware/all.sh runs
# intel/ptl-kernel.sh before the HP gate, so on a real install the kernel is
# already in place and this only records the requirement.
depends=('alsa-ucm-conf' 'alsa-utils' 'sof-firmware' 'linux-ptl')
install=hp-elitebook-x-g2i-audio.install
options=('!debug')

source=(
'50-wait-tas2783.conf'
'README.package.md'
'hp-elitebook-x-g2i-audio-recover'
'hp-elitebook-x-g2i-audio-recover.service'
'hp-elitebook-x-g2i-audio.install'
'tas2783.conf'
'wait-tas2783-controls'
)
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')

package() {
# The Speaker device. sof-soundwire/HiFi.conf includes
# "/sof-soundwire/${SpeakerCodecFile}.conf" unconditionally, and with the
# kernel reporting " spk:tas2783" that resolves here. New file, new path:
# alsa-ucm-conf owns nothing under this name, so nothing is overwritten.
install -Dm644 tas2783.conf "${pkgdir}/usr/share/alsa/ucm2/sof-soundwire/tas2783.conf"

# Boot race, layer one. WirePlumber can start before the amp kcontrols exist,
# which leaves the card on profile "off" with no sinks and no sources on a
# random subset of boots.
install -Dm755 wait-tas2783-controls "${pkgdir}/usr/bin/wait-tas2783-controls"
install -Dm644 50-wait-tas2783.conf \
"${pkgdir}/usr/lib/systemd/user/wireplumber.service.d/50-wait-tas2783.conf"

# Boot race, layer two. The wait narrows the window without closing it, and
# one of the two faults it misses looks completely healthy from ALSA.
install -Dm755 hp-elitebook-x-g2i-audio-recover \
"${pkgdir}/usr/bin/hp-elitebook-x-g2i-audio-recover"
install -Dm644 hp-elitebook-x-g2i-audio-recover.service \
"${pkgdir}/usr/lib/systemd/user/hp-elitebook-x-g2i-audio-recover.service"
# Enabled by shipping the symlink: a user unit cannot be enabled from a
# package scriptlet, which runs as root with no user session in reach.
install -dm755 "${pkgdir}/usr/lib/systemd/user/default.target.wants"
ln -s ../hp-elitebook-x-g2i-audio-recover.service \
"${pkgdir}/usr/lib/systemd/user/default.target.wants/hp-elitebook-x-g2i-audio-recover.service"

install -Dm644 README.package.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}
109 changes: 109 additions & 0 deletions pkgbuilds/hp-elitebook-x-g2i-audio/README.package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# HP EliteBook X G2i audio

Speakers and microphone for the HP EliteBook X G2i (Panther Lake): RT712 SDCA
codec plus four TAS2783 smart amps over SoundWire.

**Without this package and the kernel it depends on, the machine has no Speaker
device at all** — not quiet, absent. `pactl list cards` shows the card stuck on
profile `off` with no usable sink.

## Where the fix actually lives

Most of the fix is kernel-side, and every piece is an edit to a file that
already exists in the kernel. They ship as patches in `linux-ptl`, which this
machine installs anyway for its other Panther Lake backports:

| Patch | What it does |
|---|---|
| `0050-ASoC-Intel-soc-acpi-intel-ptl-add-HP-EliteBook-X-G2i` | Adds the match-table entry for the board's RT712 (link 3) + quad TAS2783A (link 2). Without it SOF falls back to a barebones machine driver and never instantiates the amps. The array lists the amps L,R,L,R by physical side, which is load-bearing for stereo. |
| `0051-ASoC-sdw_utils-set-a-component-name-for-the-TAS2783A` | Makes the card report `spk:tas2783` in `card->components`. Every other amp in `codec_info_list` already declares this; the TAS2783A did not, so UCM could not resolve a speaker configuration. Merged upstream as `79bec4638`; drop at the 7.2 rebase. |
| `0061-soundwire-stream-append-ports-when-a-second-DAI-joins` | Stops a second DAI joining a stream from overwriting the first DAI's port config. Not board-specific. |
| `0062-ASoC-Intel-sof_sdw-split-a-four-amp-TAS2783A-link` | Gives the amp dai_link two CPU pins, which selects the `sdca-2amp` topology. |
| `0063-ASoC-tas2783-take-one-stream-channel-per-mono-amplifier` | `.set_tdm_slot` on tas2783, driven from the `tas2783-N` prefix by `asoc_sdw_ti_spk_rtd_init()`. |

The last three are what make the machine stereo. Without them all four
amplifiers receive the same channel and the speakers play mono-left — a state
in which every check short of listening reports a healthy stereo card.

Neither belongs in DKMS. A DKMS module that rebuilds `snd-soc-acpi-intel-match`
has to carry a frozen copy of every Intel platform's match table, which silently
reverts upstream fixes for unrelated machines and stops compiling the first time
ASoC changes a struct — with no speakers and no warning as the failure mode.

## What this package installs

### 1. The Speaker device

`sof-soundwire/HiFi.conf` includes `/sof-soundwire/${SpeakerCodecFile}.conf`
with no whitelist. With the kernel reporting `spk:tas2783`, stock
`alsa-ucm-conf` resolves that to `tas2783` and picks up the file this package
ships. Nothing `alsa-ucm-conf` owns is modified or overwritten.

The device also pins the four per-amp digital trims to −12 dB. They default to
hardware maximum and are not reachable from PipeWire's volume control, which
sits on a separate downstream stage.

### 2. Firmware filename links

`tas2783-sdw.c` requests `8E86-2-{9,A,C,D}.bin`. `linux-firmware` ships the same
per-amp calibration blobs as `8E86-2-0x{9,A,C,D}.bin.zst`. A naming bug, not
missing firmware — so the package symlinks rather than copies, leaving
`linux-firmware` owning the real files. `post_remove` removes only symlinks it
created, never a real file.

### 3. Boot-race protection, two layers

The amps download firmware asynchronously at boot. If WirePlumber enumerates the
card first, the Speaker device is skipped and the whole HiFi profile comes up
unavailable — no sinks, no sources — on a random subset of boots.

`wait-tas2783-controls` runs as WirePlumber's `ExecStartPre` and waits, bounded
at 12 s, for the `tas2783-1 Speaker Volume` kcontrol. It returns at once when
the control is already there and never blocks login.

That narrows the window without closing it, so
`hp-elitebook-x-g2i-audio-recover.service` runs once per session afterwards and
checks two faults. The second one is the reason it exists: the card can sit on a
perfectly healthy `HiFi` profile while the PipeWire graph does not reach the
speakers, so a profile-only check reports success on a silent machine. It logs a
graph snapshot on every run, healthy or not, and only restarts the shell when it
actually repaired something.

## Upstream status

The interim, in the same spirit as `dell-xps-touchpad-haptics`. Each of these
retires a layer when it lands:

| Piece | Real home | Status |
|---|---|---|
| Match-table entry | Linux, `soc-acpi-intel-ptl-match.c` | not submitted |
| TAS2783A component name | Linux, `sound/soc/sdw_utils/soc_sdw_utils.c` | merged, `79bec4638` |
| Second-DAI port overwrite | Linux, `drivers/soundwire/stream.c` | not submitted; a general bug |
| Two-PDI amp split | Linux, `sof_sdw.c` + `soc_sdw_ti_amp.c` | not submitted |
| Firmware naming | `linux-firmware` / `tas2783-sdw.c` | partly merged, `e26bb459d` |
| Speaker device definition | `alsa-ucm-conf` | not submitted |

## Scope

This package carries **enablement only** — it makes the hardware work, and
contains no vendor-derived tuning data. The perceptual voicing (HP's factory
DTS:X Ultra curve) ships separately as an Omarchy audio tuning, matched on the
DMI SKU, and is an independent decision.

## Verifying

```bash
amixer -c 0 info | grep Components # expect " spk:tas2783"
pactl list cards | grep 'Active Profile' # expect HiFi
journalctl -k -b | grep -o 'sof-sdca-.amp' # expect sdca-2amp, NOT sdca-1amp
speaker-test -c 2 -t pink # left must come from the left
wpctl status # expect a Speaker sink and a Mic source
journalctl --user -u hp-elitebook-x-g2i-audio-recover -b
```

`sdca-1amp` means the two-PDI split did not take effect and the machine is
playing mono out of all four speakers. That is a kernel-patch problem, not a
tuning problem — do not go looking at levels.

A reboot is required after install: the kernel side of the fix cannot apply to
the running kernel.
Loading