In SDM845, the q6voice kernel driver connects modem and audio backends. Callaudiod seems to switch to correct audio device and prepares it, however, the audio device get's closed since no one from the userspace is actively listening to it. This cuts the audio in call. As a workaround, I have added to script to disable the suspend-on-idle pulseaudio module during calls, so the audio devices don't close automatically.
29 lines
700 B
Plaintext
29 lines
700 B
Plaintext
#!/sbin/openrc-run
|
|
|
|
name="call_audio_idle_suspend_workaround"
|
|
description="Disable pulseaudio suspend-on-idle module during call"
|
|
pid="/run/call_audio_idle_suspend_workaround.pid"
|
|
|
|
depend() {
|
|
need dbus
|
|
}
|
|
|
|
start() {
|
|
ebegin "Starting call audio idle suspend workaround"
|
|
|
|
userid=10000 # Default User ID in pmOS
|
|
user=$(getent passwd $userid | cut -d: -f1)
|
|
env_var="XDG_RUNTIME_DIR=/run/user/$userid"
|
|
cmd="/usr/sbin/call_audio_idle_suspend_workaround"
|
|
|
|
start-stop-daemon --start --exec "$cmd" --env "$env_var" --background --user $user --pidfile "$pid" --make-pidfile
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping call audio idle suspend workaround"
|
|
|
|
start-stop-daemon --stop --pidfile "$pid"
|
|
eend $?
|
|
}
|