Skip to content

omamobile-audio 0.5.14, device-raven 0.1.31: raven's microphones without speaker protection - #400

Closed
robotosaith wants to merge 3 commits into
derekross:mainfrom
robotosaith:omamobile-raven-mics-v2
Closed

robotosaith wants to merge 3 commits into
derekross:mainfrom
robotosaith:omamobile-raven-mics-v2

Conversation

@robotosaith

@robotosaith robotosaith commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

What and why

On main a fresh raven has no microphones: omamobile-audio isn't in its image, and without speaker protection nothing loads the CS35L41 driver, while the AoC card waits for both amplifiers as codecs. omamobile-speaker-protection mics loads the driver and mutes both amplifiers, nothing more; omamobile-audio-mics.service runs it on gs201 or gs101, and stands down once protection is enabled. device-raven enables it and puts omamobile-audio in raven's image, whose blacklist also stops the driver loading on its own (on today's fresh install it did, unprotected). Speakers stay muted here; the next PR turns them on.

Device and build

  • Phone: Pixel 6 Pro (raven)
  • Kernel release (uname -r): 7.3.0-rc6-omamobile-push1-ge1e6adb69bbf (raven's integration kernel; the AoC isn't published yet)
  • Packages changed, with versions: omamobile-audio 0.5.14, omamobile-device-raven 0.1.31

Checks (no phone needed)

  • tools/pr-check origin/main passes
  • tests/all passes
  • tests/packages passes (or the packages I touched: omamobile-audio, omamobile-device-raven; omamobile-audio's "alsa-lib control access" fails on this laptop only, a Homebrew alsa-lib that can't open the laptop's own card)
  • Each changed package has its version bumped, and the new version is in the commit subject
  • Commits have area prefixes and bodies that say why; any AI help is a Co-Authored-By: or Assisted-by: trailer, never a Signed-off-by:

On the phone

  • I ran this on my own phone, booted into this build
  • Runbook steps passed (plan, step, result): AUDIO-PLAN "Without the amplifiers" (2026-10-27): the card up, both amplifiers at Digital PCM Volume 0, the microphone at -64.5 dBFS in a quiet room and -48 to -56 dBFS with speech; 2026-11-03: installed on a fresh raven, the card and sound card present.
  • What I did not test: a recording from this exact build (the 10-27 run used the same unit on an older base).
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)
tools/phone-smoke report

phone-smoke: raven

Kernel 7.3.0-rc6-omamobile-push1-ge1e6adb69bbf, tools at 0d328a02, 2026-11-03T14:31Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-omamobile-push1-ge1e6adb69bbf, slot b, up 3419s
storage guard (required) ok 49 partitions; only userdata and slot B's boot images writable
root (required) ok ext4 on userdata, 97G free
kernel health (required) ok no oops or BUG; 0 WARN, 405 error lines in dmesg (0 known, 405 new)
new dmesg errors not ok cpif: mif_gpio_get_value: GET GPIO N is not valid x207; cpif: rx_demux: PCIE: ERR! N is not opened x66; cpif: pass_skb_to_demux: PCIE: N<N: ERR! N>recv_skb fail (N) x66
systemd units not ok failed: omamobile-bt-addr@hci0:11.service
USB gadget (required) ok bound to 11110000.usb
display ok card1-DSI-1 connected, 1440x3120
GPU ok render node on panfrost
session (required) ok Hyprland and the Omarchy shell running
lock ok PAM file present, the shell can lock (passwordPam true, locked false)
touch ok s6sy761
buttons ok gpio-keys
Wi-Fi ok wlp1s0 on brcmfmac, link up
Bluetooth ok hci0, powered true
battery ok 89% Discharging, 22 °C
sound cards ok googleaocsndcar
sensors ok Accelerometer AmbientLight Proximity
cameras skip no libcamera tools
thermal ok hottest zone 47 °C

Packages: hyprland 0.57.0-3.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.1-1, omamobile-apps 0.2.2-1, omamobile-audio 0.5.14-1, omamobile-device-raven 0.1.31-1, omamobile-firstboot 0.1.3-1, omamobile-gnss 0.2.7-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-mmd 0.1.2-1, omamobile-modem 0.1.14-1, omamobile-modem-sit 0.3.30-1, omamobile-omarchy 0.1.31-1, omamobile-owl-widgets 0.1.2-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.94-1, omamobile-voice 0.1.0-1, omaphone 0.2.2-1, omarchy 4.0.6-1, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1

The smoke report's CPIF lines are the unpublished modem driver's (an optional GPIO raven's DT doesn't name, a channel nobody had open yet), and omamobile-bt-addr@hci0 failed once on that boot while Bluetooth came up (#77).

🤖 Generated with Claude Code

@robotosaith robotosaith changed the title omamobile-audio 0.5.11, device-raven 0.1.31: raven's microphones without speaker protection omamobile-audio 0.5.14, device-raven 0.1.31: raven's microphones without speaker protection Nov 3, 2026
robotosaith and others added 2 commits November 3, 2026 16:40
The AoC sound card waits for both CS35L41 amplifiers as codecs, so
while their driver stays blacklisted (no validated speaker limits, as on
raven, or protection not yet enabled) there are no microphones either.
omamobile-speaker-protection mics loads the driver and mutes both
amplifiers, as start does before anything else, and stops there: no DSP
firmware, no unmute, the same hang marker. omamobile-audio-mics.service
runs it; this package enables nothing, a device package does. The unit
conflicts with speaker protection and doesn't run once that is enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Enables omamobile-audio-mics.service (omamobile-audio 0.5.14), so raven's
microphones work while speaker protection stays off. Checked on raven
after a reboot: the card up, both amplifiers at Digital PCM Volume 0,
the microphone at -64.5 dBFS in a quiet room and -48 to -56 dBFS with
speech. AUDIO-PLAN has the run; the matrix row says microphones only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robotosaith
robotosaith force-pushed the omamobile-raven-mics-v2 branch from d59b9f9 to cc44003 Compare November 3, 2026 16:46
@derekross

Copy link
Copy Markdown
Owner

Thank you for this. Getting raven's microphones back without touching the speakers is the right first step, and it also fixes something I didn't know about: on today's raven image the amplifier driver autoloads with nothing muting it. I read the new mics path, the unit, raven's UCM and WirePlumber rules, and the earpiece unit. Nothing in UCM or PipeWire raises the amplifiers' volume, and the earpiece path refuses without protection, so mics mode really does stay muted. On cheetah the change is only the new function and an unused unit; the stage ceilings and start are untouched.

One thing before I merge, and one question:

  1. The guard only reaches fresh images. device-raven's PKGBUILD doesn't depend on omamobile-audio, and device-raven has no cs35l41 blacklist of its own. A raven that updates to 0.1.31 therefore gets a wants link to a unit it doesn't have, and the amplifier driver keeps autoloading unmuted. Could you add omamobile-audio>=0.5.14 to device-raven's depends? I'd also add blacklist snd_soc_cs35l41_spi to device-raven's own modprobe.d: the explicit modprobe in mics and start still loads the driver, but autoload no longer depends on a second package.
  2. A race with alsactl restore, as far as I can tell from the code. alsa-utils (a dependency of omamobile-audio) restores the saved mixer state from udev when the card appears. mics mutes as soon as the card shows in /proc/asound/cards, so the restore can land after the mute, and in mics mode there's no watchdog to catch it. I haven't seen it happen. Your phone has run protection at 737/17, though, so its saved state may hold a non-zero level. Could you check grep -A3 'Digital PCM Volume' /var/lib/alsa/asound.state on it? I'd also add udevadm settle before the mute, and a second read a moment later that both amplifiers are still at 0.

Small things, fine in the same push:

  • The unit's "stands down once protection is enabled" check looks only in /etc, while omamobile-audio 0.5.15, device-raven 0.1.32: raven's speakers through protection at stage media (stacked on #400) #401 enables protection through a /usr/lib wants link. A second ConditionPathExists=! for that path keeps the promise true on raven.
  • Conflicts= doesn't order the two units. A Before=omamobile-speaker-protection.service makes the mute on stop finish before protection starts.
  • mics() landed between status() and its "Read-only report" comment. Could you move it?
  • device-raven's README calls the unit "from omamobile-audio 0.5.3"; it's 0.5.14.

On versions: device-raven 0.1.31 is also used by #403 and a few of the 9a modem PRs. Whichever merges second will get the next free number at merge, so no need to change anything now.

…rophones

Review on derekross#400:
- device-raven depends on omamobile-audio>=0.5.14 and blacklists
  snd_soc_cs35l41_spi itself, so a raven that updates gets the unit its
  wants link names, and the amplifier driver never autoloads unmuted
  whatever the audio package ships; mics and start still modprobe it.
- mics waits for udev to settle (alsa-utils' restore runs when the card
  appears) before it mutes, then reads both amplifiers again a second
  later and fails, muting again, if either isn't at 0.
- The unit also stands down when protection is enabled by a /usr/lib
  wants link (a device package, as derekross#401 does), and is ordered before
  protection, so its mute on stop ends before protection starts.
- mics() moved above the "Read-only report" comment that belongs to
  status(); device-raven's README names omamobile-audio 0.5.14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robotosaith

Copy link
Copy Markdown
Contributor Author

Thanks for the close read, and for catching the unmuted autoload on today's image. All in 507f17a:

  1. device-raven now depends on omamobile-audio>=0.5.14 and has its own blacklist snd_soc_cs35l41_spi in omamobile-raven.conf; its test checks both.
  2. My phone has no /var/lib/alsa/asound.state at all, so there was nothing to restore here. mics now runs udevadm settle before the mute, then reads both amplifiers again a second later and fails (muting again) if either isn't at 0.

The small ones are in too: a second ConditionPathExists=! for the /usr/lib wants link, Before=omamobile-speaker-protection.service, mics() moved above the "Read-only report" comment, and the README says 0.5.14. The audio tests check the new unit lines.

Thanks for taking care of the version numbers at merge.

@derekross

Copy link
Copy Markdown
Owner

Thank you, every point is in, and I checked each against the diff. The dependency and raven's own blacklist mean an updated phone gets both the unit and the guard. The settle-then-recheck closes the restore window, and since fail mutes again, a late restore can't leave a speaker live. Thanks for checking asound.state too.

Since #401 carries this head and moves raven on to protection, my plan is to merge #401 on its own and close this one with a note, so the history lands once. One nit that #401 shares: the new row in device-raven's README has three cells in a two-column table, so GitHub renders it oddly. Putting omamobile-raven.conf inside the second cell fixes it. I'll fix it in #401 if you'd rather not push again.

derekross pushed a commit that referenced this pull request Nov 5, 2026
… protection at stage media (#401)

Raven's speakers and microphones, through speaker protection at the
package's stage media (737/10). AUDIO-PLAN R6 measured raven's own
limits: at stage media the protection firmware's coil estimate is sane
on both speakers and verify passes, holding to about +9.5 dB before it
misreads from +10 dB, as on cheetah.

- omamobile-audio 0.5.15: `omamobile-speaker-protection mics` loads the
  CS35L41 driver and mutes both amplifiers (after udev settles, read
  back a second later), for a phone whose speakers aren't validated;
  protection also starts on gs101's AoC; stage c9 is refused on any
  system but cheetah, before any stamp or list is read, and earpiece
  mode is refused on raven (tests with SYSTEM=raven).
- device-raven 0.1.32: enables speaker protection in place of the
  microphones-only unit, depends on omamobile-audio>=0.5.15 and
  blacklists snd_soc_cs35l41_spi itself, so an updated raven never
  autoloads the amplifier driver unmuted.

Checked on raven: the factory calibration read back from both DSPs,
both amplifiers on the protection firmware at 737/10, a -20 dBFS tone
from both speakers, the watchdog at the media ceilings. Includes #400.
@derekross

Copy link
Copy Markdown
Owner

Merged as part of #401 (squash commit on main), which carried this head unchanged together with raven's speakers through protection. Thank you!

@derekross derekross closed this Nov 5, 2026
@robotosaith
robotosaith deleted the omamobile-raven-mics-v2 branch November 12, 2026 17:18
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
… protection at stage media (derekross#401)

Raven's speakers and microphones, through speaker protection at the
package's stage media (737/10). AUDIO-PLAN R6 measured raven's own
limits: at stage media the protection firmware's coil estimate is sane
on both speakers and verify passes, holding to about +9.5 dB before it
misreads from +10 dB, as on cheetah.

- omamobile-audio 0.5.15: `omamobile-speaker-protection mics` loads the
  CS35L41 driver and mutes both amplifiers (after udev settles, read
  back a second later), for a phone whose speakers aren't validated;
  protection also starts on gs101's AoC; stage c9 is refused on any
  system but cheetah, before any stamp or list is read, and earpiece
  mode is refused on raven (tests with SYSTEM=raven).
- device-raven 0.1.32: enables speaker protection in place of the
  microphones-only unit, depends on omamobile-audio>=0.5.15 and
  blacklists snd_soc_cs35l41_spi itself, so an updated raven never
  autoloads the amplifier driver unmuted.

Checked on raven: the factory calibration read back from both DSPs,
both amplifiers on the protection firmware at 737/10, a -20 dBFS tone
from both speakers, the watchdog at the media ceilings. Includes derekross#400.
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