Repository navigation
omamobile-modem-sit 0.3.19, 0.3.20: the AoC's tuning acknowledgement, and its DSP in telephony mode - #378
omamobile-modem-sit 0.3.19, 0.3.20: the AoC's tuning acknowledgement, and its DSP in telephony mode#378W4HO-ham wants to merge 34 commits into
Conversation
|
Added 0.3.20: with |
5581ae7 to
1c9ba18
Compare
Select the TAS2572 route only for google,tegu-aoc-snd-card. Save the controls, verify sink mute, configure the stock microphone/TDM routes, and start EP4 capture and EP5 playback as mono S16_LE at 8 kHz with 80-frame periods and two periods. Applying ALSA hardware parameters prepares each PCM once; do not prepare the modem stream twice. After PCM startup resets the amplifier profile, set both TAS digital gains to index 180 (-20 dB) and verify read-back before unmuting. A gain refusal unwinds the route and leaves call signalling available. Close PCMs before restoring controls, keep mute on cleanup failure, and retain the cheetah CS35L41 route and the default card=none configuration. Add fake-ALSA fault tests and the voice-window audit. The existing SRAM reservation is retained; no CPU mapping or phone operation is added.
Outgoing and incoming speakerphone calls with audio both ways, first on the daily kernel and then on in-tree drivers from the open kernel PRs, where data and a text ran too. The Modem cell says so, and what's left: echo cancellation, an earpiece, the modem's start at boot and the kernel PRs' merge.
Trace the existing app, session agent, ModemManager-compatible bridge and sitd path. Record the tegu installation and unit prerequisites still missing on main, and an attended bridge-only test that preserves the running modem stack. Document the passing offline bridge and apps package suites, activation and audio limits, and the eventual board-specific image integration.
Keep sitd's canonical name while moving the modem dependency into device-owned policy drop-ins. Tegu checks an already running modem and CP ONLINE; cheetah and raven retain their existing starter relationship. Require the device policy capability during RIL upgrades. Add an opt-in telephony package with a bridge policy and attended helper. It checks live sitd readiness, refuses legacy unit shadows and competing managers, and starts only mmd and the graphical user's agent. The service recovery check permits live calls and registration loss; no helper enables or recovers the modem. Remove mmd's service-level conflict so a bridge start cannot stop another modem manager. Package exclusion and D-Bus name ownership remain. Retain the previously developed SIM, safe-release and audio changes in this stack. Validate the helper, dependency policies and composed units offline; run all seven affected/dependency package suites and build the new architecture-independent package without installing dependencies.
…start the bridge, and a plan that reads as one Record the palmtop run of Phone and Messages (kernel, versions, what passed, and that opening an app didn't start the agent), say which start fits which case, cite derekross#363 instead of a branch, and drop the lines that read like a task report.
With the modem, the phone service and the bridge started at boot (this PR) the 9a's calls, texts and data need nothing by hand, and with gnssd started alongside, a session through Omarchy's Location switch had 133 of 135 GGA sentences fixed after a reboot (2026-11-03, first fix 48 s, 18 satellites). Both cells say works, with what's still open: the speakerphone echo, no earpiece route yet, and the in-tree kernel drivers in review.
Two reboots on the palmtop with the boot unit enabled, the NV check, the UFS count after a shutdown with the CP up and a phone-smoke report, as Derek asked before the README tells anyone to enable it.
…s again The status words added in derekross#360 left each item's old sentence hanging after them. Each item now says what derekross#372 does and what is still the target, in whole sentences.
The profile unit's ExecStopPost removed the latch only when SERVICE_RESULT was success, and at a shutdown it never is: the CP's power-off in ExecStop ends rfsd or cbd before systemd's SIGINT, so the profile's supervisor exits 1. On the palmtop on 2026-11-03 a systemctl reboot with the modem up left the latch, and the next boot refused the modem. ExecStopPost now runs omamobile-tegu-modem-up --stopped, which removes this boot's latch once the start reached ONLINE, whatever the result, as omamobile-modem-start --stopped does on the Pixel 7 Pro. A hang or a reset never reaches it, so those still refuse the next boot.
…SS testing until the default, the latch's stop as it is now DEVICES reserves works for on by default, and the boot unit is opt-in, so Modem and GNSS read testing until the follow-up that turns it on after kernel derekross#187. The latch is described as removed by the profile unit's stop at shutdown, the README gives the unit's --phone --gnss and says the reboot-to path is under test, and section 2.7 records the reboot that left the latch and the re-run on the fixed script.
…k and the reboot-to path passed (2.7) The radio backup check after the day's reboots read every NV partition the same, and a reboot-to with the CP ONLINE cleared its latch and brought the modem back on its own at the next boot.
…audio Stage the owner-provided APMg3 uplink and downlink protobufs through the AoC output tuning services, confirm bounded acknowledgements, and refuse another tuning attempt after an unknown outcome. Set the speaker echo reference before capture and disable AEC during confirmed cleanup. Add a conservative top-speaker route with bottom attenuation and gain readback. Keep the complete amplifier profile 0: the examined native voice-handset case is a power-state delta, and the AoC sink bitmap controls are read-only. Document the distinction from stock voice/EM control and the attended qualification gate. Extract six speaker/handset tuning files from the owner image, with synthetic extraction and service-record tests. Defaults leave tuning and call audio disabled; no phone trial is claimed.
…S back Restarting omamobile-sitd failed at once on what the earlier run left in /run/omamobile-sit, though the modem had dropped its bearers when that sitd stopped. Now, after registration and before any setup, sitd clears the earlier start's bearer records, the IMS registration and the record of the modem's own bearers, but only when the modem lists no bearer at all, and only records whose setup had a confirmed outcome. An unanswered reservation stays, so activate() refuses and the start waits for a reboot. If the IMS registration was cleared, sitd sends stock's DelPdnInfo for the old PDN first, so the modem's IMS stack registers again. The LTE-only check also refuses a damaged saved original. On the palmtop a restart got data and signal back (2026-11-02); IMS with the withdrawal hasn't run yet. The sitd unit's comment, MODEM-CLIENT and MODEM-PLAN now describe a second start-up after a clean stop; after a failed one, reboot.
… start's bearers A start-up no longer cycles a radio that is already on, so after a sitd restart the modem still lists the earlier start's internet and IMS bearers, the stale-record cleanup rightly leaves them, and activate() refused (the palmtop, 2026-11-03). When the modem lists exactly the bearers our confirmed records own, start-up now releases them, IMS first (DelPdnInfo, then its bearer), and sets up again. A bearer we don't own, a missing one or an unconfirmed record still leave it to activate() to refuse, and a release that fails stops the start for an attended reboot.
… bring-up tests The bring-up tests added with derekross#373 run start() with a client that answers SIM requests only, so the restart cleanup's bearer list failed to parse. They now stub clear_stale and release_owned, as the other bring-up tests do.
…s it really comes The first call with echo cancellation on the palmtop went silent. The AoC accepted the tuning upload with status 0, but its reply rewrites the second header byte (0x01 sent, 0x3e back), and the check compared the first six bytes, so a successful upload was taken as an unknown outcome and the call audio stayed muted. The check now compares the first byte, the size and the command ID, and the fake AoC in the tests rewrites that byte as the real one does. A refused call now also logs why.
…mode for echo cancellation With the tuning uploaded and confirmed (0.3.19), the far end still heard its own voice: the AoC's output DSP stayed in Ambient during calls, and the uploaded tuning is for its APMg3 telephony mode. With tegu_aec on, the call route now sets Audio DSP Mode to Telephony_APMG3 before the upload and puts the old mode back after the tuning is turned off. On the palmtop (a speakerphone call to an iPhone, 2026-11-02) this changed what the far end heard: no echo for the first few seconds and a new low hiss, then the echo came back with the hiss still there. So the mode takes effect, but the cancellation doesn't hold yet; the echo reference or the order of the setup is the next thing to check.
…t from our own kernel header Record the three calls with the kernel release and what the far end heard, describe the command from struct CMD_AUDIO_OUTPUT_SET_PARAMETER_BULK in our GPL header on omamobile rather than from vendor library names, say the reply's counter byte isn't compared and why, and drop the link to a kernel commit that isn't on linux-omarchy-mobile.
The FT AEC reference changes nothing for the built-in microphone, the modem mixer's ASP stays off during our calls, stock applies wideband tuning to narrowband voice, and stock runs a speaker compensation tuner we don't.
With the tuning confirmed and the DSP in its telephony mode, the echo still came back after a few seconds, and AoC Modem Mixer ASP Mode (block 19, where the tuning goes) read ASP_OFF during the calls. With tegu_aec on, the route now sets it to ASP_ON before the upload and restores it after the call. Not yet tried on a call.
With the tuning sent before the streams, the far end heard no echo for 2-3 s and then the echo again, with ASP on and at stock's microphone gain alike (2026-11-03). The AoC starts its voice path at the playback start ("Start voice call" in the kernel log, after our upload), which may set it up afresh. The tuning now goes up after both streams have started, while the call sink is still muted; a failed upload closes the streams and keeps the sink muted as before. Not yet tried on a call.
8bec0fc to
01c1fb8
Compare
|
@W4HO-ham, a short status on this one, since it's a draft. I went through its What's left is the same as on #376: a rebase onto |
The commits under this pull request's own are on main now in their merged form (derekross#356 to derekross#372, derekross#590), so the result is today's main plus this pull request's own commits, replayed on it; only version files conflicted, and they keep main's numbers.
# Conflicts: # tests/all
…, and the echo still back after 2 s The last two changes of this stack had no result in the plan. With ASP on (11-03) and with the tuning sent after the voice streams start (11-11, two calls from this head) the far end hears no echo for about 2 s and its own voice for the rest, as before them. The plan records both and says what to read during the next call.
…test The commit before this one took a merge of main with the conflict in this file still marked; this resolves it.
…nt uplink Read through four calls on 2026-11-12, the AoC's own log and the call's mixer controls show nothing changing a few seconds in: the controls are set once, both tuning uploads arrive and are answered, and the APMg3 processor is enabled. What the log does show is the uplink's samples staying near zero for the first 5 s after each answer, with the owner talking and, in one call, with the laptop counting aloud beside the palmtop; after that the uplink carries both. So the seconds without echo in the earlier results were not cancellation. A call to a talking clock shows the echo with no listener: quiet uplink during the ticks, loud samples during the announcements. bringup/call-audio-watch.py is the read-only watcher (palmtop) and call-levels.py reads its output (laptop).
|
A correction to results 3 to 5, from calls this morning with the AoC's own log read through each one (c3cfc63, results 6 to 8 in CALL-AUDIO-TUNING). The first seconds without echo aren't cancellation. After each answer the uplink is silent for about 5 s, the palmtop's own side included, and then it carries everything, the echo with it:
What the log rules out: the controls are set once at the start and stay ( So the processor runs with stock's tuning and the echo still passes. I don't know why yet, nor what the 5 s are. One useful thing came out of it: a call to a talking clock shows the echo with nobody listening (quiet uplink during the ticks, samples above 20,000 during the announcements), so the next tries don't need a far end. The list is in "Next for the echo": the same call with the tuning off for a baseline, stock's in-call capture for a real level, and whether the reference our route gives the processor is what the speaker tuning's layout expects (two reference channels, three capture channels).
|
…12, and the watcher that read them The results as derekross#378 had them, brought here with the acknowledgement fix so the two land together: the echo after the first seconds in every call, and what the AoC's own log showed on 11-12, that those first seconds are a silent uplink and not cancellation. bringup/call-audio-watch.py is the read-only watcher and call-levels.py reads its output.
Stacked on #376 and #374; the rest of the stack (#364, #367, #371, #372) is on main now, and the branch has today's main merged in. This PR's own changes are six commits:
omamobile-modem-sit 0.3.19: accept the AoC's tuning acknowledgement as it really comesomamobile-modem-sit 0.3.20: put the AoC's DSP in its APMg3 telephony mode for echo cancellationdevice/tegu CALL-AUDIO-TUNING: the 2026-11-02 calls, and the transport from our own kernel headerdevice/tegu CALL-AUDIO-TUNING: what to try next for the echoAll the behaviour change sits in the 9a's call route behind
tegu_aec, which ships off.The first call on the palmtop with
tegu_aec = yes(#374) went silent. The AoC accepted the tuning upload with status 0, but its reply rewrites the second header byte (we send 0x01 and get 0x3e back). The check compared the first six bytes, so it took a successful upload as an unknown outcome and kept the call muted. The check now compares the first byte, the size and the command ID, and the fake AoC in the tests rewrites that byte the same way. A refused call now also logs why.On the palmtop afterwards (2026-11-02, a call to an iPhone on speakerphone), the call had audio both ways, with the uplink and downlink tuning confirmed by the AoC. The far end still heard its own voice come back, the same as without the tuning. So the upload works, but it doesn't cancel the echo yet. That's next; #374 stays a draft until it does.
Tests:
tests/packages omamobile-modem-sit,tools/pr-check.