MATRIX Voice/Creator Using ODAS

I’m trying to follow the instructions at https://www.hackster.io/matrix-labs/direction-of-arrival-for-matrix-voice-creator-using-odas-b7a15b.
First problem.
Current Linux kernel raspberrypi 5.4.51-v7+ #1326 SMP Fri Jul 17 10:45:25 BST 2020 armv7l GNU/Linux.
And the current matrixio-kernel-modules are not built.
I fixed it.
SND_SOC_DAILINK_DEFS(hifi_in,
DAILINK_COMP_ARRAY(COMP_CPU(“matrixio-mic.0”)),
DAILINK_COMP_ARRAY(COMP_CODEC(“snd-soc-dummy”, “snd-soc-dummy-dai”)),
DAILINK_COMP_ARRAY(COMP_PLATFORM(“matrixio-mic”));

SND_SOC_DAILINK_DEFS(hifi_out,
DAILINK_COMP_ARRAY(COMP_CPU(“matrixio-pcm-out.0”)),
DAILINK_COMP_ARRAY(COMP_CODEC(“snd-soc-dummy”, “snd-soc-dummy-dai”)),
DAILINK_COMP_ARRAY(COMP_PLATFORM(“matrixio-playback”)));

static struct snd_soc_dai_link matrixio_snd_soc_dai[] = {
{
.name = “matrixio.mic.0”,
.stream_name = “matrixio.mic.0”,
SND_SOC_DAILINK_REG(hifi_in),
// .codec_dai_name = “snd-soc-dummy-dai”,
// .cpu_dai_name = “matrixio-mic.0”,
// .platform_name = “matrixio-mic”,
// .codec_name = “snd-soc-dummy”,
},
{
.name = “matrixio.pcm-out.0”,
.stream_name = “matrixio.pcm-out.0”,
SND_SOC_DAILINK_REG(hifi_out),
// .codecs.codec_dai_name = “snd-soc-dummy-dai”,
// .cpu_dai_name = “matrixio-pcm-out.0”,
// .platform_name = “matrixio-playback”,
// .codec_name = “snd-soc-dummy”,
}};
After that the module is built and loaded. But there’s no certainty that that’s right.

After rebooting.
and assembly of yc/add-matrix-demo. I get this result.
./matrix-odas &
pi@raspberrypi:~/odas/bin INFO: [/dev/matrixio_regmap] was opened MATRIX device has not been detected pi@raspberrypi:~/odas/bin arecord -l
**** List of CAPTURE Hardware Devices ****
card 2: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 3: MATRIXIOSOUND [MATRIXIO-SOUND], device 0: matrixio.mic.0 snd-soc-dummy-dai-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

Hi @Dmitriy,

Welcome to the community!

Your Linux kernel seems bleeding-edge, did you by any chance run rpi-update? This is a dangerous command that will take you to the pre-release versions of RPi software that are usually still in development and not guaranteed to work.

The latest stable RPi Linux kernel version is 4.19 and our kernel modules are built to work with this. Our software isn’t built for kernel versions beyond that yet so I would recommend flashing a new SD card so you can roll-back to the latest stable kernel.

Best,
Samreen

Hi, @Samreen
I downloaded last version image raspberry.This version does not contain the HEADERS 4.9 versions. *. After the steps of the APT Update and Apt Upgrade, the operating system is loaded with a kernel 5.4.
If I deleted matrixio.dto in file /boot/config, run reboot. I will have connect with fpga, but Alsa does not find MATRIXIOSOUND.

Hello.
I got the February raspberry image.
And after commnd: ```
sudo apt install matrixio-kernel-modules
I have result:
pi@raspberrypi:~ sudo apt install matrixio-kernel-modules Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: dkms raspberrypi-kernel-headers Suggested packages: python3-apport menu The following NEW packages will be installed: dkms matrixio-kernel-modules raspberrypi-kernel-headers 0 upgraded, 3 newly installed, 0 to remove and 218 not upgraded. Need to get 26.3 MB of archives. After this operation, 171 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200717-1 [26.2 MB] Get:2 http://mirror.yandex.ru/mirrors/raspbian/raspbian buster/main armhf dkms all 2.6.1-4 [74.4 kB] Get:3 https://apt.matrix.one/raspbian buster/main armhf matrixio-kernel-modules all 0.2.3 [20.6 kB] Fetched 26.3 MB in 41s (647 kB/s) Selecting previously unselected package dkms. (Reading database ... 154776 files and directories currently installed.) Preparing to unpack .../archives/dkms_2.6.1-4_all.deb ... Unpacking dkms (2.6.1-4) ... Selecting previously unselected package raspberrypi-kernel-headers. Preparing to unpack .../raspberrypi-kernel-headers_1.20200717-1_armhf.deb ... Unpacking raspberrypi-kernel-headers (1.20200717-1) ... Selecting previously unselected package matrixio-kernel-modules. Preparing to unpack .../matrixio-kernel-modules_0.2.3_all.deb ... Unpacking matrixio-kernel-modules (0.2.3) ... Setting up dkms (2.6.1-4) ... Setting up raspberrypi-kernel-headers (1.20200717-1) ... run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51+ run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v7+ run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v7l+ run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v8+ Setting up matrixio-kernel-modules (0.2.3) ... Loading new matrixio-kernel-modules-0.2.3 DKMS files... It is likely that 4.19.97-v7+ belongs to a chroot's host Building for 4.19.97+, 4.19.97-v7+, 4.19.97-v7l+, 4.19.97-v8+, 5.4.51+, 5.4.51-v7+ and 5.4.51-v7l+ Module build for kernel 4.19.97+ was skipped since the kernel headers for this kernel does not seem to be installed. Module build for kernel 4.19.97-v7+ was skipped since the kernel headers for this kernel does not seem to be installed. Module build for kernel 4.19.97-v7l+ was skipped since the kernel headers for this kernel does not seem to be installed. Module build for kernel 4.19.97-v8+ was skipped since the kernel headers for this kernel does not seem to be installed. Building initial module for 5.4.51+ Error! Bad return status for module build on kernel: 5.4.51+ (armv7l) Consult /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/make.log for more information. dpkg: error processing package matrixio-kernel-modules (--configure): installed matrixio-kernel-modules package post-installation script subprocess returned error exit status 10 Processing triggers for man-db (2.8.5-2) ... Errors were encountered while processing: matrixio-kernel-modules E: Sub-process /usr/bin/dpkg returned an error code (1) pi@raspberrypi:~ ls -a /usr/src/
. … linux-headers-5.4.51+ linux-headers-5.4.51-v7+ linux-headers-5.4.51-v7l+ matrixio-kernel-modules-0.2.3 sense-hat
pi@raspberrypi:~ $

@Dmitriy,

It seems like the Linux kernel 5.4 update is causing some issue with our kernel modules. We are investigating and will update the code soon.

In the meantime, one of the community members tried downgrading to 4.19 kernel as a workaround, see here. I will test and post the workaround shortly but you can try it if you’d like.

Best,
Samreen