Change to volume fix (still needs more work)

This commit is contained in:
Tim Flaman 2022-12-16 14:50:08 -06:00
parent 1e4ec65e07
commit 260259aca0
3 changed files with 7 additions and 11 deletions

View file

@ -7,16 +7,11 @@
# Enable GPIO 77 for power LED manipulation
echo ${DEVICE_LED} > /sys/class/gpio/export
# Enable WIFI GPIO for WIFI manipulation
echo ${DEVICE_WIFI} > /sys/class/gpio/export
# Power up the WIFI device
echo out > /sys/class/gpio/gpio${DEVICE_WIFI}/direction
echo 1 > /sys/class/gpio/gpio${DEVICE_WIFI}/value
# Enable PWM for rumble and turn rumble off during startup.
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle
# Volume Fix
amixer -c 0 cset iface=MIXER,name='Playback Path' SPK_HP

View file

@ -1,4 +0,0 @@
#!/bin/bash
amixer -c 0 cset iface=MIXER,name='Playback Path' SPK_HP
exit 0

View file

@ -62,6 +62,11 @@ case $1 in
DEVICE_VOLUME=$(get_setting "audio.volume" 2>/dev/null)
nohup amixer -M set "${DEVICE_AUDIO_MIXER}" ${DEVICE_VOLUME}% & >/dev/null 2>&1
if [[ "${HW_DEVICE}" =~ RGB20S ]]
then
nohup amixer -c 0 cset iface=MIXER,name='Playback Path' SPK_HP
fi
BRIGHTNESS=$(get_setting system.brightness)
echo ${BRIGHTNESS} >/sys/class/backlight/$(brightness device)/brightness