MAX98357A Breakout

Hi Everyone,

I’ve got a couple of MAX98357A I2S breakout/amps and I’m trying to output I2S from the raspberry pi (I have a 4 and a Zero W) with no output audio.

I’ve tried both breakouts, in case one is faulty.

My solder joints are good and I’ve tested for continuity.

I’ve run the script and it writes the correct values from the github link on:

I’ve also checked the config files manually. I’m using Raspbian 11 (bullseye).

/boot/config.txt configured:


**The /etc/asound.conf:**
pcm.speakerbonnet {
   type hw card 0

pcm.dmixer {
   type dmix
   ipc_key 1024
   ipc_perm 0666
   slave {
     pcm "speakerbonnet"
     period_time 0
     period_size 1024
     buffer_size 8192
     rate 44100
     channels 2

ctl.dmixer {
    type hw card 0

pcm.softvol {
    type softvol
    slave.pcm "dmixer" "PCM"
    control.card 0

ctl.softvol {
    type hw card 0

pcm.!default {
    type             plug
    slave.pcm       "softvol"

Wired up according to the instructions as follows:

* **Amp Vin** to Raspbery Pi **5V** (PIN 2)
* **Amp GND** to Raspbery Pi ****GND**** (PIN 6)
* **Amp DIN** to Raspbery Pi (PIN 21)
* **Amp BCLK** to Raspbery Pi (PIN 18)
* **Amp LRCLK** to Raspbery Pi (PIN 19)

The MAX98357A breakout is getting power, and measuring a voltage drop of 5.0 → 1.8v across the inputs.

The speaker test runs on the default output device (set to the hifi berry device), but I don’t hear any output nor do I see any output on the scope.
I’ve tried running as non root and root for these tests.

Has anyone set this up successfully, and if so, what did the outputs look like from the Pi on a scope?

I’ll make some assumptions on what I’m expecting to see, so please correct me where possible:

A square wave output on the BCLK (PIN 18) and LRCLK (PIN 19) of somewhere between (WORDSIZE) * (HZ) * (CHANNELS) = 1 Mhz ~ 6 Mhz.
Wordsize being 64
Khz being somewhere between 8,000 and 48,000
and Channels being 2.

and then on 21 connected to the DIN, I assume this should be the actual data, so I should see a square wave in sync with the clock.

Please help! :slight_smile:


Hi Damien,

Very sorry about the delay in getting back to you!!

Unfortuantely it sounds like this might be a software issue - Adafruit have got a warning on thier guide page mentioning that the Pi Linux kernel doesnt support Mono audio.

Just to confirm, were you trying to play a stereo or single channel audio track?


1 Like

Hey Liam,

I believe the speaker-test -c2 outputs stereo by default. You need to add -s 1 or 2 to output mono.