Built-in speaker and microphone
The Waveshare ESP32-P4-WIFI6-POE-ETH has its own audio: a codec with an amplifier for a small speaker, and a microphone on the board. An encoder or decoder can use them instead of a USB adapter, so a board with nothing plugged into it can be a network speaker or a listening point, powered over the same cable with PoE. The M5Stack units have no built-in audio.
| Speaker | a 2-pin MX1.25 connector on the board, for an 8 Ω speaker of up to 2 W |
| Microphone | on the board itself |
| Format | mono, 24-bit, 48 kHz, both ways |
The board has no line output or headphone jack: use a USB adapter for those.
Set up
- For a speaker, plug an 8 Ω speaker into the board's speaker connector.
- On the board's page, under Settings, choose Decoder · line out for the speaker or Encoder · line in for the microphone.
- Under Audio, choose Built-in speaker or Built-in microphone. USB adapter goes back to a USB adapter. Audio only appears on boards that have built-in audio.
- Set the rest as for any decoder or encoder, and choose Save & reboot.
The built-in audio still needs Ethernet, like any encoder or decoder (see Wi-Fi).
The speaker
A decoder mixes its Output channels down to the one speaker: a stereo stream plays both sides. Volume and Mute work as on any decoder. While the decoder is muted or its volume is at 0, the amplifier is switched off, so the speaker doesn't hiss.
The microphone
An encoder sends the microphone on every channel of its stream. Set Channels to 1 for a mono stream.
The microphone has a fixed gain, set for speech in a room. Input trim adjusts the level digitally, from -40 to +20 dB (see input trim). Gain under Built-in microphone shows it as digital.
Its clock follows the network
A USB adapter runs on its own clock, so the board has to drop or repeat a sample frame now and then (see clocks). The built-in audio runs on the board's own clock, which the board steers to follow PTP instead. Nothing is dropped or repeated, and the buffer between the network and the codec holds steady.
Clock under Built-in speaker or Built-in microphone shows the correction in use, in parts per million (ppm), for example follows PTP, +12.4 ppm. It settles within about a minute of the board locking to PTP, and moves only as the clocks drift. Dropped or repeated frames are shown next to it if there have been any.
Problems
These appear in the board's health banner:
- built-in audio: no codec found on this board: the codec didn't answer. The board may not be a Waveshare ESP32-P4-WIFI6-POE-ETH; choose USB adapter under Audio.
- built-in audio: codec didn't take its settings, I2S didn't start or I2C bus unavailable: restart the board. If it keeps happening, report it.