Using I2S to Play sound through speaker

I have been using the Adafruit MAX98357 I2S Class-D Mono Amp and a Visaton FR58 Speaker with a Raspberry pi and it has been working pretty well, however after switching to the Rock Pi 4A, I am unsure how to use the speaker anymore. Adafruit has instructions for setting up the amp with the raspberry pi ( but a lot of the instructions are raspberry pi specific and I have no idea how to set it up for use on the Rock Pi 4A.

Any help would be appreciated.


I figured it out, so if anyone else needs to do this, follow the instructions for the detailed install on the link in the OP and then when you get to Add Device Tree Overlay, instead of editing to /boot/config.txt, edit /boot/hw_intfc.conf and put “intfc:” infront of every “dtoverlay” command e.g. intfc:dtoverlay=hifiberry-dac.

In that same file all the i2c optional hardware interfaces should be set to on (possibly optional haven’t tested)