Add Powkiddy RK2023 quirks.
This commit is contained in:
parent
6f221d08be
commit
2f04da6d5a
4 changed files with 212 additions and 0 deletions
11
packages/sysutils/autostart/sources/quirks/Powkiddy RK2023/001-hardwareinit
Executable file
11
packages/sysutils/autostart/sources/quirks/Powkiddy RK2023/001-hardwareinit
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||||
|
|
||||||
|
. /etc/profile
|
||||||
|
|
||||||
|
cat <<EOF >/storage/.config/sleep.conf.d/sleep.conf
|
||||||
|
[Sleep]
|
||||||
|
AllowSuspend=yes
|
||||||
|
SuspendState=freeze
|
||||||
|
EOF
|
39
packages/sysutils/autostart/sources/quirks/Powkiddy RK2023/002-deviceconfig
Executable file
39
packages/sysutils/autostart/sources/quirks/Powkiddy RK2023/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/Powkiddy RK2023/003-audio
Executable file
146
packages/sysutils/autostart/sources/quirks/Powkiddy RK2023/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
|
16
packages/sysutils/autostart/sources/quirks/Powkiddy RK2023/004-display
Executable file
16
packages/sysutils/autostart/sources/quirks/Powkiddy RK2023/004-display
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||||
|
|
||||||
|
. /etc/profile
|
||||||
|
|
||||||
|
# Configure default contrast saturation and hue values
|
||||||
|
for PROPERTY in brightness contrast saturation hue
|
||||||
|
do
|
||||||
|
MYVAL=$(get_setting display.${PROPERTY})
|
||||||
|
if [ -z "${MYVAL}" ]
|
||||||
|
then
|
||||||
|
MYVAL=$(drm_tool list | sed -n '/Connector: 133/,$p' | awk '/'${PROPERTY}'/ {print $5}')
|
||||||
|
fi
|
||||||
|
display ${PROPERTY} ${MYVAL}
|
||||||
|
done
|
Loading…
Reference in a new issue