Fix up RG351P/M volume control.
This commit is contained in:
parent
85f38f951f
commit
a792269f66
3 changed files with 12 additions and 4 deletions
|
@ -6,8 +6,8 @@ cat <<EOF >/storage/.config/profile.d/001-deviceconfig
|
|||
# Device Features
|
||||
DEVICE_VOLUMECTL=true
|
||||
DEVICE_POWER_LED=false
|
||||
DEVICE_PLAYBACK_PATH_SPK="SPK"
|
||||
DEVICE_PLAYBACK_PATH_HP="HP"
|
||||
DEVICE_PLAYBACK_PATH_SPK="HP"
|
||||
DEVICE_PLAYBACK_PATH_HP="SPK"
|
||||
DEVICE_BRIGHTNESS="128"
|
||||
DEVICE_VOLUME="100"
|
||||
DEVICE_BATTERY_LED_STATUS=true
|
||||
|
|
8
packages/hardware/quirks/devices/Anbernic RG351M/050-volume
Executable file
8
packages/hardware/quirks/devices/Anbernic RG351M/050-volume
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||
|
||||
. /storage/.config/profile.d/001-device_config
|
||||
|
||||
### RG351P/M has a volume rocker, so the internal volume should always be 100%.
|
||||
amixer -c 0 set "Master" "${DEVICE_VOLUME}%"
|
|
@ -29,10 +29,10 @@ then
|
|||
fi
|
||||
|
||||
VOLUME=$(get_setting audio.volume)
|
||||
if [[ -z ${VOLUME} ]]
|
||||
if [ -z ${VOLUME} ]
|
||||
then
|
||||
VOLUME="60"
|
||||
elif [[ -n "${DEVICE_VOLUME}" ]]
|
||||
elif [ -n "${DEVICE_VOLUME}" ]
|
||||
then
|
||||
VOLUME="${DEVICE_VOLUME}"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue