Documenting this here. This is pretty sporadic and I've never been at home to grab the log when it happens. SOMETIMES callaudio will not release the earpiece and even our cludgy hack to disable_speaker and enable_speaker after a call fails. Here's the log of a case:
15:21:47 sxmo_notify_user.sh: Call with XXX terminated
15:21:47 sxmo_modem.sh: Finished call from +1646318XXXX
15:21:47 sxmo_daemons.sh DEBUG: stop incall_menu
15:21:47 sxmo_daemons.sh DEBUG: stop calling_proximity_lock
15:21:47 sxmo_hook_lock.sh: transitioning to stage lock
15:21:47 sxmo_daemons.sh DEBUG: stop state_change_bar
15:21:47 sxmo_daemons.sh DEBUG: start state_change_bar
==> /home/user/.local/state/superd/logs/wireplumber.log <==
M 15:21:47.699923 wp-pw-obj-mixin ../lib/wp/private/pipewire-object-mixin.c:303:wp_pw_object_mixin_set_param: <WpNode:0xfffface7c220> ignoring set_param on already destroyed ob
jects
==> /home/user/.local/state/superd/logs/sxmo_modemmonitor.log <==
15:21:47 sxmo_modemaudio.sh: Successfully disabled call audio mode.
==> /home/user/.local/state/tinydm.log <==
(process:2938): callaudiod-pulse-WARNING **: 15:21:47.737: card has no usable sink
==> /home/user/.local/state/superd/logs/sxmo_modemmonitor.log <==
Error org.freedesktop.DBus.Error.Failed: Operation failed
==> /home/user/.local/state/superd/logs/wireplumber.log <==
M 15:21:47.776165 wp-pw-obj-mixin ../lib/wp/private/pipewire-object-mixin.c:303:wp_pw_object_mixin_set_param: <WpNode:0xffffabbe6540> ignoring set_param on already destroyed ob
jects
==> /home/user/.local/state/superd/logs/sxmo_modemmonitor.log <==
15:21:47 sxmo_notify_user.sh: Failed to disable speaker.
==> /home/user/.local/state/superd.log <==
==> /home/user/.local/state/tinydm.log <==
(process:2938): callaudiod-pulse-WARNING **: 15:21:47.948: card has no usable sink
==> /home/user/.local/state/superd/logs/sxmo_modemmonitor.log <==
Error org.freedesktop.DBus.Error.Failed: Operation failed
15:21:48 sxmo_daemons.sh DEBUG: stop idle_locker
15:21:48 sxmo_notify_user.sh: Failed to enable speaker.
15:21:48 sxmo_daemons.sh DEBUG: start idle_locker
So I think I could check for the dbus error and try again...