Optimize Bluetooth volume control latency and fix WirePlumber startup race
This commit is contained in:
1 parent
85bf18ec32
commit
c7cdde6734
30 files changed
+514
-185
No files matched your search
@@ -828,16 +828,16 @@ int runFilesApp(int argc, char** argv) {
|
||||
runAsyncCmd("outdev=$(cat /tmp/sxmo_audio_out_device 2>/dev/null); "
|
||||
"if [ \"$outdev\" = \"Bluetooth\" ]; then "
|
||||
" amixer -c 0 cset \"name='SPK DAC Switch'\" 0 >/dev/null 2>&1; "
|
||||
" wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 >/dev/null 2>&1; "
|
||||
" wpctl set-volume @DEFAULT_AUDIO_SINK@ " + std::to_string(rvol) + "% >/dev/null 2>&1; "
|
||||
" pactl set-sink-mute @DEFAULT_SINK@ 0 >/dev/null 2>&1; "
|
||||
" pactl set-sink-volume @DEFAULT_SINK@ " + std::to_string(rvol) + "% >/dev/null 2>&1; "
|
||||
"elif [ \"$outdev\" = \"Headphones\" ]; then "
|
||||
" amixer -c 0 cset \"name='SPK DAC Switch'\" 0 >/dev/null 2>&1; "
|
||||
" amixer -c 0 cset \"name='EAR_S'\" 0 >/dev/null 2>&1; "
|
||||
" amixer -c 0 cset \"name='PRI_MI2S_RX Audio Mixer MultiMedia1'\" 1 >/dev/null 2>&1; "
|
||||
" amixer -c 0 cset \"name='RX1 Digital Volume'\" " + std::to_string(hp) + " >/dev/null 2>&1; "
|
||||
" amixer -c 0 cset \"name='RX2 Digital Volume'\" " + std::to_string(hp) + " >/dev/null 2>&1; "
|
||||
" wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 >/dev/null 2>&1; "
|
||||
" wpctl set-volume @DEFAULT_AUDIO_SINK@ 100% >/dev/null 2>&1; "
|
||||
" pactl set-sink-mute @DEFAULT_SINK@ 0 >/dev/null 2>&1; "
|
||||
" pactl set-sink-volume @DEFAULT_SINK@ 100% >/dev/null 2>&1; "
|
||||
"else "
|
||||
" amixer -c 0 cset \"name='EAR_S'\" 0 >/dev/null 2>&1; "
|
||||
" amixer -c 0 cset \"name='RX1 MIX1 INP1'\" 0 >/dev/null 2>&1; "
|
||||
@@ -845,8 +845,8 @@ int runFilesApp(int argc, char** argv) {
|
||||
" amixer -c 0 cset \"name='SPK DAC Switch'\" 1 >/dev/null 2>&1; "
|
||||
" amixer -c 0 cset \"name='RX3 MIX1 INP1'\" 3 >/dev/null 2>&1; "
|
||||
" amixer -c 0 cset \"name='RX3 Digital Volume'\" " + std::to_string(rx3) + " >/dev/null 2>&1; "
|
||||
" wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 >/dev/null 2>&1; "
|
||||
" wpctl set-volume @DEFAULT_AUDIO_SINK@ 100% >/dev/null 2>&1; "
|
||||
" pactl set-sink-mute @DEFAULT_SINK@ 0 >/dev/null 2>&1; "
|
||||
" pactl set-sink-volume @DEFAULT_SINK@ 100% >/dev/null 2>&1; "
|
||||
"fi");
|
||||
|
||||
pid_t pid = ::fork();
|
||||
|
||||
Reference in new issue
Block a user