feat(rog5/audio): persistent earpiece and speakerphone call volumes on D-Bus #1845

Merged
lytedev merged 2 commits from propose/call-volumes-dbus into main 2026-11-05 02:35:30 -06:00
Owner

See the commit messages.

🤖 Generated with Claude Code

See the commit messages. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(rog5/audio): persistent earpiece and speakerphone call volumes on D-Bus
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
0301a57a2f
Daniel wants a Phone volume slider in lyte-shell's quick settings next
to the media one. rog5-call-audio now exports dev.lyte.CallVolumes1 on
its existing object (org.mobian_project.CallAudio,
/org/mobian_project/CallAudio). This was agreed with
shell-press-feedback, who builds the slider:
- EarpieceVolume (d, read/write), 0.0 to 1.0, default 1.0. 1.0 is the
  Earpiece sink at unity, which reaches stock's handset level at the
  amplifier, so a Set above 1.0 (or below 0) answers InvalidArgs.
- SpeakerphoneVolume (d, read/write), 0.0 to 1.0, default 0.6.
- CallPlacement (s, read-only): none, earpiece, loudspeaker or headset,
  so the slider can bind to the volume in use.
PropertiesChanged is emitted for all three. The CallAudio interface's
signals are filtered to its own properties, so libcallaudio never sees
the new names.

Both volumes are kept in $XDG_STATE_HOME/rog5-call-audio
(earpiece-volume.json, speakerphone-volume.json). A Set applies at once
when it matches the call's placement, and otherwise waits for the next
call that uses it. Volume-key changes during a call (sink change events
on the Earpiece or Speakers sink) update the matching value and are
published, so the slider follows. An earpiece call now sets the
Earpiece sink to EarpieceVolume; before, it inherited whatever
WirePlumber restored.

Behaviour change: a speaker call always plays at SpeakerphoneVolume.
The first speaker call no longer borrows an audible media volume, so
the value the slider shows is the value that plays.

Tested: 47 unit tests. They cover a Set during an earpiece call applying
at once, a Set between calls used by the next call, a speakerphone Set
during an earpiece call waiting for the speaker button, the volume keys
updating and publishing EarpieceVolume, out-of-range refusal,
CallPlacement, and Set/GetAll and InvalidArgs over a private
dbus-daemon. Not run on the phone; lyte-shell's slider is the first
client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjnZHDLZPnaxmyNAYKhxJV
feat(rog5/audio): a Muted property silences what the call plays
Some checks failed
/ check-format (push) Successful in 24s
/ build (push) Failing after 8s
9a187d598d
shell-press-feedback's lyte-shell Call slider has a mute toggle for the
call's outgoing audio to Daniel's ear. That's separate from MuteMic,
which mutes the microphone. dev.lyte.CallVolumes1 gains Muted (b,
read/write). It mutes the call's own playback streams with
sink_input_mute, including streams Calls opens after the mute. The
Earpiece and Speakers sinks are untouched, so nothing else is silenced
and there's no sink state to restore.

Muted belongs to one call. It reads false whenever no call is in
progress, a write outside a call is ignored, and the end of a call
resets it. A next call that started silent would be worse than having
to tap mute again.

Tested: 49 unit tests. They cover muting a stream that appears after
the mute, the reset at the end of a call, an ignored write with no
call, and GetAll including Muted over a private dbus-daemon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjnZHDLZPnaxmyNAYKhxJV
lytedev deleted branch propose/call-volumes-dbus 2026-11-05 02:35:31 -06:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lytedev/nix!1845
No description provided.