From 45ac1d93ae2fa56d510abcbee54814e558df9d89 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 22 Jan 2021 17:55:55 +0100 Subject: [PATCH] v6.35 + DietPi-Config | When selecting a not auto-detected sound card, a reboot is required to apply device tree changes --- dietpi/dietpi-config | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/dietpi/dietpi-config b/dietpi/dietpi-config index 30d98e7abf..4b0894dab7 100644 --- a/dietpi/dietpi-config +++ b/dietpi/dietpi-config @@ -2829,8 +2829,8 @@ NB: All Ethernet connections will be dropped!' && Network_ApplyChanges # Disabled elif (( $ETH_DISABLED )); then - if G_WHIP_YESNO 'Ethernet must be enabled before settings can be changed.\n -Would you like to enable Ethernet now?\n - (NOTICE) Connections may drop!'; then + if G_WHIP_YESNO 'Ethernet must be enabled before settings can be changed. +\nWould you like to enable Ethernet now?\n - (NOTICE) Connections may drop!'; then ETH_DISABLED=0 Network_ApplyChanges @@ -2851,8 +2851,8 @@ Would you like to enable Ethernet now?\n - (NOTICE) Connections may drop!'; then # Disabled | Offer chance to enable (also enables WiFi modules) if (( $WIFI_DISABLED )); then - if G_WHIP_YESNO 'WiFi must be enabled before settings can be changed.\n -Would you like to enable WiFi now?\n - NB: Connections may drop!'; then + if G_WHIP_YESNO 'WiFi must be enabled before settings can be changed. +\nWould you like to enable WiFi now?\n - NB: Connections may drop!'; then WIFI_DISABLED=0 Network_ApplyChanges @@ -2862,8 +2862,8 @@ Would you like to enable WiFi now?\n - NB: Connections may drop!'; then # No hardware found elif (( ! $WIFI_HARDWARE )); then - if G_WHIP_YESNO 'No supported WiFi hardware was found.\n -Would you like to disable WiFi?\n - NB: Connections may drop!'; then + if G_WHIP_YESNO 'No supported WiFi hardware was found. +\nWould you like to disable WiFi?\n - NB: Connections may drop!'; then WIFI_DISABLED=1 Network_ApplyChanges @@ -3875,8 +3875,8 @@ Additional benchmarks: if [[ $psu_noise_reduction == 'Off' ]]; then - G_WHIP_YESNO 'PSU noise reduction:\n\nThis mode attempts to reduce power consumption on your SBC. In turn, this may reduce PSU inflicted noise, that may degrade audio output quality.\n -The following will now be applied:\n - CPU governor = Powersave\n - Display output = Disabled\n\nDo you want to continue?' || return + G_WHIP_YESNO 'PSU noise reduction:\n\nThis mode attempts to reduce power consumption on your SBC. In turn, this may reduce PSU inflicted noise, that may degrade audio output quality. +\nThe following will now be applied:\n - CPU governor = powersave\n - Display output = disabled\n\nDo you want to continue?' || return G_CONFIG_INJECT 'CONFIG_CPU_GOVERNOR=' 'CONFIG_CPU_GOVERNOR=powersave' /boot/dietpi.txt /boot/dietpi/func/dietpi-set_cpu @@ -4008,6 +4008,9 @@ The following will now be applied:\n - CPU governor = Powersave\n - Display outp G_WHIP_MENU "Please select a soundcard\n - Current : $soundcard_current" || return /boot/dietpi/func/dietpi-set_hardware soundcard "$G_WHIP_RETURNED_VALUE" + # RPi: Reboot required to apply device tree changes, which applies to all but auto-detected selections + (( $G_HW_MODEL > 9 )) || [[ $G_WHIP_RETURNED_VALUE == 'hw:'[0-9]','[0-9] || $G_WHIP_RETURNED_VALUE == 'usb-dac' ]] || REBOOT_REQUIRED=1 + elif [[ $G_WHIP_RETURNED_VALUE == 'Auto-conversion' ]]; then # Remove equalizer and plug suffix @@ -4682,8 +4685,8 @@ _EOF_ else - G_WHIP_MSG "[FAILED] Unknown menu ID $TARGETMENUID, reverting to DietPi-Config main menu\n -This error should never show up. Please try to reproduce it. If it reappears, you found a coding bug. + G_WHIP_MSG "[FAILED] Unknown menu ID $TARGETMENUID, reverting to DietPi-Config main menu +\nThis error should never show up. Please try to reproduce it. If it reappears, you found a coding bug. Please report it to: https://github.com/MichaIng/DietPi/issues" TARGETMENUID=0