Application Development Overview
How to Use MAX98357A with Toradex System on Modules
Introduction
This guide explains how to connect the Verdin Pico-ITX Dual Ethernet Carrier Board from carriertronic GmbH to either the MAX98357A I2S Class-D Amplifier Breakout Board from Adafruit or a custom-built Verdin Pico-ITX MAX98357A Extension Board for audio output via the I2S interface. The connection methods for both the Breakout Board and the Extension Board are covered, allowing for flexible integration depending on your setup.
We also reference our Altium Design Resources, enabling customers to integrate this setup into their own layout or carrier board extension alongside the Verdin Pico-ITX Dual Ethernet Carrier Board.
Furthermore, this How-To will cover the hardware setup as well as additional steps for implementation in Linux, including Device Tree Overlays and Volume Control.
Prerequisites:
Option 1:
- Verdin Pico-ITX Dual Ethernet Carrier Board
- MAX98357A I2S Breakout Board from Adafruit
- Jumper wires for connections
- A suitable power supply for the Carrier Board (e.g.12 – 48V DC) or PoE
Option 2:
- Verdin Pico-ITX Dual Ethernet Carrier Board
- Verdin Pico-ITX MAX98357A Extension Board (custom-built)
- 4x M3 17mm SSTII Steel Spacer Stud – Metric, internal/internal
- 8x M3x6 screws (Pan head)
- A suitable power supply for the Carrier Board (e.g.12 – 48V DC) or PoE

Hardware Setup – Option 1
Step 1: Identify the I2S Pins on the Carrier Board
Ref. | Bottom Side Interfaces |
---|---|
X400 | Secondary Extension Header (Debug UART / System Control Signals) |
X1502 | Capacitive Touch-/Ambient Light Sensor |
X1500 | Primary Extension Header (Supplies / 2× I2C / 1× PWM / 4× GPIO) |
X1501 | Primary Extension Header (1× SPI / 2× CAN / 1× I2S / 2× UART) |
X1400 | 1× PCIe M.2 Key-M* |
X1300 | LVDS* |
X300 | RTC Backup Power |
X600 | USB 2.0 Host |

Pin assignments for X1501
Pin | Connection | Type | SODIMM | Voltage | Description |
---|---|---|---|---|---|
1 | SPI_1_CLK | O | 196 | +1.8V | SPI Serial Clock |
2 | SPI_1_MISO | I | 198 | +1.8V | SPI Master Input, Slave Output |
3 | SPI_1_MOSI | O | 200 | +1.8V | SPI Master Output, Slave Input |
4 | SPI_1_CS | O | 202 | +1.8V | SPI Chip Select |
5 | GND | PWR | |||
6 | CAN_1_TX | O | 20 | +1.8V | CAN port 1 transmit pin |
7 | CAN_1_RX | I | 22 | +1.8V | CAN port 1 receive pin |
8 | CAN_2_TX | O | 24 | +1.8V | CAN port 2 transmit pin |
9 | CAN_2_RX | I | +1.8V | CAN port 2 receive pin | |
10 | GND | PWR | |||
11 | I2S_1_BCLK | O | 30 | +1.8V | Serial audio bit clock |
12 | I2S_1_SYNC | O | 32 | +1.8V | Synchronization / field select / left-right channel select |
13 | I2S_1_D_OUT | O | 34 | +1.8V | Serial audio output data |
14 | I2S_1_D_IN | I | 36 | +1.8V | Serial audio input data |
15 | I2S_1_MCLK | O | 38 | +1.8V | Serial audio master clock |
16 | GND | PWR | |||
17 | UART_1_RXD | I | 129 | +1.8V | UART1 Receive Data |
18 | UART_1_TXD | O | 131 | +1.8V | UART1 Transmit Data |
19 | UART_1_RTS | O | 133 | +1.8V | UART1 Request to Send (RTS) |
20 | UART_1_CTS | I | 135 | +1.8V | UART1 Clear to Send (CTS) |
21 | UART_2_RXD | I | 137 | +1.8V | UART2 Receive Data |
22 | UART_2_TXD | O | 139 | +1.8V | UART2 Transmit Data |
23 | UART_2_RTS | O | 141 | +1.8V | UART2 Request to Send (RTS) |
24 | UART_2_CTS | I | 143 | +1.8V | UART2 Clear to Send (CTS) |
Pin assignments for X1500
Pin | Connection | Type | SODIMM | Voltage | Description |
---|---|---|---|---|---|
1 | +V5_SW | PWR | +5V | Power Supply Output | |
2 | +V3.3_SW | PWR | +3.3V | Power Supply Output | |
3 | +V1.8_SW | PWR | +1.8V | Power Supply Output | |
4 | GND | GND | |||
5 | Reserve | ||||
6 | Reserve | ||||
7 | Reserve | ||||
8 | Reserve | ||||
9 | GND | PWR | |||
10 | I2C_1_SDA | IO | 12 | +1.8V | Generic I²C Data |
11 | I2C_1_SCL | IO | 14 | +1.8V | Generic I²C Data |
12 | I2C_2_DSI_SDA | IO | 55 | +1.8V | MIPI DSI I²C Data |
13 | I2C_2_DSI_SCL | IO | 53 | +1.8V | MIPI DSI I²C Data |
14 | Reserve | ||||
15 | Reserve | ||||
16 | I2C_4_CSI_SDA | IO | 95 | +1.8V | MIPI CSI I²C Data |
17 | I2C_4_CSI_SCL | IO | 93 | +1.8V | MIPI CSI I²C Data |
18 | PWM1 | O | 15 | +1.8V | General-purpose PWM1 |
19 | Reserve | ||||
20 | GND | PWR | |||
21 | GPIO_1 | IO | 206 | +1.8V | General-purpose IO |
22 | GPIO_2 | IO | 208 | +1.8V | General-purpose IO |
23 | GPIO_3 | IO | 210 | +1.8V | General-purpose IO |
24 | GPIO_4 | IO | 212 | +1.8V | General-purpose IO |
Step 2: Identify the Connection on the MAX98357A Breakout Board
Pin | Connection | Type | Voltage | Description |
---|---|---|---|---|
1 | VDD | PWR | +5V | Positiv Supply for Breakout Board |
2 | GND | PWR | 0V | Negativ Supply for Breakout Board |
3 | SD_MODE | O | +1.8V | Shutdown control |
4 | GAIN | I | +1.8V | Gain Control |
5 | DIN | I | +1.8V | I2S Data In |
6 | BCLK | I | +1.8V | I2S Bit Clock |
7 | LRCLK | I | +1.8V | I2S Left/Right Clock |
Step 3: Connect the I2S Lines
I2S Bit Clock (BCLK)
- Connect Pin 11 (I2S_1_BCLK) from the Carrier Board (X1501) to the BCLK pin 6 on the MAX98357A Breakout Board.
I2S Left/Right Clock (LRC)
- Connect Pin 12 (I2S_1_SYNC) from the Carrier Board (X1501) to the LRC pin 7 on the MAX98357A Breakout Board.
I2S Data (DIN)
- Connect Pin 13 (I2S_1_D_OUT) from the Carrier Board (X1501) to the DIN pin 5 on the MAX98357A Breakout Board.
I2S SD_Mode
- Connect Pin 14 (I2S_1_D_IN) from the Carrier Board (X1501) to the SD_MODE pin 3 on the MAX98357A Breakout Board.
Step 4: Power and Ground Connections
Power (VDD)
- Connect the VDD pin on the MAX98357A Breakout Board to a 3.3V or 5V power source. The Verdin Pico-ITX Carrier Board offers a 3.3V Power supply on Pin 2 (+V5_SW) or 5V power supply on Pin 1 (+V5_SW) from the Primary Extension Header X1500
Ground (GND)
- Connect the GND pin on the MAX98357A Breakout Board to any ground pin on the Carrier Board, such as Pin 4 or Pin 9 (GND) on the X1500 header
Step 5: Additional Control (Optional)
GAIN Selection
- You can adjust the gain of the MAX98357A by controlling the Gain Pin.
GAIN_SLOT | I2S/LJ GAIN (dB) |
---|---|
Connect to GND through 100kΩ ±5% resistor | 15 |
Connect to GND | 12 |
Unconnected | 9 |
Connect to VDD | 6 |
Connect to VDD through 100kΩ ±5% resistor | 3 |
Once the physical connections are made, your MAX98357A Breakout Board should be ready to receive audio data from the Verdin Pico-ITX Dual Ethernet Carrier Board via the I2S interface.
Hardware Setup – Option 2
Assembly instructions
- Place the Verdin Pico-ITX Dual Ethernet Carrier Board on top of the Verdin Pico-ITX MAX98357A Extension Board.
- Align the X1500 and X1501 Primary Extension Headers on both boards and connect them together.
- Use the 4x M3 17mm SSTII Steel Spacer Studs as spacers between the two boards for structural support.
- Secure the boards using 8x M3x6 screws (pan head) to fasten the spacer studs to the boards.

Device Tree Overlay
1. Download Device Tree Overlay
2. Copy and add the DeviceTree Overlay to the System. This Overlay is tested for Kernel Version 5.15.129-6.4.0
To modify and compile your own Device Tree Overlays, refer to the Developer Section:
First Steps with Device Tree Overlays.
Add Volume Control for MAX98357A
To implement volume control for the MAX98357A I2S Class-D Amplifier, you can add a softvol control by editing the .asoundrc file. This method allows you to control the volume of the audio playback without hardware support for a mixer.
Step 1: Edit the asoundrc File
Creating a new softvol device
Open the .asoundrc file in your home directory with your preferred text editor.
If the file does not exist, you can create it:
Step 2: Add the Softvol Configuration
Add the following configuration to define a new softvol control.
This creates a virtual mixer that allows volume adjustments for the max98357a device:
This configuration:
- Defines a new pcm.softvol device with a volume control named Master.
- Assigns the max98357a device as the slave PCM for audio output.
- Sets the softvol as the default audio output device (pcm.!default).
Step 3: Apply the Configuration
Once you have added the configuration, save the file and restart the ALSA service to apply the changes:
Step 4: Test the Volume Control
To verify that the Master control has been successfully created,
use the amixer command to list the available mixer controls:
You can now adjust the volume using the Master control, either through the amixer command or alsamixer:
Step 5: Use alsamixer for Volume Control
To adjust the volume interactively, open alsamixer and select the Master control for adjustment:

Fixing ALSA Configuration for MAX98357A
In this chapter, we will address how to resolve issues with ALSA and alsamixer when using the MAX98357A I2S Class-D Amplifier with the Verdin Pico-ITX Dual Ethernet Carrier Board running the Linux 5.15.129-6.4.0 build from Toradex.
Problem Desciption
After testing the MAX98357A overlay on the Linux 6.4 build from Toradex, audio playback worked perfectly using aplay,
but there was an issue with alsamixer:
This issue arose because the /etc/asound.conf file was still configured for the imx8mpnau8822 codec.
To fix this, the codec needs to be replaced with max98357a.
Step 1: Check Linux Version and Audio Device
Step 2: Update the ALSA Configuration
Replace all instances of imx8mpnau8822 with max98357a. Here is an example configuration:
Step 3: Test Audio and Mixer
After updating the configuration, reboot the system or restart the ALSA service:
Test the audio playback again with aplay and verify the functionality of alsamixer:
Kontakt
Wir freuen uns von Ihnen zu hören. Vielen Dank für Ihre Kontaktanfrage.
Beratung buchen
Hilfe ist nur einen Klick entfernt.