From e046f82b19dc1f8d98cd2463b6a71f1556d7a399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Sat, 7 Nov 2026 22:00:55 +0100 Subject: [PATCH 1/2] device-panther: the speakers on the default calibration without speaker.cal Turns on omamobile-audio 0.5.16's OMAMOBILE_SPK_DEFAULT_CAL=1 for the Pixel 7, with a drop-in for omamobile-speaker-protection.service: some units have no speaker.cal in persist, and stock's HAL then runs the protection firmware on its tuning's default calibration. A phone that has speaker.cal still uses it, c9 and verify stay refused on the default, and /etc/omamobile/speaker.conf is read after the drop-in, so a line there still turns it off. Evidence: derekross/omarchy-mobile#427, comment of 2026-11-07 16:13 UTC (a start and a playback on 0.5.16, installed with pacman -U, on a Pixel 7 without speaker.cal). On the same phone with this drop-in and the line taken out of speaker.conf: the service gets the setting, start logs "using the protection firmware's default calibration", stage media at 737/10, /run/omamobile/speaker-protection-calibration reads "default calibration", a playback, and the watchdog stays active. omamobile-audio: the one debugfs call whose message is matched ("File not found by ext2_lookup") runs under LC_ALL=C, so a phone in another language can't trip it (#427's review). I used AI help (Claude) to work on this. --- .../omamobile-audio/bin/omamobile-speaker-protection | 6 ++++-- packages/omamobile-device-panther/README.md | 1 + packages/omamobile-device-panther/install | 2 ++ packages/omamobile-device-panther/test/all | 4 ++++ .../50-panther-default-cal.conf | 12 ++++++++++++ 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 packages/omamobile-device-panther/vendor/systemd/system/omamobile-speaker-protection.service.d/50-panther-default-cal.conf diff --git a/packages/omamobile-audio/bin/omamobile-speaker-protection b/packages/omamobile-audio/bin/omamobile-speaker-protection index 919fde6fc..377a25e2d 100755 --- a/packages/omamobile-audio/bin/omamobile-speaker-protection +++ b/packages/omamobile-audio/bin/omamobile-speaker-protection @@ -392,8 +392,10 @@ read_calibration() { command -v debugfs >/dev/null || { log "no debugfs (e2fsprogs)"; return 1; } mkdir -p "$RUN" # debugfs opens the device read-only unless given -w; it exits 0 whatever - # went wrong, so its messages are kept to tell a missing file apart - err=$( (umask 077 && debugfs -R "cat $CAL_PATH" "$dev" 2>&1 > "$cal") ) + # went wrong, so its messages are kept to tell a missing file apart, in + # English whatever the phone's language (LC_ALL=C), since that message is + # matched below + err=$( (umask 077 && LC_ALL=C debugfs -R "cat $CAL_PATH" "$dev" 2>&1 > "$cal") ) if (($(stat -c %s "$cal" 2>/dev/null || echo 0) < ${#AMPS[@]} * CAL_WORDS * 4)); then log "persist:$CAL_PATH is missing or short" # only debugfs's own "File not found": an empty file, or an empty read diff --git a/packages/omamobile-device-panther/README.md b/packages/omamobile-device-panther/README.md index 04ceb27dd..0f95d6458 100644 --- a/packages/omamobile-device-panther/README.md +++ b/packages/omamobile-device-panther/README.md @@ -5,6 +5,7 @@ Omarchy Mobile's first userspace package for the Google Pixel 7 (codename panthe | Path | Installs to | What it does | | --- | --- | --- | | `vendor/environment.d/40-omamobile-rotation.conf` | `/usr/lib/environment.d` | `OMAMOBILE_ROTATION_HOLD=1`: Hyprland (packages/hyprland, 0002) holds the last frame across a rotation and turns the new one in as Android does. Off in the shared build until it has run on the other phones | +| `vendor/systemd/system/omamobile-speaker-protection.service.d/50-panther-default-cal.conf` | `/usr/lib/systemd/system/omamobile-speaker-protection.service.d` | `OMAMOBILE_SPK_DEFAULT_CAL=1`: a Pixel 7 with no `speaker.cal` in persist runs its speakers on the protection firmware's default calibration, as stock does (omamobile-audio 0.5.16; c9 and `verify` stay refused). A phone with `speaker.cal` still uses it; a line in `/etc/omamobile/speaker.conf` overrides it | | `vendor/udev/rules.d/10-omamobile-storage.rules` | `/usr/lib/udev/rules.d` | Hides `sda` and every Android partition except `userdata` from desktop tools. Same rule as the Pixel 7 Pro. The initramfs stops its guard loop before `switch_root`; the kernel's read-only flags are what remain | | `vendor/udev/rules.d/20-omamobile-gpu-always-on.rules` | `/usr/lib/udev/rules.d` | Keeps the Mali-G710 powered while Panthor drives it: powering its domain back up needs a secure call our kernel doesn't make yet. Same rule as the Pixel 7 Pro | | `vendor/udev/rules.d/72-omamobile-feedbackd.rules` | `/usr/lib/udev/rules.d` | Lets feedbackd drive the CS40L26 haptics (`cs40l26_vibra`). Same rule as the Pixel 7 Pro; the driver needs the phone's own `cs40l26.wmfw` (`tools/extract-vendor-firmware -d panther`) | diff --git a/packages/omamobile-device-panther/install b/packages/omamobile-device-panther/install index 018c07674..fa535d334 100755 --- a/packages/omamobile-device-panther/install +++ b/packages/omamobile-device-panther/install @@ -36,6 +36,8 @@ install -Dm644 vendor/systemd/network/20-usb-gadget.network \ "$destination/usr/lib/systemd/network/20-usb-gadget.network" install -Dm644 vendor/environment.d/40-omamobile-rotation.conf \ "$destination/usr/lib/environment.d/40-omamobile-rotation.conf" +install -Dm644 vendor/systemd/system/omamobile-speaker-protection.service.d/50-panther-default-cal.conf \ + "$destination/usr/lib/systemd/system/omamobile-speaker-protection.service.d/50-panther-default-cal.conf" install -Dm644 vendor/systemd/logind.conf.d/10-omamobile-power-key.conf \ "$destination/usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf" install -Dm644 vendor/systemd/sleep.conf.d/10-omamobile.conf \ diff --git a/packages/omamobile-device-panther/test/all b/packages/omamobile-device-panther/test/all index 1ab8f8104..d4b6baeea 100755 --- a/packages/omamobile-device-panther/test/all +++ b/packages/omamobile-device-panther/test/all @@ -96,6 +96,7 @@ for f in usr/bin/reboot-to \ usr/lib/udev/rules.d/70-omamobile-dma-heap.rules \ usr/lib/systemd/network/20-usb-gadget.network \ usr/lib/environment.d/40-omamobile-rotation.conf \ + usr/lib/systemd/system/omamobile-speaker-protection.service.d/50-panther-default-cal.conf \ usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf \ usr/lib/systemd/sleep.conf.d/10-omamobile.conf \ usr/lib/modprobe.d/omamobile-display.conf \ @@ -129,6 +130,9 @@ grep -q 'Address=172.16.42.1/24' "$tmp/root/usr/lib/systemd/network/20-usb-gadge || fail "usb0 keeps the initramfs address" grep -qx 'OMAMOBILE_ROTATION_HOLD=1' "$tmp/root/usr/lib/environment.d/40-omamobile-rotation.conf" \ || fail "the Pixel 7 turns on Hyprland's rotation hold" +dropin="$tmp/root/usr/lib/systemd/system/omamobile-speaker-protection.service.d/50-panther-default-cal.conf" +grep -qx '\[Service\]' "$dropin" && grep -qx 'Environment=OMAMOBILE_SPK_DEFAULT_CAL=1' "$dropin" \ + || fail "the Pixel 7 starts its speakers on the default calibration when it has no speaker.cal" power="$tmp/root/usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf" grep -qx '\[Login\]' "$power" \ || fail "the power-key drop-in needs a [Login] header" diff --git a/packages/omamobile-device-panther/vendor/systemd/system/omamobile-speaker-protection.service.d/50-panther-default-cal.conf b/packages/omamobile-device-panther/vendor/systemd/system/omamobile-speaker-protection.service.d/50-panther-default-cal.conf new file mode 100644 index 000000000..8f1ce6854 --- /dev/null +++ b/packages/omamobile-device-panther/vendor/systemd/system/omamobile-speaker-protection.service.d/50-panther-default-cal.conf @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: MIT +# Pixel 7: some units have no speaker.cal in persist (no factory speaker +# calibration), and stock's HAL then runs the protection firmware on its +# tuning's default calibration. OMAMOBILE_SPK_DEFAULT_CAL=1 does the same +# (omamobile-audio 0.5.16; stage c9 and verify stay refused on it). A phone +# that has speaker.cal still uses it. /etc/omamobile/speaker.conf is read +# after this (EnvironmentFile overrides Environment), so a line there turns +# it off again. Evidence: derekross/omarchy-mobile#427 (comment of +# 2026-11-07 16:13 UTC): a start and a playback on 0.5.16 on a Pixel 7 +# without speaker.cal. +[Service] +Environment=OMAMOBILE_SPK_DEFAULT_CAL=1 From 7bb072b0992a8321fbbcc5d3b0e467e0450b4bc5 Mon Sep 17 00:00:00 2001 From: Derek Ross Date: Sat, 7 Nov 2026 22:31:50 -0500 Subject: [PATCH 2/2] omamobile-audio 0.5.17, device-panther 0.1.13: the default-calibration mode Both packages change in this pull request; 0.5.16 and 0.1.12 are main's. --- packages/omamobile-audio/version | 2 +- packages/omamobile-device-panther/version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/omamobile-audio/version b/packages/omamobile-audio/version index 3afb327e2..d8aef8135 100644 --- a/packages/omamobile-audio/version +++ b/packages/omamobile-audio/version @@ -1 +1 @@ -0.5.16 +0.5.17 diff --git a/packages/omamobile-device-panther/version b/packages/omamobile-device-panther/version index 0e24a92ff..7ac4e5e38 100644 --- a/packages/omamobile-device-panther/version +++ b/packages/omamobile-device-panther/version @@ -1 +1 @@ -0.1.12 +0.1.13