Zum Inhalt springen

WSAL15668 – WM8960 Audio HAT/en

Aus JW Tech Wiki
Version vom 6. September 2026, 00:26 Uhr von JWTechPublisher (Diskussion | Beiträge) (Freigegebene technische Dokumentation veröffentlicht; Text-only und noindex)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

The WM8960 Audio HAT is an audio module for Raspberry Pi with a stereo CODEC, onboard MEMS microphones, and 3.5 mm headphone and speaker connections. It enables playback and recording via I2S/I2C.

Related products at JW Tech

Technical overview

  • Connects via the standard Raspberry Pi 40-pin GPIO header.
  • Integrates a WM8960 stereo CODEC over the I2S interface.
  • Two onboard MEMS silicon microphones for stereo recording.
  • 3.5 mm headphone jack for playback through external headphones.
  • Dual speaker outputs (LP/LN left, RP/RN right) for direct driving.
  • Specifications: 5 V supply, 3.3 V logic; DAC SNR 98 dB, ADC SNR 94 dB.
  • Headphone drive: 40 mW at 16 Ω/3.3 V; speaker drive: 1 W per channel (8 Ω BTL).
  • Example verification commands: aplay -l and arecord -l list available audio devices.

Commands and examples – verify before use: 

git clone https://github.com/waveshare/WM8960-Audio-HAT
cd WM8960-Audio-HAT && sudo chmod +x install.sh && sudo ./install.sh && sudo reboot
sudo dkms status
aplay -l
arecord -l
sudo arecord -f cd -Dhw:0 | aplay -Dhw:0
sudo arecord -D hw:0,0 -f S32_LE -r 16000 -c 2 test.wav
sudo aplay -Dhw:0 test.wav
sudo alsamixer
sudo apt-get install mpg123 && sudo mpg123 music.mp3
sudo apt-get install smplayer
apt install alsa-utils
arecord -Dhw:0,1 -f S32_LE -r16000 -c2 -d 10 -t wav sound_32b_16k.wav
aplay -Dhw:0,2 -f S32_LE -r16000 -t wav sound_32b_16k.wav
tinycap ./2chn_test.wav -D 0 -d 0 -c 2 -b 16 -r 48000 -p 512 -n 4 -t 5
tinyplay ./2chn_test.wav -D 0 -d 1

Notes and version constraints

  • The guides apply only to Raspberry Pi OS (Raspbian); other distributions require manual adaptation.
  • If noise or no sound through the 3.5 mm jack: reinstall the driver and/or restart the wm8960-soundcard.service.
  • Kernel version determines which driver branch to clone: kernel < 5.0 → rpi-4.9.y; kernel ≥ 5.0 → main branch. Run only one of the two.
  • On 64-bit systems, adding arm_64bit=0 to /boot/config.txt may be required; then reboot and reinstall the driver.
  • The headphone jack uses the 4-pole OMTP standard; CTIA headphones may have no mic-channel output.
  • No external microphone input pins exist; recording is only possible via the onboard MEMS microphones.
  • For Raspberry Pi 5, a fresh Bookworm OS and a clean SD card may be needed; exact steps depend on your system configuration.

Source and revision record

  • WM8960 Audio HAT - Waveshare Wiki
  • Source revision: 105389
  • Captured: 2026-08-31T02:55:01+00:00
  • SHA-256: 186ea7ec8bb71dd814ee2902b99b043d0c650951c15e1fe54cb6877b263d2bcb