pi-repeater card setup
enable svxlink fe-pi audio sgtl5000
20.a Setup the Fe-Pi Audio Z I2S soundcard
The Fe-Pi Audio Z v2 HAT board is a dedicated sound HAT board that uses the Raspberry Pi's built-in
and dedicated I2S bus. This audio-specific bus offers a more dedicated connection than say
USB offers on the Raspberry Pi 3+ and older boards. In addition to the connectivity improvement,
these boards also offer direct stereo LINE-IN and LINE-OUT connections for improved signals.
To get a Fe-Pi board working, you have to do more than just connect the board but it's not hard:
1. Driver support is included since Linux kernel 4.9.13 (Raspbian Jessie / 8.x or newer). You
can also get newer kernels by running "sudo rpi-update" tool
2. You have to make a quick change to the Rpi boot process to enable the HAT board at the
Broadcom SOC level. Do the following:
sudo vim /boot/config.txt
Find a line that includes the word "dtoverlay"
Add a line below it that has the following text (must be a NEW line.. do not add to
an existing line):
dtoverlay=fe-pi-audio
3. Reboot the Rpi
sudo /sbin/shutdown -r now
4. Once the Rpi boots back up, login and run the following command to confirm the board
is recognized:
dmesg | grep -i fe-pi
--
[ 8.007458] snd-fe-pi-audio soc:sound: ASoC: CODEC DAI sgtl5000 not registered - will retry
[ 8.010476] snd-fe-pi-audio soc:sound: ASoC: CODEC DAI sgtl5000 not registered - will retry
[ 8.487658] snd-fe-pi-audio soc:sound: ASoC: CODEC DAI sgtl5000 not registered - will retry
[ 8.488264] snd-fe-pi-audio soc:sound: ASoC: CODEC DAI sgtl5000 not registered - will retry
[ 8.664517] snd-fe-pi-audio soc:sound: sgtl5000 <-> 3f203000.i2s mapping ok
--
5. OPTIONAL:
When you enable the fe-pi-audio overlay, you're also enabling the Rpi's I2C subsystem so that alsamixer
can control the sound chip's mixer settings. If you have the i2cdetect utility installed (fully described
in the 16x4 LCD section), run the following command and you should see the Fe-Pi on the 0x0a address as
"UU" meaning it's in use:
sudo i2cdetect -y 1
--
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- UU -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
--
Once the board is recognized, go ahead and follow the next soundcard centric sections to test the board.
gpio setup:
i2cdetect -y 1 # to see that is in use.
then enable, put on rc.local that i2c-1 as 1 or 0
edit /etc/rc.local
echo mcp23017 0x20 > /sys/bus/i2c/devices/i2c-1/new_device
echo 498 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio498/direction
echo 0 > /sys/class/gpio/gpio498/value
echo "mcp23017 0x20" > /sys/bus/i2c/devices/i2c-1/new_device &> /dev/null 2>&1
sleep 1
echo 498 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio498/direction
echo 0 > /sys/class/gpio/gpio498/value
sleep 1
chown toistin /sys/class/gpio/gpio498/value
gpio pins is set GPIOs 488-503 get info using cat /sys/kernel/debug/gpio
as mcp23017 chip it has gpioA abd B for use PTT pin 3 from GPIOB number is gpio498