I had sound working at one point on the pidog, but I have now lost it. I have rerun the i2samp.sh script multiple times, rebooted multiple times, I have run sudo killall pulseaudio
sudo killall aplay, but have not been successful at getting the audio working. Here is the output I am now getting when I run i2samp.sh:
sudo bash i2samp.sh
install robot-hat soundcard driver >>>
script version: 0.0.4
user: azaremskas
apt update…
Hit:1 Index of /raspbian bullseye InRelease
Hit:2 Index of /debian bullseye InRelease
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
All packages are up to date.
install alsa-utils …
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
alsa-utils is already the newest version (1.2.4-1+rpt1).
The following package was automatically installed and is no longer required:
libfuse2
Use ‘sudo apt autoremove’ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
install pulseaudio …
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
pulseaudio is already the newest version (14.2-2+rpt1).
The following package was automatically installed and is no longer required:
libfuse2
Use ‘sudo apt autoremove’ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
install pulseaudio-utils …
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
pulseaudio-utils is already the newest version (14.2-2+rpt1).
The following package was automatically installed and is no longer required:
libfuse2
Use ‘sudo apt autoremove’ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
install jq …
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
jq is already the newest version (1.6-2.1).
The following package was automatically installed and is no longer required:
libfuse2
Use ‘sudo apt autoremove’ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
install sox …
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
sox is already the newest version (14.4.2+git20190427-2+deb11u2).
The following package was automatically installed and is no longer required:
libfuse2
Use ‘sudo apt autoremove’ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
check robothat 5 …
find: ‘/proc/device-tree/hat’: No such file or directory
hat_dir:
No robothat 5 found
robothat_spk_en: 20
is_with_mic: false
config soundcard without mic …
add dtoverlay hifiberry-dac in /boot/config.txt …
activated dtoverlay hifiberry-dac …
Trying to load dtoverlay hifiberry-dac …
get_soundcard_index …
soundcard sndrpihifiberry index: 0
config /etc/asound.conf without mic …
set ALSA speker volume to 100% …
Simple mixer control ‘robot-hat speaker’,0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 255 [100%] [0.00dB]
Front Right: Playback 255 [100%] [0.00dB]
config pulseaudio …
raspi-config enable pulseaudio …
run pulseaudio …
get_sink_index …
pactl: invalid option – ‘f’
sink index not found.
Sometimes you need to reboot to activate the soundcard.
set default sink …
sink index is null
set default Pulseaudio volume to 100% …
Do you wish to test speaker now? [y/N] y
testing speaker …
speaker-test 1.2.4
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2229 to 8916
Period size range from 1114 to 1115
Using max buffer size 8916
Periods = 4
was set period_size = 1114
was set buffer_size = 8916
0 - Front Left
Write error: -32,Broken pipe
1 - Front Right
Write error: -32,Broken pipe
Write error: -32,Broken pipe
Time per period = 16.027757
0 - Front Left
1 - Front Right
Time per period = 3.040588
0 - Front Left
1 - Front Right
Time per period = 3.018514
All done!
I have also attached a photo of the speaker on the HAT.