mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-04-01 04:21:04 +00:00
fix(deck): Set volume of original output to 100% to fix low volume under DSP
This commit is contained in:
parent
0df0909389
commit
fe162863b0
@ -18,7 +18,7 @@ BAZZITE_CONFIG_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/bazzite"
|
||||
mkdir -p "$BAZZITE_CONFIG_DIR"
|
||||
|
||||
# SCRIPT VERSION
|
||||
USER_SETUP_VER=40
|
||||
USER_SETUP_VER=41
|
||||
USER_SETUP_VER_FILE="$BAZZITE_CONFIG_DIR/version"
|
||||
USER_SETUP_FEDORA_VER_FILE="$BAZZITE_CONFIG_DIR/fedora_version"
|
||||
USER_SETUP_IMAGE_VER_FILE=$BAZZITE_CONFIG_DIR/image_name""
|
||||
@ -199,6 +199,25 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegam
|
||||
fi
|
||||
fi
|
||||
|
||||
# Audio Fix
|
||||
# These handhelds use a custom DSP which requires the base speaker volume to be 100%
|
||||
wp_audio_sinks() {
|
||||
wpctl status |
|
||||
awk 'BEGIN { A=0; S=0; }
|
||||
/^Audio/ { A=1; }
|
||||
/Sinks/ { S=1; }
|
||||
/Sources/ { S=0; }
|
||||
/Sink endpoints/ { S=0; }
|
||||
/^Video/ { A=0; }
|
||||
{ if (A==1 && S==1 && / [[:digit:]]*\./)
|
||||
{ print; } }' |
|
||||
sed 's/^.* \([[:digit:]]*\)\. \(.*\) \[.*$/\1\t\2/'
|
||||
}
|
||||
|
||||
if [[ ":83E1:ROG Ally RC71L:" =~ ":$SYS_ID:" ]]; then
|
||||
wpctl set-volume $(wp_audio_sinks | grep "17h/19h" | sed 's@^[^0-9]*\([0-9]\+\).*@\1@') 100 || true
|
||||
fi
|
||||
|
||||
# Prevent future executions
|
||||
echo "Writing state file"
|
||||
echo $USER_SETUP_VER > $USER_SETUP_VER_FILE
|
||||
|
Loading…
x
Reference in New Issue
Block a user