Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 25 additions & 9 deletions device/cheetah/AOC-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ watchdog in earpiece mode) and a "Voice Call" UCM verb with an Earpiece
sink; the gated runbook is C9k. A first look on the phone found the speaker
filter following the default sink into the earpiece once Voice Call was
active; its output now never falls back (`node.dont-fallback`,
`node.linger`; C9k "The route").
`node.linger`; C9k "The route"). **2026-11-03 (omamobile-audio 0.5.13):**
earpiece mode works at every stage: with the boost converter on, as the
louder stage c9 leaves it, the earpiece at 657/6 was clean by ear on a VoLTE
call, so `on` no longer refuses it (C9k "Refusals").
**Earlier plan (2026-10-13, before C9j):** the speakers sounded thin; the ranked plan and three
runbooks follow C9d-6: C9g (omamobile-audio 0.4.0's speaker filter, by ear
and measured, risk low), C9d-7/C9d-8 (the V/I feedback stream stock runs
Expand Down Expand Up @@ -2308,7 +2311,10 @@ merges cleanly into int; `make modules dtbs` passes in `out-aoc`):
listener: "so much better and much louder and much more clear
without static". Reading: at the everyday level the converter sits in
its light-load regime, where it droops and distorts; stock's 817/17
never runs it there. Its registers (peak 2.5 A as stock's speaker
never runs it there. (2026-11-03: this finding was under music on the
speakers and doesn't apply to the voice path: the earpiece at 657/6
with the boost on was clean by ear on a VoLTE call at stage c9, as
stock's handset path runs it; C9k.) Its registers (peak 2.5 A as stock's speaker
path, coefficients, DCM, class-H 0x000b0405, WKFET 0x111, VCTRL1 0 as
the chip default, VCTRL2 class-H) match Google's driver, which also
never writes the boost target unless the DT gives one (stock's does
Expand Down Expand Up @@ -2412,13 +2418,23 @@ merges cleanly into int; `make modules dtbs` passes in `out-aoc`):
values. The status line is the speaker one again.
- **Refusals (nothing changes):** status not "ok:", a hang marker, no
card, a failed health check, configured levels that fail the limits
check, earpiece levels outside the ceilings, and a boost converter the
last start left on. The converter follows the earpiece's own analog
gain as it follows the speakers' (C9j): off at 10 and below, so off
for the earpiece; it is set when the amplifiers probe, so a start that
left it on (stage c9, `OMAMOBILE_SPK_BOOST=1`, a kernel without
`boost_en`) cannot serve the earpiece without a rebind, and earpiece
mode refuses unless `OMAMOBILE_SPK_BOOST=1` says the owner wants it on.
check, and earpiece levels outside the ceilings. The boost converter
stays as the last start left it: it is set when the amplifiers probe
(C9j: off when every speaker analog gain is 10 or below, on at stage
c9, under `OMAMOBILE_SPK_BOOST=1` or on a kernel without `boost_en`),
and the earpiece works either way. Until omamobile-audio 0.5.13 `on`
refused with the converter on (the earpiece's analog 6 is in C9j's
light-load range), which left every call at stage c9, the louder
default on verified firmware since 0.5.8, with no earpiece audio.
**2026-11-03: earpiece at 657/6 with the boost on, verified clean by
ear on a VoLTE call at stage c9** (`OMAMOBILE_SPK_BOOST=1`, earpiece
on through `omamobile-earpiece@on.service`: Top 657/6 through ASP, the
bottom muted; no static, no hum); **C9j's light-load finding was under
music on the speakers and doesn't apply to the voice path.** Stock's
own handset path runs the top amplifier with the boost on too
(`mixer_paths.xml` handset: analog 7). So 0.5.13 accepts the converter
on and records its state in the status line; `OMAMOBILE_SPK_BOOST`
stays the start's, for the speakers.
Both requests are idempotent (a repeat writes nothing and only checks
that the watchdog answers); a service start removes the mode and ends
in speaker mode, so a restart is the rollback.
Expand Down
2 changes: 1 addition & 1 deletion docs/DEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The status of each device, as verified on real hardware. Rows in the matrix have
| AoC | works | The audio and sensor DSP starts at boot (`omamobile-aoc.service`) through the GSA and Trusty, with 82 services; sensors and the sound card use it | [AOC-PLAN](../device/cheetah/AOC-PLAN.md) |
| Speakers/mics | works | Through the AoC sound card and PipeWire (`omamobile-audio`): "Built-in Audio Speaker" (both speakers in stereo, stock channel map) and "Built-in Audio Microphone", the volume keys and quick settings. The amplifiers run Google's speaker protection firmware with the phone's factory calibration, and a watchdog mutes them on any fault. Since C9j (2026-10-27, omamobile-audio 0.5.3-0.5.4) both speakers play clean and loud: the amplifiers' boost converter is off at the everyday level (stage `media`, digital 737, analog 10), which removed the static under music, and the speaker filter is flat with 6 dB of limiter drive, which brings streamed music up while the limiters hold peaks at -3 dBFS. Since omamobile-audio 0.5.8 (2026-10-31) the default is louder on a phone with verified protection: digital 817 on both, analog 14 bottom and 11 top, with the protection firmware measuring the coils as they play (3.5 minutes of loud music held both at 60-65 °C, under the 80 °C backstop). Stock's analog 17 on both still trips the coil temperature (C9d-3..6), so the maximum stays a little below stock's. The bottom speaker's static was a word-length bug, fixed in the kernel (C9d-6, 2026-10-13); stock's Waves processing on the AoC (`omamobile-speaker-tuning`, off by default) is research (T3b/T4) | [AOC-PLAN](../device/cheetah/AOC-PLAN.md) C7-C9, [AOC-TUNING-RESEARCH](../device/cheetah/AOC-TUNING-RESEARCH.md), [AUDIO-PLAN](../device/cheetah/AUDIO-PLAN.md) |
| Sensors | works | `omamobile-sensors`: an iio-sensor-proxy D-Bus service from the AoC's USF, started at boot. Accelerometer, light, proximity and compass at every boot (the sensor rails are power-cycled before the AoC starts); auto-rotate, switched from the rotation lock tile | [AOC-PLAN](../device/cheetah/AOC-PLAN.md) C6, [USF-PROTOCOL](../device/cheetah/USF-PROTOCOL.md) |
| Modem | works | Calls, texts and mobile data on Verizon's network since 2026-11-03 (a Tracfone SIM; VoLTE and SMS over IMS; registration 3 s after radio on; data as a fallback route behind Wi-Fi). What made it: the modem's carrier profile answered from the owner's image, stock's bearer order (IMS first on CID 2, the internet on CID 3, CID 1 left to the attach), and the earpiece through the protection service's earpiece mode. Today: the stack starts at boot through the opt-in `omamobile-modem-boot.target` (#386), the APNs and the carrier manifest are set by hand in `modem-sit.conf` until #373 makes them automatic, call audio needs the speakers at stage `media` (the boost converter off; the louder stage and the earpiece exclude each other for now), and suspend with the modem up is unqualified (the stack holds a sleep inhibitor). Phone and Messages use it through `omamobile-mmd`. Tested from the Pixel 7 Pro: an SMS each way, a VoLTE call answered on another phone, a call with the earpiece route to voicemail | [MODEM-PLAN](../device/cheetah/MODEM-PLAN.md), [IMS-SHANNON](../device/cheetah/IMS-SHANNON.md), [NOTES](../device/cheetah/NOTES.md#2026-11-03-ims-registered-and-an-sms-sent-on-a-verizon-network-sim-once-the-bearers-took-stocks-cids) |
| Modem | works | Calls, texts and mobile data on Verizon's network since 2026-11-03 (a Tracfone SIM; VoLTE and SMS over IMS; registration 3 s after radio on; data as a fallback route behind Wi-Fi). What made it: the modem's carrier profile answered from the owner's image, stock's bearer order (IMS first on CID 2, the internet on CID 3, CID 1 left to the attach), and the earpiece through the protection service's earpiece mode. Today: the stack starts at boot through the opt-in `omamobile-modem-boot.target` (#386), the APNs and the carrier manifest are set by hand in `modem-sit.conf` until #373 makes them automatic, the earpiece works at every speaker stage (since omamobile-audio 0.5.13 it takes the boost converter as the louder stage leaves it: clean by ear on a VoLTE call at stage `c9`, 2026-11-03), and suspend with the modem up is unqualified (the stack holds a sleep inhibitor). Phone and Messages use it through `omamobile-mmd`. Tested from the Pixel 7 Pro: an SMS each way, a VoLTE call answered on another phone, a call with the earpiece route to voicemail | [MODEM-PLAN](../device/cheetah/MODEM-PLAN.md), [IMS-SHANNON](../device/cheetah/IMS-SHANNON.md), [NOTES](../device/cheetah/NOTES.md#2026-11-03-ims-registered-and-an-sms-sent-on-a-verizon-network-sim-once-the-bearers-took-stocks-cids) |
| NFC | works | ST54J over I2C through st-nci with our plain-NCI link, loaded at boot; neard (patched for empty Type 4 tags) reads and writes tags, and tapping a tag with a web link opens it (`omamobile-nfc-open`): writing a tag and opening its link tested on the phone (N3). Card emulation and the secure element are not used | [RADIOS-CAMERA-PLAN](../device/cheetah/RADIOS-CAMERA-PLAN.md) §3 |
| Cameras | works (telephoto fixed-focus) | Ultrawide (Sony IMX386, D-PHY link 2): works end to end through our CSIS/WDMA driver and libcamera's software ISP (CAM5), basic quality (no Google ISP or tuning); a libcamera build with autofocus and low-light patches is installed, not yet evaluated (CAM5.3). Front (Samsung S5K3J1, D-PHY link 0): real images, raw and through libcamera (`cam -c1`, 30 fps, no WDMA errors; F.5-F.7, 2026-10-13). Main (Samsung S5KGN1, C-PHY link 1): 2016x1136 at 30 fps through libcamera with no WDMA errors. Telephoto (S5KGM5, C-PHY): 26 fps through libcamera, colour bars correct; its lens (SEM1215) isn't driven yet, so it stays at its resting focus: distant subjects are sharp (outdoors, 2026-10-26), close ones soft, and tap to focus does nothing. The CSIS write DMA (not the link) loses lines that arrive faster than about 400 MB/s within a line, so the sensors lengthen their lines to stay under `samsung,max-line-throughput` (360 in cheetah's DT for the main, telephoto and front cameras; the front's full 3840x2736 mode runs at 26 fps). The ultrawide (imx386) follows the same rule, so its full 4032x3016 mode streams (23 fps; one run in several still showed WDMA errors), and with 384 MiB of CMA `cam` without options runs every camera at full size (main 12 MP at 9.4 fps). The telephoto's lens (SEM1215) answers on a 950 kHz bus but holds the bus when driven longer, so the telephoto runs at fixed focus. Sensor and DC-PHY settings come from the user's own camera software (`tools/extract-camera-data`), never shipped. Since omamobile-device-cheetah 0.1.30 the camera modules load after boot (`omamobile-camera.timer`), the DMA-BUF heaps are open to the session (libcamera's software ISP), WirePlumber names them Main, Ultrawide, Telephoto and Front camera (0.1.31). The default camera app is omacam ("Camera", omamobile-apps 0.2.0; [CAMERA-APP-PLAN](CAMERA-APP-PLAN.md)): libcamera directly, zoom across the three back lenses, full-resolution photos. GNOME Snapshot is optional, named "Snapshot", for video until omacam records it; browsers and video calls use the cameras through PipeWire (`pipewire-libcamera`). Picture quality: libcamera 0.7.2-4.21 adds chroma noise reduction and defective pixel correction, and omacam 0.3.3 has Night mode and an HDR chip, bursts of raw frames aligned, merged and finished on the phone (Night: 12 frames in about 4.6 s, Q5.3 on 2026-10-21); single shots are still well below stock's | [CAMERA-PLAN](../device/cheetah/CAMERA-PLAN.md), [CAMERA-QUALITY-PLAN](CAMERA-QUALITY-PLAN.md) |
| Suspend | WIP | s2idle works when asked for (`systemctl suspend`, `rtcwake`): `pm_test` dry runs, wakes on a volume key and on the RTC alarm, 20 of 20 unattended cycles (S3b, S4); UFS powers down in suspend by default (`spm_lvl` 5). Wi-Fi stays connected across sleep: 31 of 31 freezes with the D3 handshake (S5b-3, S5c, 2026-10-19), and the sleep hook keeps it loaded. The AoC and sensors work across sleep, and a running sensor stream doesn't wake the phone (S6, 2026-10-19). Screen off, with Wi-Fi up, it draws 434 mA awake and 312 mA in s2idle: about 16 h of standby on the 4986 mAh battery (S7, 2026-10-19), against 32-50 mA in stock's deep sleep. Auto-sleep is in the packages and off by default ([#64](https://github.com/derekross/omarchy-mobile/pull/64), omamobile-shell 0.2.29): with the `omamobile-sleep` toggle on, the phone sleeps 30 s after the screen goes off behind a secure lock and at once on Power, and Power wakes it to the PIN pad; 13 cycles in one boot with 0 failures (P0-P5, 2026-10-26). P5 stopped that day on a speaker trip that turned out not to come from sleep ([NOTES](../device/cheetah/NOTES.md#2026-10-27-the-muted-speakers-were-the-open-loop-coil-estimate-not-sleep-the-static-was-the-boost-converter-the-earpiece-is-the-top-speaker)); resumed on 2026-11-01, it passed with 11 suspends and 0 failures, the speakers fine across each sleep. After its power-key test Hyprland ran neither power-key bind until `hyprctl reload`; the on-screen keyboard's virtual keyboard was reaching the hardware-key binds, which now ignore it ([#312](https://github.com/derekross/omarchy-mobile/pull/312), omamobile-shell 0.2.75; re-tested on the phone 2026-11-01, [SUSPEND-PLAN](../device/cheetah/SUSPEND-PLAN.md) P5 test h). Still open: NetworkManager drops Wi-Fi for each sleep and reconnects about 5 s after the wake. The toggle stays off by default until a day of use (P6) and a power-off from Linux (P7) have run. Wi-Fi traffic and a USB plug can't wake it, a few RTC cycles wake early on a PMIC interrupt not yet identified, and the modem has never run across a suspend. Deep sleep (SYS_SLEEP), which stock's standby numbers need, is research and not started | [SUSPEND-PLAN](../device/cheetah/SUSPEND-PLAN.md) |
Expand Down
2 changes: 1 addition & 1 deletion packages/omamobile-audio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protection firmware and the phone's factory calibration, as stock Android does.
| `udev.rules` | holds the amplifiers awake from the moment the driver binds |
| `verified-firmware` (`/usr/share/omamobile-audio/`, 0.5.10) | the speaker protection firmware verified on the reference phone: one `SYSTEM DIGEST NOTE` line per firmware, the digest over Google's protection firmware and both tunings that a C9a stamp records (`omamobile-speaker-protection digest` prints the installed one as such a line). Stage auto runs c9 on a phone with `speaker_protection=1` when **this phone's own stamp** matches the firmware, or when the firmware's digest is **in this list**, so a fresh install (the stamp lives on `userdata` and is lost on every install) gets the louder levels too; media otherwise. The start logs which ("stage c9 chosen by the verified firmware list" or "by this phone's stamp"), and so does `status`. A listed digest means the same files byte for byte, not the same phone: on c9 from the list the watchdog checks this phone at its first speaker stream after each start, about 3 s in (CSPL_ENABLE 1 on both, the model on the resistance written from this phone's persist, the heartbeat moving, both coil estimates within 10-65 C); c9 from the list is capped at the levels verified with music (817, analog top 11, bottom 14: a configured level above is lowered, with a log line, and the watchdog holds the same ceilings; 17 needs this phone's own stamp). A failure mutes, records the firmware in `/var/lib/omamobile/speaker-protection-c9-refused` (a coil estimate out of the band alone, or a `/var/lib` that can't be written: in `/run/omamobile/` for this boot only; if neither can be written it stays muted, without a restart) and restarts the service, which then picks media. The list's path and the check's band are fixed outside the tests. The phone's own stamp (an attended `verify`) wins over a refusal. It lists the reference phone's firmware from factory image cp2a.260705.006 (C9a verify 2026-11-02; AOC-PLAN, "C9 for every phone with verified firmware") |
| `/etc/omamobile/speaker.conf` | stage (media, the default at 737 / 10; c8 bring-up; c9 stock under verified protection), the amplifiers' levels (per amplifier too), the media delta switch (on by default when installed), DRE (on by default), the boost converter (since 0.5.3 off at analog 10 and below when the kernel's cs35l41 module has `boost_en`: in its light-load regime it droops and distorts both speakers and takes 8-11 dB off the output, AOC-PLAN C9j; `OMAMOBILE_SPK_BOOST=1|0` forces it, module-wide) |
| `omamobile-speaker-protection earpiece on\|off\|status`, `omamobile-earpiece@on\|off.service`, polkit `50-omamobile-earpiece.rules` (0.5.5) | **earpiece mode** (AOC-PLAN C9k), stock's handset path: `on` mutes both amplifiers, lowers the top one's analog gain to 6, waits until the watchdog enforces earpiece mode, bypasses the top DSP (PCM Source ASP), sets its DRE and unmutes the top alone at 657 (`OMAMOBILE_SPK_EARPIECE_DIGITAL`, at most 737 and the stage's ceiling; 20 dB under stock's handset gain); the bottom stays at Digital PCM Volume 0. `off` mutes, puts the top back through its DSP, waits for speaker mode, restores every control to the stage's value, health-checks, unmutes both and reads every control back. Both refuse unless the protection runs (status ok, health, a hang marker absent, the watchdog answering) and refuse while the last start left the boost converter on (earpiece analog 6 wants it off, C9j); a failure half-way mutes both; both are idempotent; a service restart always ends in speaker mode. In earpiece mode the watchdog checks the top within 737/6 (ASP or DSP), the bottom muted and both runtime-held, and no DSP rule, since neither DSP is audible. The unit is the request path for PipeWire (the polkit rule lets the active local user start those two instances only) |
| `omamobile-speaker-protection earpiece on\|off\|status`, `omamobile-earpiece@on\|off.service`, polkit `50-omamobile-earpiece.rules` (0.5.5) | **earpiece mode** (AOC-PLAN C9k), stock's handset path: `on` mutes both amplifiers, lowers the top one's analog gain to 6, waits until the watchdog enforces earpiece mode, bypasses the top DSP (PCM Source ASP), sets its DRE and unmutes the top alone at 657 (`OMAMOBILE_SPK_EARPIECE_DIGITAL`, at most 737 and the stage's ceiling; 20 dB under stock's handset gain); the bottom stays at Digital PCM Volume 0. `off` mutes, puts the top back through its DSP, waits for speaker mode, restores every control to the stage's value, health-checks, unmutes both and reads every control back. Both refuse unless the protection runs (status ok, health, a hang marker absent, the watchdog answering); the boost converter stays as the last start left it (on at stage c9, off at media), since the earpiece works either way, as stock's handset path does with it on (clean by ear on a VoLTE call at stage c9, 2026-11-03; until 0.5.13 `on` refused with the converter on, so every call at the louder stage was silent); a failure half-way mutes both; both are idempotent; a service restart always ends in speaker mode. In earpiece mode the watchdog checks the top within 737/6 (ASP or DSP), the bottom muted and both runtime-held, and no DSP rule, since neither DSP is audible. The unit is the request path for PipeWire (the polkit rule lets the active local user start those two instances only) |
| UCM2 `Google/cheetah/VoiceCall.conf` (0.5.5) | the "Voice Call" verb, ranked below HiFi so never the default: an `Earpiece` device on the speaker's PCM (EP6) whose enable sequence starts `omamobile-earpiece@on` and whose disable sequence starts `omamobile-earpiece@off`. Its sink ("Built-in Audio Earpiece") is not the speaker filter's target, and the filter never falls back to it (below), so the filter's limiter drive never reaches the earpiece. Only the left channel (the top amplifier) is heard. The call's own audio stays between the AoC and the modem; speakerphone, headset and call mic are later T4 work |
| `modprobe.d/omamobile-audio.conf` | blacklists `snd_soc_cs35l41_spi`, so the card only comes up through the service |
| UCM2 `conf.d/aoc-snd-card`, `Google/cheetah/HiFi.conf` | HiFi verb: Speaker = AoC EP6 to TDM 0 (the amplifiers), Mic = AoC EP1 from the built-in microphones; PCMs found by id. Touches no amplifier control, so PipeWire uses software volume |
Expand Down
Loading