commit
e169c62565
8 changed files with 204 additions and 2 deletions
17
packages/sysutils/autostart/sources/quirks/Anbernic RG353P/001-hardwareinit
Executable file
17
packages/sysutils/autostart/sources/quirks/Anbernic RG353P/001-hardwareinit
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
# 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
|
||||
|
||||
cat <<EOF >/storage/.config/sleep.conf.d/sleep.conf
|
||||
[Sleep]
|
||||
AllowSuspend=yes
|
||||
SuspendState=freeze
|
||||
EOF
|
39
packages/sysutils/autostart/sources/quirks/Anbernic RG353P/002-deviceconfig
Executable file
39
packages/sysutils/autostart/sources/quirks/Anbernic RG353P/002-deviceconfig
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||
|
||||
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
|
||||
# Device Features
|
||||
DEVICE_HAS_FAN=false
|
||||
DEVICE_FAKE_JACKSENSE=false
|
||||
DEVICE_VOLUMECTL=true
|
||||
DEVICE_POWER_LED=false
|
||||
DEVICE_AUDIO_MIXER="Master"
|
||||
DEVICE_PLAYBACK_PATH_SPK="SPK"
|
||||
DEVICE_PLAYBACK_PATH_HP="HP"
|
||||
#DEVICE_HEADPHONE_DEV=""
|
||||
DEVICE_BRIGHTNESS="128"
|
||||
SPLASH_LOADER="imagemagick"
|
||||
UI_SERVICE="emustation.service"
|
||||
|
||||
# Kernel Modules
|
||||
DEVICE_INTERNAL_WIFI=true
|
||||
DEVICE_WIFI_MODULE="8821cs"
|
||||
|
||||
# GPIOS
|
||||
DEVICE_WIFI="0"
|
||||
#DEVICE_LED=""
|
||||
DEVICE_PWM_MOTOR="pwmchip1"
|
||||
#DEVICE_PWM_FAN=""
|
||||
#DEVICE_JACK=""
|
||||
|
||||
# FREQ governors
|
||||
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
|
||||
GPU_FREQ="/sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu"
|
||||
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
|
||||
|
||||
# Volume Keys
|
||||
DEVICE_KEY_VOLUMEDOWN=114
|
||||
DEVICE_KEY_VOLUMEUP=115
|
||||
DEVICE_VOL_MODIFIER="BTN_MODE"
|
||||
EOF
|
146
packages/sysutils/autostart/sources/quirks/Anbernic RG353P/003-audio
Executable file
146
packages/sysutils/autostart/sources/quirks/Anbernic RG353P/003-audio
Executable file
|
@ -0,0 +1,146 @@
|
|||
#!/bin/bash
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
### Set a custom device so we don't clobber it.
|
||||
set-audio set "CUSTOM (UNMANAGED)"
|
||||
set-audio esset "Master"
|
||||
|
||||
cat <<EOF >/storage/.config/asound.conf
|
||||
pcm.!default {
|
||||
type plug
|
||||
slave.pcm "softvol"
|
||||
}
|
||||
|
||||
ctl.!default {
|
||||
type hw
|
||||
card 0
|
||||
}
|
||||
|
||||
pcm.ddmix {
|
||||
ipc_key 1024
|
||||
type dmix
|
||||
slave {
|
||||
pcm "hw:0,0"
|
||||
period_time 0
|
||||
period_size 1024
|
||||
buffer_size 4096
|
||||
rate 44100
|
||||
}
|
||||
}
|
||||
|
||||
pcm.softvol {
|
||||
type softvol
|
||||
slave {
|
||||
pcm "ddmix"
|
||||
}
|
||||
control {
|
||||
name "Master"
|
||||
card 0
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
if [ ! -e "/storage/.config/asound.state" ]
|
||||
then
|
||||
cat <<EOF >/storage/.config/asound.state
|
||||
state.rockchiprk817co {
|
||||
control.1 {
|
||||
iface MIXER
|
||||
name 'Playback Path'
|
||||
value HP
|
||||
comment {
|
||||
access 'read write'
|
||||
type ENUMERATED
|
||||
count 1
|
||||
item.0 OFF
|
||||
item.1 RCV
|
||||
item.2 SPK
|
||||
item.3 HP
|
||||
item.4 HP_NO_MIC
|
||||
item.5 BT
|
||||
item.6 SPK_HP
|
||||
item.7 RING_SPK
|
||||
item.8 RING_HP
|
||||
item.9 RING_HP_NO_MIC
|
||||
item.10 RING_SPK_HP
|
||||
}
|
||||
}
|
||||
control.2 {
|
||||
iface MIXER
|
||||
name 'Capture MIC Path'
|
||||
value 'MIC OFF'
|
||||
comment {
|
||||
access 'read write'
|
||||
type ENUMERATED
|
||||
count 1
|
||||
item.0 'MIC OFF'
|
||||
item.1 'Main Mic'
|
||||
item.2 'Hands Free Mic'
|
||||
item.3 'BT Sco Mic'
|
||||
}
|
||||
}
|
||||
control.3 {
|
||||
iface MIXER
|
||||
name Master
|
||||
value.0 109
|
||||
value.1 109
|
||||
comment {
|
||||
access 'read write user'
|
||||
type INTEGER
|
||||
count 2
|
||||
range '0 - 255'
|
||||
tlv '0000000100000008ffffec1400000014'
|
||||
dbmin -5100
|
||||
dbmax 0
|
||||
dbvalue.0 -2920
|
||||
dbvalue.1 -2920
|
||||
}
|
||||
}
|
||||
}
|
||||
state.rockchiphdmi {
|
||||
control.1 {
|
||||
iface PCM
|
||||
name 'Playback Channel Map'
|
||||
value.0 0
|
||||
value.1 0
|
||||
value.2 0
|
||||
value.3 0
|
||||
value.4 0
|
||||
value.5 0
|
||||
value.6 0
|
||||
value.7 0
|
||||
comment {
|
||||
access read
|
||||
type INTEGER
|
||||
count 8
|
||||
range '0 - 36'
|
||||
}
|
||||
}
|
||||
control.2 {
|
||||
iface PCM
|
||||
name ELD
|
||||
value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
|
||||
comment {
|
||||
access 'read volatile'
|
||||
type BYTES
|
||||
count 128
|
||||
}
|
||||
}
|
||||
control.3 {
|
||||
iface PCM
|
||||
name 'AUDIO MODE'
|
||||
value 0
|
||||
comment {
|
||||
access 'read write volatile'
|
||||
type INTEGER
|
||||
count 1
|
||||
range '0 - 2'
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
alsactl restore -f /storage/.config/asound.state
|
||||
fi
|
|
@ -32,7 +32,7 @@
|
|||
PARTITION_TABLE="gpt"
|
||||
UBOOT_LABEL="uboot"
|
||||
TRUST_LABEL="resource"
|
||||
DEVICE_DTB=("rk3566-rg353p-linux" "rk3566-rg353v-linux" "rk3566-rg503-linux")
|
||||
DEVICE_DTB=("rk3566-rg353p-linux" "rk3566-rg353v-linux" "rk3566-rg353m-linux" "rk3566-rg503-linux")
|
||||
UBOOT_DTB="rk3566"
|
||||
UBOOT_CONFIG="rk3568_defconfig"
|
||||
PKG_SOC="rk356x"
|
||||
|
|
|
@ -26,7 +26,7 @@ case ${DEVICE} in
|
|||
;;
|
||||
RK3566)
|
||||
PKG_URL="${PKG_SITE}/rk356x-kernel.git"
|
||||
PKG_VERSION="8c67ec6ed"
|
||||
PKG_VERSION="3cb426d3e"
|
||||
GET_HANDLER_SUPPORT="git"
|
||||
PKG_GIT_CLONE_BRANCH="main"
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue