Repository navigation
husky sound: the AoC start with a hang marker, and the UCM2 and WirePlumber files - #453
Conversation
…th a hang marker omamobile-husky-aoc-start, its unit and a blacklist file for the AoC modules, after the Pixel 7 Pro's omamobile-aoc-start. A marker is written before any module loads and a start that hangs leaves it, so the next boot keeps the AoC off until --retry. Skipped by the unit's condition on a kernel without the AoC node. No speaker_protection option. Tests cover the marker, --retry and a kernel without the node. Signed-off-by: Lef <me@lefteros.com>
… rules under its own card name UCM2 and WirePlumber files keyed on google,husky-aoc-snd-card, after raven's: speaker (bottom amp) and earpiece (top amp) on EP6, S16 without mmap or idle suspend, levels at the 7 Pro's media stage or below. The kernel side names the card in the husky board file; until then the files do not match anything. Signed-off-by: Lef <me@lefteros.com>
…he top amp and right on the bottom The amps read different TDM slots (top 0 and 1, bottom 1 and 0), so with only the bottom amp on, only the right channel came out. The Speaker device now also sets the top amp at digital 657 and analog 6, both amps within the media stage; the Earpiece device stays top-amp only. Signed-off-by: Lef <me@lefteros.com>
|
One more thing in the audio commit: the 8 Pro's two amps read different TDM slots (top 0 and 1, bottom 1 and 0), so with only the bottom amp on I got just the right channel. The Speaker device now sets both amps, left on the top amp (the earpiece speaker, quieter) at 657/6 and right on the bottom at 737/10, both within the media stage. I listened to a left/right test tone and both channels play. Not run through the packaged install yet. |
657 / 6 was too quiet next to the bottom speaker. Still within the media stage (digital <= 737, analog <= 10). Signed-off-by: Lef <me@lefteros.com>
…WirePlumber source rule Mic id 0 records speech on the 8 Pro (peak -7.7 dB for speech, -60 dB room noise); ids 1 and 2 also power up but which hole they are is not settled, so only id 0 is used. Capture on EP1 capture (device 8), one channel, DC blocker on, soft gain 22 dB as the other phones' profiles. The test checks the Mic device and that EP1 playback is never bound. Signed-off-by: Lef <me@lefteros.com>
…y the card id The card id comes from the card name (googleaocsndcar for google,aoc-snd-card, googlehuskyaocs for google,husky-aoc-snd-card), so a start that waited for the old id reported a failure on the renamed card even though the card was up. /proc/asound/cards lists the driver name aoc-snd-card either way. Signed-off-by: Lef <me@lefteros.com>
|
My comment above gives the top amp as 657 / 6. That was the first version. The Speaker device sets the top amp to 737 / 8 now (43916f5) and the Earpiece is 657 / 0 on that amp alone. I rewrote the description to match the branch, and added what I ran after flashing the renamed-card kernel, with a screenshot of the card and the PipeWire sink and source. |
|
@Somnius thank you for both halves. The shape is right: the script follows the 7 Pro's start, the marker is written and synced before anything loads, the whole stack is blacklisted so nothing loads out of order, the UCM stays at the media stage with its own mic list, and EP1 playback is kept out by a test. I ran the UCM test that CI skips (CI has no One thing has to change before this can go in, because it's the failure the 7 Pro's AoC gotcha is about. The script treats "the card is listed" as the only sign the AoC is already running, and every failure removes the marker. So if the firmware loads and the AoC comes up, but the card doesn't appear within 20 s (the second amplifier is the fragile part, per your plan), the script fails and leaves nothing behind. A second start in the same boot then writes A few smaller things:
And three questions. Will the AoC node in your kernel PR be at |
The start treated "the card is listed" as the only sign the AoC was up and removed its marker on every failure, so a second start in the same boot (systemctl start, a hand run, --retry) after a card that never appeared could write aoc.bin to a running AoC. I ported both guards from the 7 Pro's omamobile-aoc-start: an "already online" check on the AoC's own services file (Services : [1-9]), and /run/omamobile/aoc-firmware-loaded, written just before the firmware write and never removed by a failure. Also from the review: device-husky depends on omamobile-audio, the husky UCM finds its PCMs by id (EP6 playback, EP1 capture) like the other AoC profiles, the stale "bottom amp" and "no microphones yet" comments are fixed, and the ceiling test compares numbers (738 and 739 now fail). Tested with the package tests (the new ones set the /run marker and an online services file and check nothing reaches firmware). Not tested on a phone. Versions untouched.
|
@derekross thanks for running the UCM test and for the clear read on the guard. I added both: the "already online" check on the AoC's own Your three questions:
|
|
@Somnius thank you, that's every point, and the guards are the 7 Pro's in the same order, with tests that check nothing reaches Two things before it goes in:
Thanks again. With that boot in, I'll merge. |
One conflict, packages/omamobile-audio/version: main is at 0.5.17 (0.5.16 and 0.5.17 landed there), this branch changes the package again, so it is 0.5.18. Signed-off-by: Lef <me@lefteros.com>
This branch's changes to the package (the hang marker start, the sound card found by its driver name, no aoc.bin write to an AoC that already runs) were 0.1.8 here too. Both ended up on the same number after the merge, so they are 0.1.9 now. Signed-off-by: Lef <me@lefteros.com>
|
@derekross #453 had a conflict with main too, so I merged main into it (normal merge, no force-push). Two things came out of it. The conflict itself was The other was quieter, and git didn't flag it: this branch also called Both are in: the merge 12b99f7 and the version commit 8f7ac07. I compared the PR's changes before and after the merge: the same, except the two version files (and some context lines in |
|
Thank you, @Somnius, and thanks for catching the device-husky number: git couldn't have What's left is the boot from my last comment: |
The AoC start looked for /proc/device-tree/trusty/status only. The 8 Pro's device tree has the node at soc@0/trusty, so the start would stop with 'Trusty is not enabled' before loading anything. Check both places (the OMAMOBILE_TRUSTY_STATUS override stays) and add a test for both layouts.
A kernel that carries the read-only AoC info driver (gs201_aoc_boot, matched by google,zuma-aoc) loads it at boot and it binds the AoC node before aoc_core. aoc_core then has no firmware file, and omamobile-husky-aoc-start stops with 'no firmware node'. Seen on the 8 Pro on the first boot of this package, once the local blacklist that listed it was moved aside. Blacklist it with the rest of the AoC stack and cover it in test/all.
|
@derekross I did the boot you asked for, and it needed one more fix first. I built the packages on the phone itself from aafe089: omamobile-audio 0.5.18-1 and omamobile-device-husky 0.1.9-1 (I rebuilt device-husky once after the first boot, with the blacklist commit below). They're local and unsigned, so the versions stay yours at merge. I masked my omamobile-sound.service, removed the hand-installed UCM and WirePlumber files (backed up), moved /etc/modprobe.d/omamobile-aoc-blacklist.conf aside, and installed both with pacman -U. The kernel is my test kernel 7.3.0-rc6-omamobile-push1-ga291900124c4. The userspace is the stable channel after today's update: Hyprland 0.57.0-3.2, aquamarine 0.16.0-1, Omarchy 4.0.6-1, shell 0.2.107. First boot: the unit failed safely with "no firmware node in /sys/bus/platform/devices/154b0000.aoc". Nothing was written to the firmware file. Cause: my test kernel carries gs201_aoc_boot, which matches google,zuma-aoc, so it autoloaded and bound the AoC node before aoc_core. My local blacklist had it, the package's doesn't, and moving mine aside is what let it load. The commit that adds While getting ready I also found that the start script looks for Trusty at /proc/device-tree/trusty/status, and on the 8 Pro the node is under soc@0 (/proc/device-tree/soc@0/trusty/status reads okay), so it would have stopped there too. aafe089 checks both places, with tests for the root layout, the soc@0 layout and no node at all. Second boot, cold, with both commits installed and no hand steps: The unit finished about a second after it started, no failed units, no cs35l41 mailbox errors, uptime 203 s. tools/phone-smoke on that boot (run later, at 898 s of uptime): every required check ok, 0 WARN and 0 errors in dmesg, hottest zone 54 °C. The tone test is not clean and I don't want to call it done. The first tries (0.05 and 0.15, nothing heard) were on the first boot, after my hand recovery (modprobe -r gs201_aoc_boot, bind the node to aoc_core, start the unit), and that boot logged seven On the clean second boot, with the amps at the media levels (digital 737, analog 8 top and 10 bottom), I played lr-test.wav (440 Hz left, 880 Hz right) at pw-play volumes 0.05, 0.15, 0.35, 0.7 and 1.0. I heard: nothing at 0.05, one side at 0.15, only the low tone at 0.35, nothing at 0.7, and the top earpiece only at 1.0. I recorded the mic (the default source, EP1 mono, 48 kHz, 8 to 14 s) while they played and measured the 440 and 880 Hz level in 0.5 s windows: the 880 Hz tone is in the recording but weak, about -68, -62 and -60 dBFS at 0.35, 0.7 and 1.0, and the 440 Hz isn't there. My voice on the same mic read about -32 dBFS rms, so the mic works. No amp or AoC errors during those plays, the AoC stayed at 94 services, SoC at most 59 °C. The mic and my ears disagree: the mic only caught the 880 Hz tone (right channel, bottom speaker) while by ear I only heard the low one, so what I can say is that the bottom speaker is producing something but very quiet, and I don't know why yet. In my stereo test on 2026-11-06 the right channel was the one I heard, so something changed. I haven't looked at it further, and I haven't compared the packaged path against my old hand-run path beyond that one HiFi.conf swap. One more thing: the package's blacklist also doesn't list snd_soc_cs35l41 and snd_soc_cs35l41_lib, which my local file had. They have no alias, so they can only load as dependencies of snd_soc_cs35l41_spi, which is blacklisted. |
|
@derekross a correction to my comment above on the tone test: the speaker problem I reported was my test file. lr-test.wav peaks at 0.025, which is -32 dBFS, so it was close to the hearing threshold at every volume I tried, and what I heard (or didn't) at those levels didn't show a fault. I measured the peak just now. I made new files with the same layout (440 Hz left for 2 s, then 880 Hz right for 2 s, short fades) peaking at -22 and -12 dBFS, and ran them the same way on two cold boots, with the amps still at digital 737 and analog 8 top, 10 bottom, pw-play at 1.0 and the speaker at 0.75, holding the phone the same way: once with the packaged unit and once with my old hand-run start. On both I heard both tones, clean, at -22 and at -12. The mic (mono, 48 kHz, same position) agreed: the 880 Hz level was -51.6 and -43.1 dBFS on the hand-run boot and -52.9 and -43.1 on the packaged boot, within about a dB. Right after each play I checked dmesg (nothing about the amps or mailbox), 94 services, and the hottest zone was 52 to 53 °C. So I don't see a difference between the packaged start and my old one in the sound, and the cold boot with the |
|
Thank you, @Somnius, this is exactly the run I was after, and it found two real bugs on the way. On your question: please keep One note for next time: after a failed start, a reboot is the safer way back than unloading and Two small things, neither blocks the merge: please paste the I'll merge this with the versions set by hand: omamobile-audio 0.5.18 is free, but #403 also has |
… it (0.5.18) 0.5.16 and 0.5.17 don't carry the 8 Pro's UCM2 and WirePlumber files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y held The scan's 'packages/*/test' pathspec matched no file, so no package test was ever scanned (91 scripts). With 'packages/*/test/*' it reads 164, and found two pipes into grep -q that landed since: device-husky's speaker_protection check (derekross#453) and omamobile-waydroid's render-node check (derekross#541). Both now read the whole pipe. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* bin/omamobile, tools, rootfs: no pipe into grep -q under pipefail The follow-up to #575, which fixed the test scripts: the same pattern in the laptop-side scripts that set pipefail. grep -q exits at the first match, a writer still writing gets SIGPIPE, and pipefail fails the pipeline (AGENTS.md section 4, Userspace). Each site now uses grep -c ... >/dev/null, which reads all its input, with the same pattern, flags and truth value. The one that loses in practice is tools/fingerprint-capture's wait loop: sed prints the whole log from the step's start, and with the end line early in a verbose kmsg stream the old check never saw it and the step ran to its timeout. The others have short writers (adb get-state, android-info.txt, 64 bytes of the TA, the keyring, the image's passwd) that fit the pipe buffer before grep exits; they change so that no script keeps the pattern. Two of them failed open: build-inside's user-account check and signing.sh's revoked-key check would have passed on a SIGPIPE. tests/grep-q-pipes now scans bin/, tools/ and rootfs/ as well, plus tools/lib (sourced by pipefail scripts), and skips comment lines. It leaves out five stage tools whose remaining hits are command strings that tools/phone-ssh runs in the phone's shell, which has no pipefail. Nothing under packages/ or initramfs/ changes. Tested: the race harness (old 0/200, new 200/200 per form; the fingerprint-capture loop old 0/100, new 100/100), tests/grep-q-pipes with an injected pipe (fails, names the line) and a commented one (passes), tools/pr-check, tests/all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * tests/grep-q-pipes: scan the package tests too, and the two pipes they held The scan's 'packages/*/test' pathspec matched no file, so no package test was ever scanned (91 scripts). With 'packages/*/test/*' it reads 164, and found two pipes into grep -q that landed since: device-husky's speaker_protection check (#453) and omamobile-waydroid's render-node check (#541). Both now read the whole pipe. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Derek Ross <derekross@gmail.com>
|
@derekross, here is the tools/phone-smoke report you asked for. It's from a later boot than the one in my first comment: the same kernel, with omamobile-audio 0.5.18-1 and omamobile-device-husky 0.1.9-1 installed, up for about 20 hours, run on the phone itself with --here (I piped the script in, which is why it says "unknown" for the tools version). The run at 898 s of uptime on the clean cold boot also had every required check ok, but I didn't keep its text, so this is the report I can paste. phone-smoke: unknownKernel
Packages: hyprland 0.57.0-3.2, libcamera 0.7.2-4.23, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.2-1, omamobile-audio 0.5.18-1, omamobile-device-husky 0.1.9-1, omamobile-firstboot 0.1.3-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-omarchy 0.1.37-1, omamobile-owl-widgets 0.1.2-1, omamobile-remote 0.1.1-1, omamobile-settings-local 0.2.2-1, omamobile-shell 0.2.107-1, omaphone 0.2.3-1, omarchy 4.0.6-1, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1 |
#453) and the slot B retry notes (#627) Records the Pixel 8 Pro's two boots of kernel #209's head with the overlay used (driver bound, nfc0, the pad clock at count 1 and a tag read; the plain boot with nothing enabled), with s2idle under the clkout driver still open. Adds stage Z8 to AOC-PLAN for the packaged start from #453: the first boot's "no firmware node", Trusty under soc@0, the clean cold boot, the A/B tone check and the CS35L41 mailbox lines, cause unknown. BATTERY-NOTES section 9 now says set_active b alone refills slot B's tries. Signed-off-by: Lef <me@lefteros.com>
… start with a hang marker, its UCM2 and WirePlumber files (derekross#453) The Pixel 8 Pro's AoC now starts from a packaged unit with a hang marker, as the 7 Pro's does, and its sound card comes up on its own at boot: device-husky ships the start script and unit (Trusty under soc@0, and gs201_aoc_boot blacklisted, which matches only google,gs201-aoc), and omamobile-audio ships the 8 Pro's UCM2 profile and WirePlumber rules. device-husky depends on omamobile-audio 0.5.18, the first with those files. Tested by the contributor on a Pixel 8 Pro: the old unit masked and the hand-copied files moved aside, the card came up by itself (94 services, EP6 and EP1 ids), and a sound check across two cold boots matches the old start within about 1 dB.
…rekross#587) * bin/omamobile, tools, rootfs: no pipe into grep -q under pipefail The follow-up to derekross#575, which fixed the test scripts: the same pattern in the laptop-side scripts that set pipefail. grep -q exits at the first match, a writer still writing gets SIGPIPE, and pipefail fails the pipeline (AGENTS.md section 4, Userspace). Each site now uses grep -c ... >/dev/null, which reads all its input, with the same pattern, flags and truth value. The one that loses in practice is tools/fingerprint-capture's wait loop: sed prints the whole log from the step's start, and with the end line early in a verbose kmsg stream the old check never saw it and the step ran to its timeout. The others have short writers (adb get-state, android-info.txt, 64 bytes of the TA, the keyring, the image's passwd) that fit the pipe buffer before grep exits; they change so that no script keeps the pattern. Two of them failed open: build-inside's user-account check and signing.sh's revoked-key check would have passed on a SIGPIPE. tests/grep-q-pipes now scans bin/, tools/ and rootfs/ as well, plus tools/lib (sourced by pipefail scripts), and skips comment lines. It leaves out five stage tools whose remaining hits are command strings that tools/phone-ssh runs in the phone's shell, which has no pipefail. Nothing under packages/ or initramfs/ changes. Tested: the race harness (old 0/200, new 200/200 per form; the fingerprint-capture loop old 0/100, new 100/100), tests/grep-q-pipes with an injected pipe (fails, names the line) and a commented one (passes), tools/pr-check, tests/all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * tests/grep-q-pipes: scan the package tests too, and the two pipes they held The scan's 'packages/*/test' pathspec matched no file, so no package test was ever scanned (91 scripts). With 'packages/*/test/*' it reads 164, and found two pipes into grep -q that landed since: device-husky's speaker_protection check (derekross#453) and omamobile-waydroid's render-node check (derekross#541). Both now read the whole pipe. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Derek Ross <derekross@gmail.com>
… AoC start (derekross#453) and the slot B retry notes (derekross#627) Records the Pixel 8 Pro's two boots of kernel derekross#209's head with the overlay used (driver bound, nfc0, the pad clock at count 1 and a tag read; the plain boot with nothing enabled), with s2idle under the clkout driver still open. Adds stage Z8 to AOC-PLAN for the packaged start from derekross#453: the first boot's "no firmware node", Trusty under soc@0, the clean cold boot, the A/B tone check and the CS35L41 mailbox lines, cause unknown. BATTERY-NOTES section 9 now says set_active b alone refills slot B's tries. Signed-off-by: Lef <me@lefteros.com>
…ted report is the later boot The sentence agreed on the pull request: the run at 898 s (every required check ok, 54 C, text not kept) and the report pasted on derekross#453 (a later boot, up about 20 hours, 51 C) are two runs, and each keeps its own numbers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The phone-smoke run at 898 s of the second packaged boot keeps its figures (every required check ok, hottest zone 54 C) and is marked as a run whose text was not kept; the report pasted on #453 is named as a later boot of the same kernel and packages (up about 20 hours, 51 C). The Z8 row no longer says the merged package versions are Derek's: they merged under the same numbers.
These are the two package parts from your list for the 8 Pro sound, in two commits.
omamobile-device-husky 0.1.8:
omamobile-husky-aoc-startwith its unit and a modprobe blacklist, after the 7 Pro's omamobile-aoc-start. It writes the hang marker and syncs it before it loads anything, and a start that never returns leaves it behind, so the next boot keeps the AoC off until--retry. The unit is skipped by its condition on a kernel without the AoC node (154b0000.aoc), so on today's published kernel it does nothing. The blacklist covers Trusty, GSA, the System MMU, mailbox, AoC core, the card driver and the amplifier driver, so only the start script loads them, in the order that works on my phone. No speaker_protection option, the analog cap stays at 10. aoc.bin comes from the phone's own vendor partition, nothing from it is in the package. Test covers the marker, --retry and a kernel without the node.omamobile-audio 0.5.16: UCM2 and WirePlumber files keyed on husky's own card name, google,husky-aoc-snd-card, the way raven's are: the Speaker device runs both amps, left on the top amp (the earpiece speaker, quieter) at 737 / 8 and right on the bottom amp at 737 / 10, the Earpiece device is the top amp alone at 657 / 0, and a Mic device on AoC mic id 0 (mono) with its WirePlumber source rule. Playback is on EP6, S16 without mmap or idle suspend, and the levels stay at the 7 Pro's media stage (digital <= 737, analog <= 10). The mic id 1 and 2 also record, but I don't know yet which hole each is, so only id 0 is in the profile. The levels are in the UCM profile because there is no speaker protection service on the 8 Pro. Test checks the profile parses, the card name matches the file name, EP1 is never bound, the Mic device reads hw:0,8 and the volumes stay under the media stage.
The card name
google,husky-aoc-snd-cardhas to be set asaoc-card-namein the husky board file, that's a kernel change I haven't sent yet (it'sgoogle,aoc-snd-cardon my test tree today), so until it lands the audio files don't match any card. The sysmmu module in the start script is still gs201_aoc_sysmmu, which also drives zuma's block on my tree, I'll change the name when the zuma file exists. Both package tests pass and tools/pr-check is clean. Update 2026-11-07: I flashed my test kernel with the card renamed (aoc-card-name = "google,husky-aoc-snd-card"in the board file of my tree, not upstream yet) and installed the audio files from this branch on the phone by hand, not through pacman. Kernel7.3.0-rc6-omamobile-push1-g50ef3c279021:/proc/asound/cardsshowsgooglehuskyaocs, and PipeWire lists Built-in Audio Speaker and Built-in Audio Microphone from the packaged rules:Two things I found on that first boot and fixed in the last commit and in the phone's own thermal unit: the start script waited for the old card id, and the card id comes from the card name, so
omamobile-husky-aoc-startnow looks for the driver nameaoc-snd-cardin/proc/asound/cards(20528f6). I heard a left and right test tone on the previous boot (before the rename), and I have not listened again after this flash. On this boot the microphone source recorded room noise only; I haven't checked speech through it. The numbers in my earlier comment (657 / 6 on the top amp) were the first version: the Speaker is 737 / 8 on the top amp now (43916f5).