[All] More bumps and fixes all over the codebase to get back into shape

This commit is contained in:
j1nx 2024-04-23 09:46:11 +00:00
parent 33ccd95215
commit de12e1cda8
9 changed files with 93 additions and 73 deletions

@ -1 +1 @@
Subproject commit 2ea8cb5076fa06c656096868b9e18fbd2ff52c70
Subproject commit 45464c7c1a5b15493545bd784629440f1db7d381

View File

@ -93,7 +93,6 @@ menu "KDE Framework and Plasma"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/kf5-threadweaver/Config.in"
endmenu
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/ksm-preload/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/libgpiod2/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/libre/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/librem/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/lottie-qml/Config.in"

View File

@ -3,9 +3,9 @@ ACTION!="change", GOTO="vocalfusion_end"
KERNEL!="card*", GOTO="vocalfusion_end"
# PulseAudio profile sets
ATTR{id}=="sndxmosvocalfus",ENV{PULSE_PROFILE_SET}="xvf3510.conf"
ATTR{id}=="sj201",ENV{PULSE_PROFILE_SET}="sj201.conf"
# ALSA profile sets
ATTR{id}=="sndxmosvocalfus",ENV{ACP_PROFILE_SET}="xvf3510.conf"
ATTR{id}=="sj201",ENV{ACP_PROFILE_SET}="sj201.conf"
LABEL="vocalfusion_end"

View File

