Stacking Hifiberry amp and Matrix Voice


I am building a Smart Speaker where I want to add a voice assistant, currently working with snips.
I am planning to use a HiFiberry amp2, and I was wondering if it is possible to stack a Matrix Voice on-top of the hifiberry ?

Hi @tproulund,

Welcome to the community!

I found this page which at first talks about how they can’t guarantee functionality with other boards since factors that are difficult to pinpoint could affect this. This makes sense. I also haven’t tried this myself so can’t give you more data about that.

If you scroll down, they have a section that talks about which Raspberry Pi pins are used by the Hifiberry amp2. None of those pins are used by the MATRIX Voice, even if they are internally connected, so theoretically, this could work.

While I can’t guarantee that the MATRIX Voice will work with the Hifiberry amp2, I don’t think it would damage the MATRIX Voice to try it unless there’s an unexpected voltage spike or something of the sort.

Let me know how it goes if you decide to try it out.


Hi Samreen

Thanks for the quick answer, so definitely a good start that there is no conflict with the pins

But how is the sound transmitted from the Matrix to the RPI? I know the Hifiberry is using I2C, is this also the protocol the Matrix is using or is it done in a different way?


The MATRIX Voice uses SPI to send audio data to the Pi so there should be no conflict there either.


Hey @tproulund,
Any luck with this? I would also like to try a project doing this.

In general im looking to add a speaker to connect to the setup (not using bluetooth). It looks like getting an amplifier like hifiberry is the only way to get a good quality sound.

I’m currently trying to get the Hifiberry Amp2 to work with the Matrix Voice. Looking at both, the pinout of the Matrix Voice here: and the Hifiberry Amp2 here:, there should be no conflict between them. Unfortunately, they won’t work together on my Rapberry Pi 2 B. When both are plugged into each other (Matrix Voice on top of Hifiberry AMP2) the Hifiberry won’t get initialized but the Matrix Voice is shown in the list of available Audio devices. When i unplug the Matrix Voice the Hifiberry works as expected. So there must be some kind of conflict.

OK, I tried connecting only the pins on the Matrix Voice that are marked as used by it. Now the Hifiberry Amp2 gets detected and I can start the speaker test. Unfortunately there is no sound output until i disconnect the Matrix Voice. So maybe there are pins used by the Amp2 that are not mentioned on the gpio list or I overlooked something…

Hi @Wopfi,

I am also planning for same setup (stacking Martix voice on top of HifiBerry Amp2. Are you able to make this work ?


Unfortunately I wasn’t able to figure out what causes the problems so i used a USB connected amplifier instead.

@Wopfi, Can you share which USB amplifier you used and are you satisfied with its performance ?


Sure! It was one of these chinese ones which I got from Amazon:

Audio quality isn’t that great but I don’t use it for music or other Hi-Fi applications, just to output the replies of the voice assistant. For this purpose it’s good enough. Although I must admit that I don’t use very high class speakers so I can’t really say how good the amplifier is on it’s own.