onsdag 9 oktober 2024

Seeed Respeaker HAT support for Raspberry Pi 5

Guide: Seeed ReSpeaker HAT on Raspberry, latest kernel as of October 2024.

Background
I post this because I can't find anyone who have documented a current working solution for RPi 4 or 5 (as of October 2024) for the latest kernel. The installations are known for not working anymore when new kernels and updates are released.

This guide regards 2-mic, 4-mic and 6-mic card configurations.

Seeed, the manufacturer ended their support to these cards for Raspberry years ago but still sell the cards. 

Status 
This project is still experimental. I've done tests by reflashing the OS and installed. Every time I had to reboot and install again for the audio to work. 

For who? 
Potentially for all Raspberry Pi versions with the latest kernel installed and fully updated. 

What does it do?
It expands on HinTak's work with the explicit aim of supporting current shipping Raspbian/Ubuntu kernels without requiring downgrading. 
A expanded installation script has been added which calls the HinTak's installation script as a step in the process.

This script expands on the original installation script. It performs several tasks to ensure proper installation and compatibility with updated kernel versions. Here's a summary of what the script does:

  1. Checks for root privileges and sufficient space on the /boot volume.
  2. Verifies that the system is ARM/Raspberry Pi related by checking for specific directories and commands.
  3. Checks and potentially updates kernel headers to match the running kernel version.
  4. Updates and installs required packages, including kernel headers, gcc, git, and audio-related tools.
  5. Installs a kernel module named "seeed-voicecard" using DKMS (Dynamic Kernel Module Support) to ensure it works across kernel updates.
  6. Copies device tree overlay files (.dtbo) for different microphone configurations to the appropriate directory.
  7. Removes an old ALSA plugin and updates kernel module configurations.
  8. Modifies the boot configuration file to enable I2C and I2S interfaces.
  9. Installs configuration files for the voice card in /etc/voicecard.
  10. Sets up a Git repository in /etc/voicecard to track configuration changes.
  11. Installs a systemd service for the voice card and enables it to start on boot.
  12. Provides instructions for the user to reboot the system to apply all settings.

This script aims to provide a more robust installation process that adapts to potential kernel version mismatches and ensures all necessary components are in place for the voice card to function properly on a Raspberry Pi system.

What works? 
ALSA I/O has been tested and seems to be working. You can test yourself from the menu after installing, as the menu provides a section dedicated to audio and from here you can run suitable commands to show information and execute tests. Note that it is still experimental you're encouraged to do tests manually too by for example looking them up with an AI search engine like Perplexity.

PulseAudio
PulseAudio is not installed by default even though there's still a folder from reaspeaker's original repository. You can install it through the menu system.

PulseAudio is not tested. This is tested on 2-mic voicecard.

Link to fork on Github where you can read more and install it with the help of the guide: https://github.com/Wartem/seeed-voicecard

Inga kommentarer:

Skicka en kommentar