pmos/device/community/soc-qcom-sdm845/call_audio_idle_suspend_workaround.initd
Joel Selvaraj e95d28a6e7
community/soc-qcom-sdm845: update ucm confs and add call audio idle suspend workaround (MR 3639)
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.
2022-11-28 09:07:33 +01:00

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 $?
}