Skip to content

Instantly share code, notes, and snippets.

@bobzsj87
Last active May 24, 2018 19:13
Show Gist options
  • Select an option

  • Save bobzsj87/8e6937992f3ae9ee04c79d171d99df5e to your computer and use it in GitHub Desktop.

Select an option

Save bobzsj87/8e6937992f3ae9ee04c79d171d99df5e to your computer and use it in GitHub Desktop.
Make customized wm8731 work on RPi 3
  1. edit /boot/config.txt and comment out dtparam=audio=on, remove comment for dtparam=i2s=on, dtparam=i2c_arm=on. Add dtoverlay=audioinjector-wm8731-audio
  2. Add snd_soc_wm8731 in /etc/modules
  3. Set GPIO25=1 (turn on audio Amp. Should turn off when Audio is not used)
  4. Turn on Output Mixer HiFi (https://github.com/raspberrypi/linux/blob/rpi-4.14.y/sound/soc/codecs/wm8731.c#L187) in amixer for speaker. Use speaker-test to verify. Volume is controled by Master (https://github.com/raspberrypi/linux/blob/rpi-4.14.y/sound/soc/codecs/wm8731.c#L161) 5 Turn on Mic (https://github.com/raspberrypi/linux/blob/rpi-4.14.y/sound/soc/codecs/wm8731.c#L171) and switch Input Mux to Mic in amixer.(https://github.com/raspberrypi/linux/blob/rpi-4.14.y/sound/soc/codecs/wm8731.c#L206) Test with arecord and aplay

Header is here: https://github.com/raspberrypi/linux/blob/rpi-4.14.y/sound/soc/codecs/wm8731.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment