callaudioshim 1-r1: own callaudiod's activation file, so Phosh gets the shim
Some checks failed
image / image (push) Has been cancelled
Some checks failed
image / image (push) Has been cancelled
Phosh D-Bus-activates org.mobian_project.CallAudio at startup (cui_init ->
call_audio_init), before any autostart runs. So the stock callaudiod took
the name, segfaulted once, and then refused every mute ("card has no usable
source"): Calls' mute did nothing and Calls asserted on each refusal. Under
Plasma the shim won only because its phase-1 autostart ran first.
The package now installs the activation file at callaudiod's path
(replaces="callaudiod"), pointing at the shim, so whoever asks first gets
the shim. apk keeps the file through callaudiod reinstalls and upgrades,
including both packages upgrading in one transaction (tested in
alpine:edge). Removing the shim removes the file; 'apk fix callaudiod'
restores the stock one. A second instance exits quietly instead of
tracing back.
Tested on the dev phone: Phosh (activation at login, mute silences the
uplink, no Calls assertions) and Plasma (autostart owns the name, the
dialer's mute button follows the mic state).
This commit is contained in:
parent
507dac02b5
commit
12a65a5574
3 changed files with 27 additions and 9 deletions
|
|
@ -37,9 +37,11 @@ interface (verified against callaudiod's org.mobian_project.CallAudio.xml):
|
|||
dynamic in this setup — journal/audio.md 2026-07-18). SpeakerState
|
||||
defaults to ON. When an Earpiece UCM device exists these become real.
|
||||
|
||||
Stock callaudiod must not own the name: pkill it and mask its D-Bus
|
||||
activation (see journal/ims.md s44 deploy notes). Runs as the session user
|
||||
(autostart .desktop), no root needed.
|
||||
Stock callaudiod must not own the name. The package replaces callaudiod's
|
||||
D-Bus activation file with one that starts this shim, so whichever client asks
|
||||
first — Phosh activates the name at startup, before autostart runs — gets the
|
||||
shim; the KDE early-phase autostart stays for the DialerUtils push at session
|
||||
start. Runs as the session user, no root needed.
|
||||
"""
|
||||
import subprocess
|
||||
|
||||
|
|
@ -185,7 +187,12 @@ class CallAudio(dbus.service.Object):
|
|||
def main():
|
||||
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
|
||||
session = dbus.SessionBus()
|
||||
name = dbus.service.BusName(BUS_NAME, session, do_not_queue=True) # noqa: F841
|
||||
try:
|
||||
name = dbus.service.BusName(BUS_NAME, session, do_not_queue=True) # noqa: F841
|
||||
except dbus.exceptions.NameExistsException:
|
||||
# activated and autostarted in the same session: the first one serves
|
||||
log(f"callaudioshim: {BUS_NAME} already owned; exiting")
|
||||
return
|
||||
CallAudio(session)
|
||||
log(f"callaudioshim: owning {BUS_NAME}")
|
||||
GLib.MainLoop().run()
|
||||
|
|
|
|||
Loading…
Reference in a new issue