Can not install matrixio-kernel-modules

sudo apt-get install matrixio-kernel-modules

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
matrixio-kernel-modules
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/20.6 kB of archives.
After this operation, 115 kB of additional disk space will be used.
Selecting previously unselected package matrixio-kernel-modules.
(Reading database … 211908 files and directories currently installed.)
Preparing to unpack …/matrixio-kernel-modules_0.2.3_all.deb …
Unpacking matrixio-kernel-modules (0.2.3) …
Setting up matrixio-kernel-modules (0.2.3) …
Loading new matrixio-kernel-modules-0.2.3 DKMS files…
It is likely that 5.4.51-v7l+ belongs to a chroot’s host
Building for 5.4.51+, 5.4.51-v7+, 5.4.51-v7l+ and 5.4.51-v8+
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
Errors were encountered while processing:
matrixio-kernel-modules
E: Sub-process /usr/bin/dpkg returned an error code (1)

Can somebody help please?

uname -a
Linux raspberrypi 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l GNU/Linux

in logs:
cat /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/make.log
DKMS make.log for matrixio-kernel-modules-0.2.3 for kernel 5.4.51+ (armv7l)
Wed 29 Jul 2020 04:19:43 PM CEST
make: Entering directory ‘/usr/src/linux-headers-5.4.51+’
AR /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/built-in.a
CC [M] /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-core.o
CC [M] /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-uart.o
CC [M] /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-everloop.o
CC [M] /var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.o
/var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:34:3: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_dai_name’; did you mean ‘stream_name’?
.codec_dai_name = “snd-soc-dummy-dai”,
^~~~~~~~~~~~~~
stream_name
/var/lib/dkms/matrixio-kernel-modules/0.2.3/build/matrixio-codec.c:34:20: error: initialization of ‘struct snd_soc_dai_link_component *’ from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types]
.codec_dai_name = “snd-soc-dummy-dai”,

Hi @leo,

Welcome to the community!

A Linux kernel update to 5.4 has broken our MATRIX kernel modules. Our engineers are working on it.

In the meantime, try this workaround.

Best,
Samreen

thank you that helped to solve described above issue, but there is now another issue

when: I try
arecord recording.wav -f S16_LE -r 16000 -d 5

I get:
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM input
arecord: main:828: audio open error: No such file or directory

what should I do with it?

@leo,

The kernel issue has now been resolved, so you can try reverting to the newest Linux kernels and re-install the latest MATRIX kernel modules to try again. Steps here.

For errors like this, you should:

  • Check that the MATRIX packages are properly installed
dpkg -l | grep matrix
  • Check if MATRIX microphones have registered in ALSA
arecord -l

Let me know how it goes. You can send screenshots here for us to troubleshoot together. It might be worth updating everything with the latest versions and trying again though.

Best,
Samreen

$ dpkg -l | grep matrix
ii libmatrixio-creator-hal:armhf 0.3.8 armhf Hardware Abstraction Layer for MATRIX.
ii libmatrixio-creator-hal-dev 0.3.8 armhf Hardware Abstraction Layer for MATRIX (headers)
ii libswresample3:armhf 7:4.1.6-1~deb10u1+rpt1 armhf FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii matrixio-creator-init 0.4.17 armhf Install scripts that can program the MATRIX Creator FPGA and SAM3 IMU.
ii matrixio-kernel-modules 0.2.4 all Source DKMS for MATRIXIO kernel modules.
ii matrixio-openocd 1.0.1.002 armhf Open on-chip JTAG debug solution for ARM and MIPS systems
ii matrixio-xc3sprog 1.1.1.003 armhf Spartan3, XCF and CPLD JTAG programmer and other utilities.

$ 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

by the way I could record audio when I added --device option like that:
arecord --device=hw:MATRIXIOSOUND -r 16000 -c 1 -f S16_LE test.wav -d 5

in addition when I used js module - I finally could record audio only after providing the device option. I could not find any documentation which options are supported and just wrote like this:
var mic = matrix.alsa.mic({ // or configure settings
device: ‘hw:MATRIXIOSOUND’,
rate: ‘16000’,
debug: true,
exitOnSilence: 6,
// up to 8 channels
channels: ‘1’
});

I think it might be useful for your documentation if someone faces the same problem

but how could I set this card as number 2?
is it possible to set a device in odas? (I want to try this: https://www.hackster.io/matrix-labs/direction-of-arrival-for-matrix-voice-creator-using-odas-b7a15b but it doesn’t work probably because of default device)

Update
found that we can configure the device here https://www.npmjs.com/package/mic

thanks to this article I found solution

I modified the file ~/.asoundrc
it was:

pcm.!default {
  type asym
  playback.pcm {
    type plug
    slave.pcm "output"
  }
  capture.pcm {
    type plug
    slave.pcm "input"
  }
}
pcm.output {
	type hw
	card 1
}
ctl.!default {
	type hw
	card 1
}

and now:

pcm.!default {
  type asym
  capture.pcm "mic"
  playback.pcm {
    type plug
    slave.pcm "output"
  }
}
pcm.output {
	type hw
	card 1
}

but when I call
./matrix-odas & ./odaslive -vc ../config/matrix-demo/matrix_creator.cfg

it still gives

[1] 2699
+--------------------------------------------+
|    ODAS (Open embeddeD Audition System)    |
+--------------------------------------------+
| Author:  Francois Grondin                  |
| Email:   francois.grondin2@usherbrooke.ca  |
| Website: introlab.3it.usherbrooke.ca       |
| Version: 1.0                               |
+--------------------------------------------+
| + Initializing configurations...... INFO: [/dev/matrixio_regmap] was opened
Binding socket........... [OK]
Listening socket......... [OK]
Waiting for connection in port 9001 ... [Done] |
| + Initializing objects............. [Done] |
| + Launch threads................... [OK]
Receiving data........... 

[Done] |
| + Threads running.................. Source hops: Cannot set channel count: Invalid argument

and example from here doesn’t work:

Update!

finally it works!!
Thanks to advise from this thread

I changed in config/matrix-demo/matrix_creator.cfg file card from 2 to 3 and it works!

    interface: {
        type = "soundcard";
        card = 3;
        device = 0;
    }

Guys please update the documentation if someone has other default device (not card 2 but card 3 for example) then we need to change the ./asoundrc file and this file above to let it work

1 Like