From 3dfb784cc1b761d48ceea31781fe5e693e28f987 Mon Sep 17 00:00:00 2001 From: j1nx Date: Fri, 29 Dec 2023 09:49:03 +0000 Subject: [PATCH] [RPI] Add proper ReSpeaker 4-mic square HAT support to i2csound --- .../rootfs-overlay/etc/modprobe.d/bcm2835-alsa.conf | 3 ++- .../rootfs-overlay/usr/libexec/ovos-i2csound | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/buildroot-external/board/ovos/raspberrypi/rootfs-overlay/etc/modprobe.d/bcm2835-alsa.conf b/buildroot-external/board/ovos/raspberrypi/rootfs-overlay/etc/modprobe.d/bcm2835-alsa.conf index bc265c11..a0679d8a 100644 --- a/buildroot-external/board/ovos/raspberrypi/rootfs-overlay/etc/modprobe.d/bcm2835-alsa.conf +++ b/buildroot-external/board/ovos/raspberrypi/rootfs-overlay/etc/modprobe.d/bcm2835-alsa.conf @@ -1,4 +1,5 @@ options snd_soc_simple_card index=0 options snd_soc_rpi_proto index=0 +options snd_soc_seeed_voicecard index=0 options snd_bcm2835 index=1 -options snd slots=snd_soc_simple_card,snd_soc_rpi_proto,snd_bcm2835 +options snd slots=snd_soc_simple_card,snd_soc_rpi_proto,snd_soc_seeed_voicecard,snd_bcm2835 diff --git a/buildroot-external/board/ovos/raspberrypi/rootfs-overlay/usr/libexec/ovos-i2csound b/buildroot-external/board/ovos/raspberrypi/rootfs-overlay/usr/libexec/ovos-i2csound index bc35e7ea..4d7ed263 100755 --- a/buildroot-external/board/ovos/raspberrypi/rootfs-overlay/usr/libexec/ovos-i2csound +++ b/buildroot-external/board/ovos/raspberrypi/rootfs-overlay/usr/libexec/ovos-i2csound @@ -115,6 +115,16 @@ fi if [ "${RESPEAKER6}" == "found" ] && [ "${RESPEAKER4}" != "found" ] ; then echo "Installing and configuring ReSpeaker 4-mic HAT" dtoverlay seeed-4mic-voicecard + echo "Configuring board" + sleep 3 # Allow some time to fully initialise the hardware / driver + amixer -c "seeed4micvoicec" cset numid=1 222 + 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 fi if [ "{$RESPEAKER6}" == "found" ] && [ "${RESPEAKER4}" == "found" ] ; then