From 735063f1a3f75ea96c3f73e0329b99a65cdbbf1f Mon Sep 17 00:00:00 2001 From: pabera <1260686+pabera@users.noreply.github.com> Date: Tue, 23 Jan 2024 22:56:19 +0100 Subject: [PATCH] Remove option 'Disable on-chip audio' in favor of self-service --- documentation/builders/audio.md | 18 ++++++++++++++++++ installation/includes/01_default_config.sh | 2 -- installation/routines/set_raspi_config.sh | 12 ------------ 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/documentation/builders/audio.md b/documentation/builders/audio.md index 54bfe72bf..59241f3fc 100644 --- a/documentation/builders/audio.md +++ b/documentation/builders/audio.md @@ -13,6 +13,24 @@ Audio outputs run via PulseAudio and the basic configuration should be easy. There is a [configuration tool](../developers/coreapps.md#Audio), to setup the configuration for the Jukebox Core App. +### Disable On-Chip audio + +If you are planning on using an external sound card (e.g. USB, HifiBerry, PirateAudio, etc), we recommend to disable the on-chip audio. It will make the sound configuration easier. +If you are planning to only use Bluetooth speakers, leave the on-chip audio enabled! + +Run the following command to manage the On-chip audio. Make sure you reboot your device afterwards. + +```bash +cd ~/RPi-Jukebox-RFID/installation/options +./onboard_sound.sh disable +``` + +If you like to enable it, use the following command: + +```bash +./onboard_sound.sh enable +``` + ### To set up the audio 1. Follow the setup steps according to your sound card diff --git a/installation/includes/01_default_config.sh b/installation/includes/01_default_config.sh index ec7b67b66..f1f8dbe2c 100644 --- a/installation/includes/01_default_config.sh +++ b/installation/includes/01_default_config.sh @@ -17,8 +17,6 @@ ENABLE_RFID_READER=true ENABLE_SAMBA=true ENABLE_WEBAPP=true ENABLE_KIOSK_MODE=false -DISABLE_ONBOARD_AUDIO=false -DISABLE_ONBOARD_AUDIO_BACKUP="${RPI_BOOT_CONFIG_FILE}.backup.audio_on_$(date +%d.%m.%y_%H.%M.%S)" # Always try to use GIT with SSH first, and on failure drop down to HTTPS GIT_USE_SSH=${GIT_USE_SSH:-"true"} diff --git a/installation/routines/set_raspi_config.sh b/installation/routines/set_raspi_config.sh index 7f39a0ba5..96358a209 100644 --- a/installation/routines/set_raspi_config.sh +++ b/installation/routines/set_raspi_config.sh @@ -14,18 +14,6 @@ _run_set_raspi_config() { # power management of wifi: switch off to avoid disconnecting log " Disable Wifi power management to avoid disconnecting" sudo iwconfig wlan0 power off - - # On-board audio - if [ "$DISABLE_ONBOARD_AUDIO" == true ]; then - log " Disable on-chip BCM audio" - if grep -q -E "^dtparam=([^,]*,)*audio=(on|true|yes|1).*" "${RPI_BOOT_CONFIG_FILE}" ; then - log " Backup ${RPI_BOOT_CONFIG_FILE} --> ${DISABLE_ONBOARD_AUDIO_BACKUP}" - sudo cp "${RPI_BOOT_CONFIG_FILE}" "${DISABLE_ONBOARD_AUDIO_BACKUP}" - sudo sed -i "s/^\(dtparam=\([^,]*,\)*\)audio=\(on\|true\|yes\|1\)\(.*\)/\1audio=off\4/g" "${RPI_BOOT_CONFIG_FILE}" - else - log " On board audio seems to be off already. Not touching ${RPI_BOOT_CONFIG_FILE}" - fi - fi } set_raspi_config() {