HAL code/libs for matrix voice?

So in the git repo there is matrix-creator-hal, which seems to be the source for the libmatrixio-creator-hal and libmatrixio-creator-dev packages.

If that source really does match the deb packages, though, it is invalid for the Matrix Voice, and would explain why things like beamforming and DoA do not work correctly at all on the Voice for any project using the HAL.

I have not been able to find correct code for the Voice (eg, matrix-voice-hal or similar) - I can update the microphone positions from the values used in the Odas sample (the only place I have ever seen them detailed), but that is only a partial ‘fix’.

So:

  • How can Voice projects get the correct HAL code/libs to use? I’m fine with building them myself, but even the source seems to not exist.
  • Since the HAL layer is broken, does Core/etc even work properly, or do the same issues span the entire project?
  • On a similar note, are we able to program the FPGA for the Voice (not the esp32 module)? I have only ever found reference code for the creator, which I assume is different, and which I also wasn’t sure was actually complete. The marketing info does state pretty explicitly that we should be able to.

Hello giblet37,

Sorry for the confusion there. The matrix-creator-hal repo is actually for both the MATRIX Creator and MATRIX Voice. The repo was made prior to the MATRIX Voice and updating the name is a difficult process. We just updated the README for it so that its less confusing.

For more information on HAL as well as the install guide, function references, and examples you can go to our docs here. Please note, DoA and beamforming for the MATRIX Voice are currently under maintenance.

As for programming the FPGA on the MATRIX Voice, you can program it with our modified xc3sprog repo. We will be uploading the source code for the MATRIX Voice FPGA tomorrow and we will reply here with the link. Please note, the source code does not include the audio processing code for the microphones.

Regards,
-Boris

Thanks for the update, I’ll look forward to when everything is working!

Hello @giblet37, the FPGA source code for MATRIX Voice has been uploaded here.

We have just uploaded our guide on how to flash the FPGA using a user-synthesized bitstream for the MATRIX Voice here.

You will need a program to synthesize the FPGA bitstream, we suggest Xilinx ISE WEBPack, which can be downloaded here for Windows and here for Linux.

A manual for Xilinx ISE WEBPack can be found here.

FPGA source code contains Makefile using Linux version of Xilinx ISE WEBPack. Makefile can be found at matrix-voice-fpga/voice_core/Makefile.

You can currently use the ODAS Library for performing DoA. The ODAS guide is linked below.

Regards,
-Boris

1 Like

Great, thank you very much for the update!

I saw from an older thread that I likely will need to disable matrixio-devices-firmware.service when deploying my own bitstream, which is fine. If I later re-enable this service, will it take care of restoring the default matrix FPGA bitstream automatically? (And if not, is there an established way to do that?)

Regarding Odas, I have run it, but even just running odaslive without any associated user program takes uses a constant 66-70% of cpu, which makes it unrealistic for any useful application.

Hello @giblet37,

Glad to be able to help.

The matrixio-devices-firmware.service service is used for checking and updating the FPGA firmware from MATRIX Labs.

The current FPGA flashing guide does not require disabling the service since it has users backup and replace the FPGA bitstream file used by the service, which is located at /usr/share/matrixlabs/matrixio-devices/blob/system_voice.bit.

Instructions on restoring the stock FPGA bitstream can be found in the FPGA flashing guide.

Keep in mind, updating the matrixio-creator-init package may result in the FPGA being reflashed by the service with the stock bitstream.

Regards,
-Boris

1 Like