Skip to content

omamobile-device-tegu 0.2.2: the AoC starts at boot from the device tree - #234

Closed
W4HO-ham wants to merge 2 commits into
derekross:mainfrom
W4HO-ham:device-tegu-aoc-boot
Closed

W4HO-ham wants to merge 2 commits into
derekross:mainfrom
W4HO-ham:device-tegu-aoc-boot

Conversation

@W4HO-ham

Copy link
Copy Markdown
Contributor

Stacked on #230 (0.2.1, the charge limit); the second commit is this one.

With linux-omarchy-mobile#162 the 9a's device tree enables Trusty, the GSA and the AoC. So the AoC start now:

  • runs at every boot through a vendor wants link, and the unit's ConditionPathExists=/sys/bus/platform/devices/154b0000.aoc skips it on a device tree without the node;
  • answers to omamobile-aoc.service through an alias link. The sensor proxy (Requires=/After=), the fingerprint service and speaker protection all name that unit, so they now order after the 9a's AoC as they do on the 7 Pro;
  • blacklists Trusty and snd_soc_tas2781_i2c too, so only the script loads them, in order: the amplifiers load after the AoC is online, so the card finds its back end.

The tests now check the wants link, the alias, the condition and the longer blacklist, and test/aoc-start checks the new last step. The README section "The AoC start at boot" replaces "ships disabled".

Tested on the palmtop today with #162's kernel (7.3.0-rc6-omamobile-push1-g922812d75006) and this package installed. At boot, with nothing run by hand:

  • omamobile-tegu-aoc.service: active, success, Names omamobile-tegu-aoc.service omamobile-aoc.service.
  • The start logged "up: Services : 93", and the card google,tegu-aoc-snd-card registered.
  • omamobile-sensor-proxy.service: active, with accel, light, proximity, compass and gyro.

Two things on the palmtop itself, not in the package. The bring-up image had /etc/systemd/system/omamobile-aoc.service and omamobile-sensor-proxy.service masked to /dev/null, and I removed those two masks. And while the palmtop still boots its integration kernel, where the bring-up script owns the AoC, a local drop-in with ConditionKernelVersion=!…-dirty keeps this unit off there. A fresh install has neither.

Speaker playback isn't in this run; the next one plays a quiet tone through the UCM profile. test/all and tools/pr-check pass.

… charger driver

The merged max77779-charger driver has charge inhibit and no end threshold, so the charge limit wrote nothing. The script now switches charge_behaviour between inhibit-charge and auto by the battery's capacity, from the limit to 5 below, and udev runs it on every battery change.
With the kernel branch tegu-dt-aoc the device tree enables Trusty, the GSA and the AoC, so the AoC start gets its wants link and answers to omamobile-aoc.service, which the sensor proxy and the fingerprint service name. Trusty and the TAS2572 amplifier driver are blacklisted too, and the amplifiers load once the AoC is online.
@W4HO-ham

W4HO-ham commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Speaker confirmed by ear on this package's boot-time AoC start with linux-omarchy-mobile#162's kernel: a 5 s tone through the Built-in Audio Speaker sink was heard by the owner. The microphone recorded real input too (RMS -32.4 dBFS over 4 s, posted on #162). So speakers, microphone and sensors all come up at boot with nothing by hand.

@derekross

Copy link
Copy Markdown
Owner

Merged as part of #235's squash (0.2.1 through 0.2.3 together). Thanks!

robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…, the AoC and NFC at boot, and the 9a's own setup-system (derekross#235)

Merges the stack derekross#230, derekross#234 and derekross#235:

- 0.2.1 (derekross#230): the charge limit works with the published max77779 charger driver, which offers inhibit rather than an end threshold; the script handles both and always falls back to auto on a missing or bad file. While the phone sleeps nothing runs the script (the battery's change events come from a freezable 30 s poll), so a phone asleep on the charger below the limit charges past it until it wakes.
- 0.2.2 (derekross#234): the AoC starts at boot from the device tree, hang-safe, gated on the AoC node, under the omamobile-aoc.service alias so the sensor proxy orders after it; the amplifiers load after the AoC is online. Speaker protection stays cheetah-only.
- 0.2.3 (derekross#235): NFC at boot, gated on a node that names its clock; the existing sleep hook stops polling before s2idle. The 9a gets its own omamobile-setup-system.

Closes derekross#230, closes derekross#234.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants