From 0c9b0c1dc59ccfbde071f3534304e33899133f1e Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 Mar 2022 21:57:34 +0100 Subject: [PATCH] Do not use /etc/asound.conf for gpSP as it does not like mono downmix (sound was saturated) --- .../rootfs-overlay/usr/local/sbin/instant_play | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/instant_play b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/instant_play index fd04638..b79a42a 100755 --- a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/instant_play +++ b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/instant_play @@ -87,12 +87,27 @@ save) # Add the magic sauce to launch the process in background, # record the PID into a file, wait for the process to # terminate and erase the recorded PID + # Do not use /etc/asound.conf for gpSP as it does not like + # mono downmix (sound was saturated) + if grep -q "gpsp" /mnt/instant_play; then + cat << EOF >> "${INSTANT_PLAY_FILE}" +& +rw +mv -f /etc/asound.conf /etc/asound.conf.BAK +pid record \$! +wait \$! +pid erase +mv -f /etc/asound.conf.BAK /etc/asound.conf +ro +EOF + else cat << EOF >> "${INSTANT_PLAY_FILE}" & pid record \$! wait \$! pid erase EOF + fi # Now terminate gracefully exec powerdown now