Skip to content

omamobile-modem-sit 0.3.22: speakerphone call audio on the Pixel 9a, opt-in (stacked on #364) - #367

Merged
derekross merged 3 commits into
derekross:mainfrom
W4HO-ham:sitd-tegu-call-audio
Nov 5, 2026
Merged

derekross merged 3 commits into
derekross:mainfrom
W4HO-ham:sitd-tegu-call-audio

Conversation

@W4HO-ham

@W4HO-ham W4HO-ham commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #364; this PR's own commits are the top two (the route, and the record of the first calls). The radio-state commit is gone: #381 has the same change.

The 9a's call audio route from its stock audio HAL (device/tegu TELEPHONY-PLAN, #360): voice_audio.py gains a route for google,tegu-aoc-snd-card with the TAS2572 amplifiers, selected only when the card is configured ([audio] card); the default stays none and the 7 Pro's CS35L41 route is unchanged.

Per call: save the mixer controls, check the call sink is muted, set stock's microphone and TDM routes (TDM_0_RX Mixer EP5 for the downlink, EP4 TX Mixer INTERNAL_MIC_TX for the uplink), and start EP4 capture and EP5 playback as mono S16_LE, 8 kHz, two 80-frame periods (preparing EP5 is what sends the AoC its modem start). Because the amplifier profile rewrites the gains when the PCMs start, both TAS digital gains are set to -20 dB afterwards and read back before unmuting; if the read-back doesn't match, the route unwinds and the call goes on without audio rather than at an unknown level. On hang-up or any failure the PCMs close before the controls are restored, and the sink stays muted if cleanup fails.

device/tegu/CALL-AUDIO-WINDOW.md is the audit TELEPHONY-PLAN asked for: the AoC voice window is AoC SRAM already reserved no-map in our zumapro DT, and CPIF's PCIe path doesn't map it, so the route needs no new CPU mapping. Whether the firmware's path works is only known after a call.

Fake-ALSA tests cover the route, the restore on failure, the gain read-back refusal and the 7 Pro path; test/all and tools/pr-check pass. On the palmtop (2026-11-02, the daily kernel 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, this route built as 0.3.11) speakerphone calls ran in and out with audio both ways; the record is in device/tegu MODEM-PLAN and the DEVICES cell.

@W4HO-ham

W4HO-ham commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

This has now run on the palmtop: two calls to the owner's phone on 2026-11-03, the daily kernel, omamobile-modem-sit 0.3.11 from this branch with [audio] card = auto. The RIL registered (LTE, IMS voice and SMS), omamobile-sit dial placed the call (AIMS_DIAL error 0), the owner answered, and the log reads "AoC tegu speakerphone prepared at conservative TAS gain", then "AoC call routes restored" after each hang-up. Audio went both ways: the far end's voice came out of the palmtop's speaker, and the palmtop's microphone carried it back to the far end (heard as an echo there, since this route has no echo cancellation yet). No UFS error lines.

What's left: no echo cancellation on speakerphone, no earpiece mode, and incoming calls haven't been tried. I'm taking it out of draft for review of what ran.

@derekross

Copy link
Copy Markdown
Owner

Thank you, and well done on the first calls. Taking the route from the stock HAL, holding the sink muted until both amplifier gains read back, and unwinding to a silent call rather than an unknown level is exactly the caution I'd want for a speaker path with no protection firmware. I checked the -20 dB figure against the kernel's tas2x20_dvc_table (index 180 is -20.0 dB, 220 is 0 dB), and you're right that the control's dB scale can't be trusted. The 7 Pro path is untouched since everything new is behind the exact card name, and card = none stays the default.

#356 and my #381 are on main now, so please rebase on top. In service.py the import line conflicts (keep import carrier_manifest alongside from voice_audio import AudioRefused, VoiceAudio, aoc_card), and #381 already has the identical RADIO[10]='on', so drop your copy. Leave the version; I'll set the next free one at merge (yours and my #373 both said 0.3.12).

The title says 0.3.11 and the description doesn't mention the radio-state commit; with that dropped in the rebase, the title can stay 0.3.11-ish and I'll write the squash subject from the version file. Please make the DEVICES cell match.

Small one for later: on the 9a status() reports speaker true while speaker_available stays false, which a client may show as a greyed-out toggle in the on position.

@W4HO-ham
W4HO-ham force-pushed the sitd-tegu-call-audio branch from d826388 to 2d9390a Compare November 3, 2026 05:32
@W4HO-ham W4HO-ham changed the title omamobile-modem-sit 0.3.11: speakerphone call audio on the Pixel 9a, opt-in (stacked on #364) omamobile-modem-sit 0.3.22: speakerphone call audio on the Pixel 9a, opt-in (stacked on #364) Nov 3, 2026
@W4HO-ham

W4HO-ham commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main with #381, stacked on #364 (0.3.21): this PR's own commits are now 0.3.22 and the calls record. The 0.3.12 commit (radio state 10 is on) is dropped, since #381 has it. The only conflict was the imports in service.py (carrier_manifest and AudioRefused both kept). The calls record still says 0.3.11, because that's the build that ran. tests/packages omamobile-modem-sit and tools/pr-check pass.

@W4HO-ham
W4HO-ham force-pushed the sitd-tegu-call-audio branch 2 times, most recently from c5ddc2c to 6b11e52 Compare November 3, 2026 05:48
@W4HO-ham

W4HO-ham commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Done: rebased on main and on #364, with the import conflict resolved as you said and the radio-state commit dropped. The DEVICES cell no longer names a version, just #356 and #367, so it can't go stale at merge. The description now records the calls. I've noted the speaker / speaker_available mismatch for later.

@derekross

Copy link
Copy Markdown
Owner

Thanks, and well done again on the calls. The rebase is clean: the radio-state commit is gone, both imports kept, the DEVICES cell names no version, and the 7 Pro path is untouched (everything new sits behind the exact card name). Merging after #364 at 0.3.29. One small follow-up for whoever lands first: once #372 is in, the cell's "the package doesn't start the modem" needs updating.

@derekross

Copy link
Copy Markdown
Owner

#364 is merged (squashed as 0.3.28), and this now conflicts on what it carried from it. Could you rebase onto main (the version file becomes 0.3.29) and push? #371 and #372 above it will need the same. I'll merge as soon as it's green.

@W4HO-ham
W4HO-ham force-pushed the sitd-tegu-call-audio branch from 6b5fa84 to 882142d Compare November 3, 2026 13:59
@W4HO-ham

W4HO-ham commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main: the version file is 0.3.29, and the DEVICES row keeps main's cells (including #347's Suspend cell) with this PR's modem cell. #371 and #372 above it are rebased too.

derekross added a commit that referenced this pull request Nov 3, 2026
…99: SIM setup with no APN to type (#373)

* omamobile-modem-sit 0.3.12: the APNs from the SIM, and registration without one

A reseller SIM on Verizon's network needed "apn = vzwinternet" typed
into modem-sit.conf before sitd would start, and then registered only with
the IMS APN as the initial attach APN. A SIM should just work.

With [network] apn and attach_apn at "auto" (the new default; empty means
the same), sitd sends GET_IMSI once after the USIM is READY, keeps only the
MCC/MNC and looks them up in the project's apn-overrides.conf, then in the
system's mobile-broadband-provider-info (CC-PDDC, now a dependency). The
attach APN is an override's attach_apn, else a database APN typed "ia",
else the internet APN. The only override is Verizon's codes: internet
vzwinternet (Verizon's own page), attach ims (our capture on 2026-11-02).
A typed value always wins. Only the source is logged, never the IMSI, the
network code or an APN; status carries the APNs in use and the SIM's PIN1
state for the shell.

Without an APN sitd no longer stops before the radio: it registers, skips
the internet bearer and goes on to IMS, and reports data unavailable.

[data] roaming (default yes, the behaviour so far) drops the cellular route
while roaming; omamobile-sit-data reads it on every pass. The new
omamobile-sit-config, run through pkexec (polkit: the active user), changes
only apn, attach_apn and roaming, and restarts nothing: an APN applies at
the next start-up, which needs a fresh CP.

tools/sit-sim answers GET_IMSI with a made-up subscriber part and logs the
attach APN. Overlaps #356/#364/#367 (0.3.9-0.3.11) in bringup.start(); the
attach_apn key matches #356's line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* omamobile-mmd 0.1.1: the APNs sitd's start-up used, not "auto"

With sitd 0.3.12 the config's APN can be "auto". The bearer's apn and
Modem3gpp.InitialEpsBearerSettings now show what sitd's status reports
(the internet APN and the attach APN), and fall back to the config's
values, with "auto" shown as no APN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* omamobile-shell 0.2.93: a Mobile network page, and the SIM in setup

omamobile.mobilenetwork, opened from Setup > Mobile network (only where the
modem stack is) and the Mobile data tile's chevron: carrier, registration,
signal, Mobile data and Data roaming switches, the APN in use with a field
to type one, the attach APN under Advanced, and the SIM PIN lock. "No modem"
without the stack. omamobile-mobile-network reads sitd's public state, its
config and ModemManager, and changes settings through omamobile-sit-config
under pkexec; it never restarts the modem services, so an APN change offers
a restart of the phone.

omamobile-onboarding names the carrier and says mobile data is set up
automatically when a SIM is in and the stack runs; nothing to type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* TELEPHONY-APPS-PLAN: 7.6, SIM setup with no APN to type

The design of the automatic APN and attach APN, the carrier database and
its licence, the Mobile network page, what is logged, and the phone checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* omamobile-modem-sit 0.3.12: Verizon's attach APN is vzwims, as captured

The override said "ims", which was never tried as an attach APN. The SIM on
Verizon's network registered on 2026-11-02 (20:26 and 20:35) with vzwims as
the attach APN and vzwinternet for internet, so the override, its citation,
the comments, the design notes and the tests now say vzwims.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* omamobile-modem-sit 0.3.29: say when GET_IMSI is sent, and an override's IMS CID is the override's fault

Review of #373. MODEM-CLIENT.md's "no identity reads, but one" paragraph
and the apn comment in modem-sit.conf said GET_IMSI goes out when apn or
attach_apn is auto, from 0.3.12. choose_apn() sends it when any of apn,
attach_apn, ims_apn, ims_first or internet_cid is auto or empty, which
with the shipped defaults is every boot, and typing apn and attach_apn
alone still sends it for the bearer order; only typing all five reads no
IMSI. Both now say so, and that it landed in 0.3.29.

override_values() accepted internet_cid = 2 (the IMS bearer's CID), and
start() then stopped with a message blaming [network] internet_cid. The
override now refuses 2 itself, as it does 16: the value is left out, its
key is listed under 'refused', and choose_apn() logs that the project's
carrier override for this SIM had it, never the config and never the
network code. A test with such an override checks CID 1 and the message.

Also from the review: carrier_apn.py and omamobile-sit-config in
MODEM-CLIENT's module table, the [profiles] comment says the override's
profiles apply only when the SIM was read (not with all five keys typed),
and TELEPHONY-APPS-PLAN 7.6 names the versions after the merge with main
(shell 0.2.99; main's 0.3.28 is #364's).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@W4HO-ham
W4HO-ham force-pushed the sitd-tegu-call-audio branch from 882142d to 307ed61 Compare November 3, 2026 15:28
@W4HO-ham
W4HO-ham force-pushed the sitd-tegu-call-audio branch from 307ed61 to 2269dc9 Compare November 3, 2026 16:00
@W4HO-ham

W4HO-ham commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main again, after #398 and #405. #371 to #380 above it are rebased too. The only conflict was in device-cheetah's test, where #371's sitd policy check now sits beside #398's check of the modem boot target. device-cheetah is 0.1.44. Every touched package's suite passes, and so does pr-check.

@derekross

Copy link
Copy Markdown
Owner

Thanks for the rebases. I compared this head with the one I approved this morning: the route, its tests, the config comment and the window audit are byte for byte the same, and on today's main a refused tegu route still lets the call go on silently, as #387 intends. One thing changed under it: #373 shipped omamobile-modem-sit 0.3.29 in the meantime, so this branch's version file now equals main's. A call-audio fix of mine for the 7 Pro also needs a modem-sit bump and lands first, so I'll set the next free version at merge and write the subject with it ("omamobile-modem-sit 0.3.N: speakerphone call audio on the Pixel 9a, opt-in"). You don't need to push for that; #371 and #372 above it will move up the same way. The speaker/speaker_available follow-up stays for later, as we said.

@W4HO-ham

W4HO-ham commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto today's main after #416. Two conflicts, both text, kept as main has them plus the 9a's lines:

  • modem-sit.conf keeps main's commented #card = none, with the 9a's speakerphone comment above it.
  • voice_audio.py's docstring keeps main's earpiece mode and DEVICE_DEFAULTS text, plus the sentence on tegu's TAS2572 path.

The version file now reads main's 0.3.30, which you said you'd set at merge. modem-sit's tests pass. #371 to #380 are replayed on top, and each merges cleanly onto main.

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.
@W4HO-ham
W4HO-ham force-pushed the sitd-tegu-call-audio branch from 8e6c750 to d5b1f69 Compare November 4, 2026 11:19
@derekross

Copy link
Copy Markdown
Owner

Thanks for the rebase onto #416 and for keeping both text conflicts the way main has them. I checked the opt-in against the new defaults layer. No device package ships a 9a default, so the built-in "none" holds on the palmtop. An owner's card = auto in /etc/omamobile/modem-sit.conf still wins over everything, and the 7 Pro's own default doesn't reach the tegu route, since that only matches the exact tegu card id. So the opt-in is unchanged.

Only the number moved again: #416 shipped modem-sit 0.3.30, so I'll set 0.3.31 at merge and title it "omamobile-modem-sit 0.3.31: speakerphone call audio on the Pixel 9a, opt-in". No push needed. #371 and #372 above it move up the same way.

@derekross
derekross merged commit 68c1f55 into derekross:main Nov 5, 2026
2 checks passed
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…99: SIM setup with no APN to type (derekross#373)

* omamobile-modem-sit 0.3.12: the APNs from the SIM, and registration without one

A reseller SIM on Verizon's network needed "apn = vzwinternet" typed
into modem-sit.conf before sitd would start, and then registered only with
the IMS APN as the initial attach APN. A SIM should just work.

With [network] apn and attach_apn at "auto" (the new default; empty means
the same), sitd sends GET_IMSI once after the USIM is READY, keeps only the
MCC/MNC and looks them up in the project's apn-overrides.conf, then in the
system's mobile-broadband-provider-info (CC-PDDC, now a dependency). The
attach APN is an override's attach_apn, else a database APN typed "ia",
else the internet APN. The only override is Verizon's codes: internet
vzwinternet (Verizon's own page), attach ims (our capture on 2026-11-02).
A typed value always wins. Only the source is logged, never the IMSI, the
network code or an APN; status carries the APNs in use and the SIM's PIN1
state for the shell.

Without an APN sitd no longer stops before the radio: it registers, skips
the internet bearer and goes on to IMS, and reports data unavailable.

[data] roaming (default yes, the behaviour so far) drops the cellular route
while roaming; omamobile-sit-data reads it on every pass. The new
omamobile-sit-config, run through pkexec (polkit: the active user), changes
only apn, attach_apn and roaming, and restarts nothing: an APN applies at
the next start-up, which needs a fresh CP.

tools/sit-sim answers GET_IMSI with a made-up subscriber part and logs the
attach APN. Overlaps derekross#356/derekross#364/derekross#367 (0.3.9-0.3.11) in bringup.start(); the
attach_apn key matches derekross#356's line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* omamobile-mmd 0.1.1: the APNs sitd's start-up used, not "auto"

With sitd 0.3.12 the config's APN can be "auto". The bearer's apn and
Modem3gpp.InitialEpsBearerSettings now show what sitd's status reports
(the internet APN and the attach APN), and fall back to the config's
values, with "auto" shown as no APN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* omamobile-shell 0.2.93: a Mobile network page, and the SIM in setup

omamobile.mobilenetwork, opened from Setup > Mobile network (only where the
modem stack is) and the Mobile data tile's chevron: carrier, registration,
signal, Mobile data and Data roaming switches, the APN in use with a field
to type one, the attach APN under Advanced, and the SIM PIN lock. "No modem"
without the stack. omamobile-mobile-network reads sitd's public state, its
config and ModemManager, and changes settings through omamobile-sit-config
under pkexec; it never restarts the modem services, so an APN change offers
a restart of the phone.

omamobile-onboarding names the carrier and says mobile data is set up
automatically when a SIM is in and the stack runs; nothing to type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* TELEPHONY-APPS-PLAN: 7.6, SIM setup with no APN to type

The design of the automatic APN and attach APN, the carrier database and
its licence, the Mobile network page, what is logged, and the phone checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* omamobile-modem-sit 0.3.12: Verizon's attach APN is vzwims, as captured

The override said "ims", which was never tried as an attach APN. The SIM on
Verizon's network registered on 2026-11-02 (20:26 and 20:35) with vzwims as
the attach APN and vzwinternet for internet, so the override, its citation,
the comments, the design notes and the tests now say vzwims.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

* omamobile-modem-sit 0.3.29: say when GET_IMSI is sent, and an override's IMS CID is the override's fault

Review of derekross#373. MODEM-CLIENT.md's "no identity reads, but one" paragraph
and the apn comment in modem-sit.conf said GET_IMSI goes out when apn or
attach_apn is auto, from 0.3.12. choose_apn() sends it when any of apn,
attach_apn, ims_apn, ims_first or internet_cid is auto or empty, which
with the shipped defaults is every boot, and typing apn and attach_apn
alone still sends it for the bearer order; only typing all five reads no
IMSI. Both now say so, and that it landed in 0.3.29.

override_values() accepted internet_cid = 2 (the IMS bearer's CID), and
start() then stopped with a message blaming [network] internet_cid. The
override now refuses 2 itself, as it does 16: the value is left out, its
key is listed under 'refused', and choose_apn() logs that the project's
carrier override for this SIM had it, never the config and never the
network code. A test with such an override checks CID 1 and the message.

Also from the review: carrier_apn.py and omamobile-sit-config in
MODEM-CLIENT's module table, the [profiles] comment says the override's
profiles apply only when the SIM was read (not with all five keys typed),
and TELEPHONY-APPS-PLAN 7.6 names the versions after the merge with main
(shell 0.2.99; main's 0.3.28 is derekross#364's).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…opt-in (derekross#367)

Call audio on the Pixel 9a through its TAS2572 speakers, opt-in: the
route is selected only for google,tegu-aoc-snd-card, and only when the
owner sets [audio] card = auto in /etc/omamobile/modem-sit.conf (no
device package ships a 9a default, so the built-in none holds).

The route saves the controls, checks the sink is muted, sets stock's
microphone and TDM routes, and starts EP4 capture and EP5 playback as
mono S16_LE at 8 kHz (80-frame periods, two periods), preparing each PCM
once. After PCM startup resets the amplifier profile, both TAS digital
gains go to -20 dB and are read back before unmuting; a refused gain
unwinds the route and the call goes on silent. The 7 Pro's CS35L41 route
is unchanged. Fake-ALSA fault tests and the voice-window audit come with
it. device/tegu MODEM-PLAN and DEVICES record the 9a's first calls,
speakerphone both ways, on the daily kernel and on the open kernel PRs.
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