diff --git a/components/bluetooth-sink-switch/README.md b/components/bluetooth-sink-switch/README.md index 8e5c9cec3..572bde2a1 100644 --- a/components/bluetooth-sink-switch/README.md +++ b/components/bluetooth-sink-switch/README.md @@ -148,7 +148,7 @@ CMDBLUETOOTHTOGGLE="1364237231134" Speakers and Headphones can have very different maximum volume levels. This sometimes leads to very strong volume level changes when switching between speakers and headphones. Restricting the maximum volume with the Phoniebox-integrated max-volume setting does no yield the desired effect, as this is a single setting and does not differentiate between different audio sinks. -The solution is adding a `softvol` component to the /etc/asound.conf. You may already have one set up, if your soundcard does not have a hardware volume control. Then it is easy! The `softvol` copmonent adds a systemwide ALSA-based volume control for a hardware soundcard. You will need to give it a name, that does **not** exist! Check with `$ amixer scontrols` first, which names are already taken. Here, I have choosen *Master*. This will work even if your soundcard has a hardware volume control. +The solution is adding a `softvol` component to the /etc/asound.conf. You may already have one set up, if your soundcard does not have a hardware volume control. Then it is easy! The `softvol` copmonent adds a systemwide ALSA-based volume control for a hardware soundcard. You will need to give it a name, that does **not** exist! Check with `$ sudo amixer scontrols` first, which names are already taken. Here, I have choosen *Master*. This will work even if your soundcard has a hardware volume control. The `softvol` component has a feature called *max_db* to limit the maximum volume, which we are going to utilize here. With that we are limiting the maximum volume of the speakers systemwide and independent of MPD or other Phoniebox settings. @@ -204,7 +204,7 @@ $ speaker-test -D hifiberry and changing the default volume control in another console ~~~bash -$ alsamixer +$ sudo alsamixer ~~~ If you are experimenting with a softvol and want to get rid of it again - that is not an easy task. Most promising approach is to insert the SD-Card into a different Linux machine delete the file `/var/lib/alsa/asound.state`. This must be done from a different computer, as this file gets written during shutdown. More infos about the softvol may be found [here](https://alsa.opensrc.org/Softvol) diff --git a/scripts/installscripts/install-jukebox.sh b/scripts/installscripts/install-jukebox.sh index 54da685e3..648755693 100644 --- a/scripts/installscripts/install-jukebox.sh +++ b/scripts/installscripts/install-jukebox.sh @@ -535,23 +535,30 @@ config_audio_interface() { clear + local amixer_scontrols=$(sudo amixer scontrols) + local audio_interfaces=$(echo "${amixer_scontrols}" | sed "s|.*'\(.*\)'.*|\1|g") + local first_audio_interface=$(echo "${audio_interfaces}" | head -1) + local default_audio_interface="${first_audio_interface:-PCM}" + echo "##################################################### # # CONFIGURE AUDIO INTERFACE (iFace) # -# The default RPi audio interface is 'Headphone'. -# But this does not work for every setup. Here a list of -# available iFace names: +# The default RPi audio interface is '${default_audio_interface}'. +# But this does not work for every setup. +# Here a list of available iFace names: + +${audio_interfaces} " - amixer scontrols + echo " " - read -rp "Use Headphone as iFace? [Y/n] " response + read -rp "Use '${default_audio_interface}' as iFace? [Y/n] " response case "$response" in [nN][oO]|[nN]) read -rp "Type the iFace name you want to use:" AUDIOiFace ;; *) - AUDIOiFace="Headphone" + AUDIOiFace="${default_audio_interface}" ;; esac # append variables to config file diff --git a/scripts/installscripts/tests/run_installation_tests.sh b/scripts/installscripts/tests/run_installation_tests.sh index 2f75d063a..83462a63f 100644 --- a/scripts/installscripts/tests/run_installation_tests.sh +++ b/scripts/installscripts/tests/run_installation_tests.sh @@ -18,7 +18,7 @@ echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selecti # n dont configure wifi # y configure autohotspot # y use autohotspot default config -# y Headphone as iface +# y use default audio iface # n no spotify # y configure mpd # y audio default location diff --git a/scripts/installscripts/tests/run_installation_tests2.sh b/scripts/installscripts/tests/run_installation_tests2.sh index da2521ebc..e6d2a3189 100644 --- a/scripts/installscripts/tests/run_installation_tests2.sh +++ b/scripts/installscripts/tests/run_installation_tests2.sh @@ -17,7 +17,7 @@ echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selecti # y confirm interactive # n dont configure wifi # n dont configure autohotspot -# y PCM as iface +# y use default audio iface # n no spotify # y configure mpd # y audio default location diff --git a/scripts/installscripts/tests/run_installation_tests3.sh b/scripts/installscripts/tests/run_installation_tests3.sh index dc7e889d6..b61690662 100644 --- a/scripts/installscripts/tests/run_installation_tests3.sh +++ b/scripts/installscripts/tests/run_installation_tests3.sh @@ -17,7 +17,7 @@ echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selecti # y confirm interactive # n dont configure wifi # n dont configure autohotspot -# y Headphone as iface +# y use default audio iface # y spotify with myuser, mypassword, myclient_id, myclient_secret # y configure mpd # y audio default location