Sound_Card_WM8960_Hi Fi_HAT - MiczFlor/RPi-Jukebox-RFID GitHub Wiki
WM8960 Hi-Fi HAT
As the official repo does not work anymore (drivers are not developed anymore for the new kernel) we recommend to use the following drivers: https://github.com/respeaker/seeed-voicecard.
see original thread in the forum
Hardware Pinout:
- User Manual: https://www.waveshare.com/wiki/WM8960_Audio_HAT
- Install Driver / Test Sound (working) with this Manual: https://www.waveshare.com/w/upload/5/54/WM8960_Audio_HAT_User_Manual_EN.pdf
- On the installation of RPi-Jukebox-RFID, use AUDIOiFace="Master".
- To use GPIO buttons you may use a flexible pinout. However you must not apply the classic pinout. Thus adapt
./settings/gpio_settings.ini
so that you don't interfere with the pins of the WM8960-Audio-HAT GPIO 2,3,18-21.
Install:
Clone the driver and install it with commands:
git clone https://github.com/waveshare/WM8960-Audio-HAT
cd WM8960-Audio-HAT
sudo ./install.sh
sudo reboot
Test Sound:
speaker-test -c2
GPIO | Pin | WM8960 Hi-Fi Sound Card |
---|---|---|
2 | 3 | I2C_SDA P_SDA |
3 | 5 | I2C_SCL P_SCL |
8 | 24 | |
9 | 23 | |
10 | 19 | |
11 | 21 | |
16 | 36 | |
18 | 12 | I2S_CLK P18 |
19 | 35 | I2S_LRCLK P19 |
20 | 38 | I2S_ADC |
21 | 40 | I2S_DAC |
24 | 18 | |
25 | 22 | |
26 | 37 |
Test Button:
GPIO | Pin | WM8960 Hi-Fi Sound Card |
---|---|---|
P17 | 11 | Configurable |
set gpio17
echo "17" > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio17/direction
read gpio status
cat /sys/class/gpio/gpio17/value
"1" when not pressed "0" when pressed
release gpio17 (to avoid error: Device or resource busy)
echo 17 > /sys/class/gpio/unexport
Example mpd.conf ALSA output
audio_output {
type "alsa"
name "Alsa Device"
mixer_type "Software"
mixer_device "bcm2835-i2s-wm8960-hifi"
mixer_control "Master"
}