@ -15,6 +15,15 @@
# limitations under the License.
##########################################################################
# Define a list of valid boards
declare -A boards=(
[RPI3]="Pi 3"
[RPI4]="Pi 4"
[RPI5]="Pi 5"
)
declare board_result
# Define a list of device names and their I2C addresses
declare -A devices=(
[WM8XXX]=1a
@ -38,8 +47,23 @@ detect_i2c_device() {
fi
}
# Gets the board version
get_board_version() {
v=$(tr -d '\0' </proc/device-tree/model)
for board in "${!boards[@]}"; do
b="${boards[$board]}"
if [[ $v =~ "$b" ]]; then
board_result="$board"
break # Exit the loop once the match is found.
fi
done
}
# Main execution
main() {
get_board_version
# Detecting I2C devices
for device in "${!devices[@]}"; do
address="${devices[$device]}"
@ -89,6 +113,8 @@ main() {
amixer -c "wm8960soundcard" cset numid=54 on
amixer -c "wm8960soundcard" cset numid=16 5
amixer -c "wm8960soundcard" cset numid=15 4
amixer -c "wm8960soundcard" cset numid=11 120,120
amixer -c "wm8960soundcard" cset numid=13 120,120
echo "Configuring button"
dtoverlay wm8960-button-overlay
fi
@ -119,10 +145,17 @@ main() {
amixer -c "seeed4micvoicec" cset numid=2 222
amixer -c "seeed4micvoicec" cset numid=3 222
amixer -c "seeed4micvoicec" cset numid=4 222
amixer -c "seeed4micvoicec" cset numid=5 13
amixer -c "seeed4micvoicec" cset numid=6 13
amixer -c "seeed4micvoicec" cset numid=7 13
amixer -c "seeed4micvoicec" cset numid=8 13
if [[ $board_result == "RPI3" ]]; then
amixer -c "seeed4micvoicec" cset numid=5 3
amixer -c "seeed4micvoicec" cset numid=6 3
amixer -c "seeed4micvoicec" cset numid=7 3
amixer -c "seeed4micvoicec" cset numid=8 3
else
amixer -c "seeed4micvoicec" cset numid=5 13
amixer -c "seeed4micvoicec" cset numid=6 13
amixer -c "seeed4micvoicec" cset numid=7 13
amixer -c "seeed4micvoicec" cset numid=8 13
fi
fi
if [[ ${detection_results[RESPEAKER6]} == true ]] && [[ ${detection_results[RESPEAKER4]} == true ]] ; then
@ -156,7 +189,15 @@ main() {
if [[ ${detection_results[TAS5806]} == true ]] ; then
echo "Installing and configuring SJ-201 HAT"
# Initializing XMOS xvf3510 based SJ-201 HAT
dtoverlay xvf3510
if [[ "$board_result" == "RPI5" ]]; then
dtoverlay sj201-pi5
else
dtoverlay sj201
echo "Configuring board"
sleep 3 # Allow some time to fully initialise the hardware / driver
gpioset -z -c gpiochip0 -C sj201_pwr 16=1
gpioset -z -c gpiochip0 -C sj201_rst 27=1
fi
xvf3510-flash --direct "/usr/lib/firmware/xvf3510/app_xvf3510_int_spi_boot_v4_1_0.bin"
# Initializing Texas Instruments 5806 Amplifier
/usr/bin/tas5806-init
@ -168,15 +209,53 @@ main() {
/usr/sbin/i2cset -a -y 1 0x04 101 30 i
else
echo "Assume revision-10 SJ-201 board"
#dtoverlay sj201-rev10-pwm-fan-overlay
if [[ "$board_result" == "RPI5" ]]; then
dtoverlay sj201-rev10-pwm-fan-overlay-pi5
else
dtoverlay sj201-rev10-pwm-fan-overlay
fi
fi
echo "Configuring buttons"
#dtoverlay sj201-buttons-overlay
if [[ "$board_result" == "RPI5" ]]; then
dtoverlay sj201-buttons-overlay-pi5
else
dtoverlay sj201-buttons-overlay
fi
fi
if [[ ${detection_results[AIYVOICEBONNET]} == true ]] ; then
echo "Installing and configuring AIY VoiceBonnet"
# TODO by someone that has that HAT
dtoverlay aiy-voicebonnet
echo "Configuring board"
sleep 3 # Allow some time to fully initialise the hardware / driver
amixer -c "aiyvoicebonnet" cset numid=10 80,80
amixer -c "aiyvoicebonnet" cset numid=58 on
amixer -c "aiyvoicebonnet" cset numid=60 on
amixer -c "aiyvoicebonnet" cset numid=65 on
amixer -c "aiyvoicebonnet" cset numid=67 on
amixer -c "aiyvoicebonnet" cset numid=101 on
amixer -c "aiyvoicebonnet" cset numid=105 on
amixer -c "aiyvoicebonnet" cset numid=109 on
amixer -c "aiyvoicebonnet" cset numid=110 on
amixer -c "aiyvoicebonnet" cset numid=116 on
amixer -c "aiyvoicebonnet" cset numid=25 on
amixer -c "aiyvoicebonnet" cset numid=5 75
amixer -c "aiyvoicebonnet" cset numid=83 on
amixer -c "aiyvoicebonnet" cset numid=87 on
amixer -c "aiyvoicebonnet" cset numid=99 on
amixer -c "aiyvoicebonnet" cset numid=100 on
amixer -c "aiyvoicebonnet" cset numid=112 on
amixer -c "aiyvoicebonnet" cset numid=114 on
amixer -c "aiyvoicebonnet" cset numid=26 on
amixer -c "aiyvoicebonnet" cset numid=1 on
amixer -c "aiyvoicebonnet" cset numid=2 75
amixer -c "aiyvoicebonnet" cset numid=16 65,65
amixer -c "aiyvoicebonnet" cset numid=19 1,1
amixer -c "aiyvoicebonnet" cset numid=31 on
amixer -c "aiyvoicebonnet" cset numid=35 on
amixer -c "aiyvoicebonnet" cset numid=47 on
amixer -c "aiyvoicebonnet" cset numid=49 on
amixer -c "aiyvoicebonnet" cset numid=27 on
fi
}

View File

@ -1,6 +1,8 @@
BR2_aarch64=y
BR2_cortex_a72=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
BR2_DL_DIR="../../downloads"
BR2_CCACHE=y
BR2_CCACHE_DIR="ccache"
@ -109,6 +111,7 @@ BR2_PACKAGE_SQUASHFS_XZ=y
BR2_PACKAGE_SQUASHFS_ZSTD=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y
BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI=y
BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI_BT=y

View File

@ -1,27 +0,0 @@
config BR2_PACKAGE_LIBGPIOD2
bool "libgpiod2"
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10
depends on !BR2_PACKAGE_LIBGPIOD
help
This is a C library that abstracts the GPIO character
device operations on linux.
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/
This package is the continuation of the libgpiod package
for versions 2.0 and above.
Note that a kernel of 5.10 or above is required for the
ioctls to work.
if BR2_PACKAGE_LIBGPIOD2
config BR2_PACKAGE_LIBGPIOD2_TOOLS
bool "install tools"
help
Include a set of command-line tools for managing GPIOs.
endif
comment "Consider upgrading to libgpiod2"
depends on BR2_PACKAGE_LIBGPIOD

View File

@ -1,4 +0,0 @@
# From https://www.kernel.org/pub/software/libs/libgpiod/sha256sums.asc
sha256 fa4024a080121c958502f9a46a5bda44bea85e7a4dd7fcb3dead463b6fc4261c libgpiod-2.1.tar.xz
# Hash for license file
sha256 eb17a56966db5d986bec449ee44ed61f01f9e3fafa952e527db67a8f9594fd11 COPYING

View File

@ -1,30 +0,0 @@
################################################################################
#
# libgpiod2
#
################################################################################
# Be careful when bumping versions.
# Dependency on kernel header versions may change.
LIBGPIOD2_VERSION = 2.1
LIBGPIOD2_SOURCE = libgpiod-$(LIBGPIOD2_VERSION).tar.xz
LIBGPIOD2_SITE = https://www.kernel.org/pub/software/libs/libgpiod
LIBGPIOD2_LICENSE = LGPL-2.1+
LIBGPIOD2_LICENSE_FILES = COPYING
LIBGPIOD2_INSTALL_STAGING = YES
LIBGPIOD2_DEPENDENCIES = host-pkgconf host-autoconf-archive
LIBGPIOD2_CONF_OPTS = --disable-tests --disable-examples --disable-bindings-python
ifeq ($(BR2_PACKAGE_LIBGPIOD2_TOOLS),y)
LIBGPIOD2_CONF_OPTS += --enable-tools
else
LIBGPIOD2_CONF_OPTS += --disable-tools
endif
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
LIBGPIOD2_CONF_OPTS += --enable-bindings-cxx
else
LIBGPIOD2_CONF_OPTS += --disable-bindings-cxx
endif
$(eval $(autotools-package))