first commit
This commit is contained in:
1
external/packages/bsp/rockchip/50-hevc.rules
vendored
Executable file
1
external/packages/bsp/rockchip/50-hevc.rules
vendored
Executable file
@@ -0,0 +1 @@
|
||||
KERNEL=="hevc-service", MODE="0660", GROUP="video"
|
||||
2
external/packages/bsp/rockchip/50-mali.rules
vendored
Executable file
2
external/packages/bsp/rockchip/50-mali.rules
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
KERNEL=="mali0", MODE="0660", GROUP="video"
|
||||
KERNEL=="mali", MODE="0660", GROUP="video"
|
||||
1
external/packages/bsp/rockchip/50-vpu.rules
vendored
Executable file
1
external/packages/bsp/rockchip/50-vpu.rules
vendored
Executable file
@@ -0,0 +1 @@
|
||||
KERNEL=="vpu-service", MODE="0660", GROUP="video"
|
||||
2
external/packages/bsp/rockchip/60-media.rules
vendored
Executable file
2
external/packages/bsp/rockchip/60-media.rules
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
KERNEL=="media*", MODE="0660", GROUP="video"
|
||||
KERNEL=="rga", MODE="0660", GROUP="video"
|
||||
9
external/packages/bsp/rockchip/70-gpio.rules
vendored
Executable file
9
external/packages/bsp/rockchip/70-gpio.rules
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
# Allow group gpio to access gpiomem device
|
||||
SUBSYSTEM=="rk3288-gpiomem", GROUP="gpio", MODE="0660"
|
||||
|
||||
# To allow additional features like edge detection
|
||||
SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
|
||||
chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\
|
||||
chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\
|
||||
chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
|
||||
'"
|
||||
2
external/packages/bsp/rockchip/71-i2c.rules
vendored
Executable file
2
external/packages/bsp/rockchip/71-i2c.rules
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
# Allow i2c group to access i2c devices
|
||||
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
|
||||
1
external/packages/bsp/rockchip/89-pulseaudio-usb.rules
vendored
Executable file
1
external/packages/bsp/rockchip/89-pulseaudio-usb.rules
vendored
Executable file
@@ -0,0 +1 @@
|
||||
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="481a", ENV{PULSE_IGNORE}="1"
|
||||
11
external/packages/bsp/rockchip/ap6330-bluetooth.service
vendored
Executable file
11
external/packages/bsp/rockchip/ap6330-bluetooth.service
vendored
Executable file
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=AP6330 bluetooth support
|
||||
Before=bluetooth.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
RemainAfterExit=Yes
|
||||
ExecStart=/usr/bin/hciattach /dev/ttyS0 bcm43xx 1500000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
88
external/packages/bsp/rockchip/asound.conf
vendored
Executable file
88
external/packages/bsp/rockchip/asound.conf
vendored
Executable file
@@ -0,0 +1,88 @@
|
||||
pcm.OnBoard_D0 {
|
||||
|
||||
type hw
|
||||
card OnBoard
|
||||
device 0
|
||||
|
||||
}
|
||||
|
||||
pcm.OnBoard_D1 {
|
||||
|
||||
type hw
|
||||
card OnBoard
|
||||
device 1
|
||||
|
||||
}
|
||||
|
||||
pcm.OnBoard_D2 {
|
||||
|
||||
type hw
|
||||
card OnBoard
|
||||
device 2
|
||||
|
||||
}
|
||||
|
||||
# Configuration to expose the SPDIF device of RK3288 to ALSA.
|
||||
# The device tree must describe a simple-audio-card device named "SPDIF"
|
||||
# for this to work properly
|
||||
# This percolates to PulseAudio, which will eventually show the proper
|
||||
# labels to the audio device
|
||||
|
||||
<confdir:pcm/iec958.conf>
|
||||
|
||||
cards.SPDIF.pcm.iec958.0 {
|
||||
@args [ CARD AES0 AES1 AES2 AES3 ]
|
||||
@args.CARD {
|
||||
type string
|
||||
}
|
||||
@args.AES0 {
|
||||
type integer
|
||||
}
|
||||
@args.AES1 {
|
||||
type integer
|
||||
}
|
||||
@args.AES2 {
|
||||
type integer
|
||||
}
|
||||
@args.AES3 {
|
||||
type integer
|
||||
}
|
||||
type hw
|
||||
card $CARD
|
||||
|
||||
}
|
||||
|
||||
# Configuration to expose the HDMI device of RK3288 to ALSA.
|
||||
# The device tree must describe a simple-audio-card device named "DW-I2S-HDMI"
|
||||
# for this to work properly
|
||||
# This percolates to PulseAudio, which will eventually show the proper
|
||||
# labels to the audio device
|
||||
|
||||
<confdir:pcm/hdmi.conf>
|
||||
|
||||
cards.DW-I2S-HDMI.pcm.hdmi.0 {
|
||||
@args [ CARD DEVICE CTLINDEX AES0 AES1 AES2 AES3 ]
|
||||
@args.CARD {
|
||||
type string
|
||||
}
|
||||
@args.DEVICE {
|
||||
type integer
|
||||
}
|
||||
@args.CTLINDEX {
|
||||
type integer
|
||||
}
|
||||
@args.AES0 {
|
||||
type integer
|
||||
}
|
||||
@args.AES1 {
|
||||
type integer
|
||||
}
|
||||
@args.AES2 {
|
||||
type integer
|
||||
}
|
||||
@args.AES3 {
|
||||
type integer
|
||||
}
|
||||
type hw
|
||||
card $CARD
|
||||
}
|
||||
15
external/packages/bsp/rockchip/hdmi-hotplug
vendored
Executable file
15
external/packages/bsp/rockchip/hdmi-hotplug
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
USER="$(who | grep :0\) | cut -f 1 -d ' ')"
|
||||
export XAUTHORITY=/home/$USER/.Xauthority
|
||||
export DISPLAY=:0
|
||||
HDMI_STATUS="$(cat /sys/class/drm/card0-HDMI-A-1/status)"
|
||||
|
||||
# Check to see if HDMI connected or not and toggle if change
|
||||
if [ "${HDMI_STATUS}" = connected ]; then
|
||||
xrandr
|
||||
xrandr --output HDMI-1 --auto
|
||||
else
|
||||
xrandr --output HDMI-1 --off
|
||||
fi
|
||||
|
||||
exit 0
|
||||
1
external/packages/bsp/rockchip/hdmi.rules
vendored
Executable file
1
external/packages/bsp/rockchip/hdmi.rules
vendored
Executable file
@@ -0,0 +1 @@
|
||||
SUBSYSTEM=="drm", ACTION=="change", RUN+="/usr/local/bin/hdmi-hotplug"
|
||||
8
external/packages/bsp/rockchip/pulseaudio.txt
vendored
Executable file
8
external/packages/bsp/rockchip/pulseaudio.txt
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
#load-module module-alsa-sink
|
||||
load-module module-alsa-sink device=OnBoard_D0 sink_properties=device.description="BT_VOIP-Output"
|
||||
load-module module-alsa-sink device=OnBoard_D1 sink_properties=device.description="SPDIF-Output"
|
||||
load-module module-alsa-sink device=OnBoard_D2 sink_properties=device.description="Headset-Output"
|
||||
#load-module module-alsa-source device=hw:1,0
|
||||
load-module module-alsa-source device=OnBoard_D0 source_properties=device.description="BT_VOIP-Input"
|
||||
load-module module-alsa-source device=OnBoard_D1 source_properties=device.description="Headset-Input"
|
||||
|
||||
BIN
external/packages/bsp/rockchip/rtk_hciattach
vendored
Executable file
BIN
external/packages/bsp/rockchip/rtk_hciattach
vendored
Executable file
Binary file not shown.
51
external/packages/bsp/rockchip/start_bt.sh
vendored
Executable file
51
external/packages/bsp/rockchip/start_bt.sh
vendored
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
|
||||
GPIO_CONFIGURED_CHECK_DIRECTORY="/var/run/rtk_bt"
|
||||
GPIO_CONFIGURED_CHECK_FILE="/var/run/rtk_bt/gpio_configured"
|
||||
|
||||
function die_on_error {
|
||||
if [ ! $? = 0 ]; then
|
||||
echo $1
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Kill any rtk_hciattach actually running.
|
||||
# Do not complain if we didn't kill anything.
|
||||
killall -q -SIGTERM rtk_hciattach
|
||||
|
||||
# If the GPIO are not yet configured
|
||||
if [ ! -f "$GPIO_CONFIGURED_CHECK_FILE" ];
|
||||
then
|
||||
# We'll create the directory first
|
||||
# So that, if the user is not root
|
||||
# he'll get a user permission error
|
||||
mkdir -p "$GPIO_CONFIGURED_CHECK_DIRECTORY" || die_on_error "Could not create$GPIO_CONFIGURED_CHECK_DIRECTORY"
|
||||
|
||||
echo 146 > /sys/class/gpio/export
|
||||
echo 149 > /sys/class/gpio/export
|
||||
echo 151 > /sys/class/gpio/export
|
||||
echo high > /sys/class/gpio/gpio146/direction
|
||||
echo high > /sys/class/gpio/gpio149/direction
|
||||
echo high > /sys/class/gpio/gpio151/direction
|
||||
|
||||
echo 1 > $GPIO_CONFIGURED_CHECK_FILE || die_on_error "Could not write to $GPIO_CONFIGURED_CHECK_FILE !"
|
||||
fi
|
||||
|
||||
# If you run the rtk_hciattach once
|
||||
# you cannot run it again before`
|
||||
# resetting the device.
|
||||
# Since resetting the device before
|
||||
# the first launch generates no issue,
|
||||
# we always reset the device.
|
||||
|
||||
echo "Resetting the Bluetooth chip"
|
||||
echo 0 > /sys/class/gpio/gpio149/value &&
|
||||
echo -e "\tBluetooth chip power down..." &&
|
||||
sleep 1 &&
|
||||
echo 1 > /sys/class/gpio/gpio149/value &&
|
||||
echo -e "\tBluetooth chip power up..." &&
|
||||
sleep 1
|
||||
echo -e "\tResetting done"
|
||||
|
||||
/usr/bin/rtk_hciattach -n -s 115200 /dev/ttyS0 rtk_h5 || die_on_error "Could not create hci0 through rtk_hciattach"
|
||||
11
external/packages/bsp/rockchip/tinker-bluetooth.service
vendored
Executable file
11
external/packages/bsp/rockchip/tinker-bluetooth.service
vendored
Executable file
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Realtek H5 bluetooth support
|
||||
Before=bluetooth.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/sbin/rfkill unblock all
|
||||
ExecStart=/bin/bash /usr/local/bin/start_bt.sh
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user