diff --git a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/sched_shutdown b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/sched_shutdown index a775843..3fa1732 100755 --- a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/sched_shutdown +++ b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/sched_shutdown @@ -19,3 +19,4 @@ sleep ${1} # Delay expired, initiate shutdown shutdown_funkey + diff --git a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/volume_set b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/volume_set index bebc413..41c9619 100755 --- a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/volume_set +++ b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/volume_set @@ -21,13 +21,6 @@ volume_scaled=$(echo "a = $volume_percent * (63 - $vol_mini) / 100 + $vol_mini + # Get current value current_volume=$(volume_get) -# Turn on/off audio amplifier if necessary -if [ ${current_volume} -eq 0 -a ${volume_percent} -ne 0 ]; then - start_audio_amp 1 -elif [ ${current_volume} -ne 0 -a ${volume_percent} -eq 0 ]; then - start_audio_amp 0 -fi - # Set new volume amixer -q sset 'Headphone' ${volume_scaled} unmute @@ -35,4 +28,12 @@ amixer -q sset 'Headphone' ${volume_scaled} unmute if [ ${?} -eq 0 -a ${current_volume} -ne ${volume_percent} ]; then fw_setenv volume ${volume_percent} fi + +# Turn on/off audio amplifier if necessary +if [ ${current_volume} -eq 0 -a ${volume_percent} -ne 0 ]; then + start_audio_amp 1 +elif [ ${current_volume} -ne 0 -a ${volume_percent} -eq 0 ]; then + start_audio_amp 0 +fi + exit 0 diff --git a/FunKey/configs/funkey_defconfig b/FunKey/configs/funkey_defconfig index 1f35af9..f5a54ad 100644 --- a/FunKey/configs/funkey_defconfig +++ b/FunKey/configs/funkey_defconfig @@ -13,7 +13,7 @@ BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/FunKey-Project/FunKey-OS/releases BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y BR2_TOOLCHAIN_EXTERNAL_CXX=y -BR2_TARGET_OPTIMIZATION="-fno-PIC -march=armv7-a+neon-vfpv4 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad -D__ARM_NEON__" +BR2_TARGET_OPTIMIZATION="-fno-PIC -march=armv7-a+neon-vfpv4 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad" BR2_TARGET_GENERIC_HOSTNAME="FunKey" BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the FunKey" BR2_ROOTFS_DEVICE_TABLE="$(BR2_EXTERNAL_FUNKEY_PATH)/board/funkey/device_table.txt"