MycroftOS: Update and re-enable the ReSpeaker drivers.

This commit is contained in:
j1nx 2020-08-27 13:13:42 +02:00
parent 26b3575045
commit e2e3f52d30
4 changed files with 12 additions and 27 deletions

View File

@ -367,8 +367,6 @@ BR2_PACKAGE_LIBSVG_CAIRO=y
BR2_PACKAGE_OPENJPEG=y
BR2_PACKAGE_TIFF=y
BR2_PACKAGE_WAFFLE=y
BR2_PACKAGE_DTC=y
BR2_PACKAGE_DTC_PROGRAMS=y
BR2_PACKAGE_LIBCEC=y
BR2_PACKAGE_LIBV4L=y
BR2_PACKAGE_LIBV4L_UTILS=y
@ -503,6 +501,7 @@ BR2_PACKAGE_KF5_PLASMA_NANO=y
BR2_PACKAGE_LIBRE=y
BR2_PACKAGE_LIBREM=y
BR2_PACKAGE_LOTTIE_QML=y
BR2_PACKAGE_RESPEAKER=y
BR2_PACKAGE_SNAPCAST=y
BR2_PACKAGE_SNAPCAST_SERVER=y
BR2_PACKAGE_SPOTIFYD=y

View File

@ -1,3 +1,2 @@
# Locally computed
sha256 33f09b7c3d3081b2a24c22924a4d5d0e4742a27f0b6f5b1f82a705394fb40281 respeaker-6b4133b5f056fd0218f3ffd197df45fab2ae1ef7.tar.gz
sha256 8983433ff7b1e685a9818662de8e5d77a9650c2373bcf3dc1ead9be24f1f108b respeaker-0ed11aa9a4b4c627ed98620026b23f8bb86afd5a.tar.gz
sha256 054a0a2cf4c958ad699fd555e00fda3437a4399844043c2a1b6390b51a9d9956 respeaker-89f8a766469d049833c5fac749c3fde9e3943b3e.tar.gz

View File

@ -4,7 +4,7 @@
#
################################################################################
RESPEAKER_VERSION = 0ed11aa9a4b4c627ed98620026b23f8bb86afd5a
RESPEAKER_VERSION = 89f8a766469d049833c5fac749c3fde9e3943b3e
RESPEAKER_SITE = $(call github,HinTak,seeed-voicecard,$(RESPEAKER_VERSION))
RESPEAKER_LICENSE = GNU General Public License v3.0
RESPEAKER_DEPENDENCIES = rpi-firmware dtc
@ -24,9 +24,9 @@ define RESPEAKER_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/respeaker/seeed-voicecard \
$(TARGET_DIR)/usr/bin
$(INSTALL) -D -m 0644 $(@D)/seeed-2mic-voicecard.dtbo $(BINARIES_DIR)/rpi-firmware/overlays/
$(INSTALL) -D -m 0644 $(@D)/seeed-4mic-voicecard.dtbo $(BINARIES_DIR)/rpi-firmware/overlays/
$(INSTALL) -D -m 0644 $(@D)/seeed-8mic-voicecard.dtbo $(BINARIES_DIR)/rpi-firmware/overlays/
$(INSTALL) -D -m 0644 $(@D)/seeed-2mic-voicecard.dtbo $(BINARIES_DIR)/overlays/
$(INSTALL) -D -m 0644 $(@D)/seeed-4mic-voicecard.dtbo $(BINARIES_DIR)/overlays/
$(INSTALL) -D -m 0644 $(@D)/seeed-8mic-voicecard.dtbo $(BINARIES_DIR)/overlays/
mkdir -p $(TARGET_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/
$(INSTALL) -D -m 0644 $(@D)/pulseaudio/pulse_config_4mic/seeed-voicecard.conf \

View File

@ -23,26 +23,13 @@
set -x
exec 1>/var/log/$(basename $0).log 2>&1
OVERLAYS=/boot/overlays
#enable i2c interface
dtparam i2c_arm=on
dtparam -d $OVERLAYS i2c_arm=on
modprobe i2c-dev
#enable spi interface
dtparam spi=on
_VER_RUN=
function get_kernel_version() {
local ZIMAGE IMG_OFFSET
_VER_RUN=""
[ -z "$_VER_RUN" ] && {
ZIMAGE=/boot/kernel.img
IMG_OFFSET=$(LC_ALL=C grep -abo $'\x1f\x8b\x08\x00' $ZIMAGE | head -n 1 | cut -d ':' -f 1)
_VER_RUN=$(dd if=$ZIMAGE obs=64K ibs=4 skip=$(( IMG_OFFSET / 4)) | zcat | grep -a -m1 "Linux version" | strings | awk '{ print $3; }')
}
echo "$_VER_RUN"
return 0
}
dtparam -d $OVERLAYS spi=on
CONFIG=/boot/config.txt
get_overlay() {
@ -119,12 +106,12 @@ if [ "$overlay" ]; then
rm /etc/pulse/system.pa
rm /etc/pulse/daemon.conf
kernel_ver=$(get_kernel_version)
kernel_ver=$(uname -r)
# echo kernel_ver=$kernel_ver
# TODO: dynamic dtoverlay Bug of v4.19.x
# no DT node phandle inserted.
if [[ "$kernel_ver" =~ ^4\.19.*$ ]]; then
if [[ "$kernel_ver" =~ ^4\.19.*$ || "$kernel_ver" =~ ^5\.*$ ]]; then
for i in $RPI_HATS; do
if [ "$i" == "$overlay" ]; then
do_overlay $overlay 0
@ -135,7 +122,7 @@ if [ "$overlay" ]; then
done
fi
#make sure the driver loads correctly
dtoverlay $overlay || true
dtoverlay -d $OVERLAYS $overlay || true
#install soundstate
echo "create $overlay asound status file"