Skip to content

Commit

Permalink
Remove option 'Disable on-chip audio' in favor of self-service
Browse files Browse the repository at this point in the history
  • Loading branch information
pabera committed Jan 23, 2024
1 parent 8e4ec13 commit 735063f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
18 changes: 18 additions & 0 deletions documentation/builders/audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions installation/includes/01_default_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"}

Expand Down
12 changes: 0 additions & 12 deletions installation/routines/set_raspi_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 735063f

Please sign in to comment.