100%
rpi-audio-hat RPi_GPIO view
Description

Imported from GitHub: paulh002/rpi-audio-hat · commit d0b955b · license MIT

Description

Raspberry Pi PCM1808 and 5102 audio hat for SDR tranceiver

README

rpi-audio-hat

Raspberry Pi PCM1808 and 5102 audio hat for SDR tranceiver. This board can be used with the Tayloe mixers in this repo https://github.com/paulh002/SoapyHifiBerry as alternative for the HifiBerry The SoapyHifiBerry driver is used to supply IQ signals to the SDR software see sdrberry SDR software (https://github.com/paulh002/sdrberry) Configure the SoapyHifiBerry config file with the correct audio board name and sample frequencey

To test the board:

  • To check if board is loaded:
aplay -l 
arecord -l
  • Reord and play:
arecord -D hw:0,1 -c 2 -f S24_LE -r 96000 test.wav
aplay -c2 -f S24_LE -r 96000 test.wav

Hardware

Kicad files and gerbers are availeble in hardware directory. R10 and R11 are used to switch between clock from the Pi or internal PLL of the pcm5102 (gnd is internal pll) J5 exposes I2S for setting the mixer frequency of the si5351 on the Tayloe mixer board.

Prototype

Picture shows prototype using cheep aliexpress adc and dac boards To connect the boards you can use this table:

pcm 5102

BoardGPIOPin
SCK412
LCK1935
BCK1812
DIN2140
5V5V2
FMTGND19
FLTGND19
XSMT3v1

pcm 1808

BoardGPIOPin
SCK412
LCK1935
BCK1812
Dout2038
MD03V1
MD13V1
5V5V2
3V3V1
SCLK47

prototype

Kicad files

Kicad design is a pcb version of the audio board

pcb

How compile and install driver for pcm1808 and pcm5102

To support the audio card in slave mode an overlay need to be created. The raspberry pi supports already most audio cards with pcm1808 and pcm5102. The procedure and files are taken from Akiyuki Okayasu github page https://github.com/AkiyukiOkayasu/RaspberryPi_I2S_Slave

Compile on Raspberry Pi

dtc -@ -H epapr -O dtb -o genericstereoaudiocodec.dtbo -Wno-unit_address_vs_reg genericstereoaudiocodec.dts

Copy genericstereoaudiocodec.dtbo to /boot/overlays

sudo cp genericstereoaudiocodec.dtbo /boot/overlays

Edit /boot/config.txt
Enable I2S and add genericstereoaudiocodec device tree overlay

#dtparam=i2c_arm=on
dtparam=i2s=on
#dtparam=spi=on
dtoverlay=genericstereoaudiocodec

If you don't need HDMI audio output and Raspberry Pi's headphone output, comment out "dtparam=audio=on" by hash.
like this.

#dtparam=audio=on
Comments
Sign in to comment

No comments yet. Be the first to ask about this board.