No audio output when using PCM5102 on Pi Zero
-
I purchased a PCM5102 sound card and am attempting to use it as an onboard sound device in my handheld game console project. I have soldered the pads on the back of the device and grounded the SCK pin as required for it to operate.
I connected the card to a Pi 3A running a clean installation of Raspbian and enabled it in /boot/config.txt and /etc/asound.conf as described in this guide.
The card works as intended and there is no issue with audio output from the Pi 3A.
Next, I used a fresh install of Raspbian on the Pi Zero and followed the same steps as above and successfully tested audio output. Audio output does work on the Pi Zero
However...
Following this test, using a fresh install of RetroPie on the Pi Zero, I connected the sound card to my Pi Zero in the same exact way and configured the files again in the same way that the guide linked above described.
My /config/boot.txt is as follows:
#hdmi_safe=1 #disable_overscan=1 #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 #framebuffer_width=320 #framebuffer_height=240 #hdmi_force_hotplug=1 #hdmi_drive=2 #config_hdmi_boost=4 #sdtv_mode=2 #arm_freq=800 #dtparam=i2c_arm=on #modified dtparam=i2s=on dtparam=spi=on #dtoverlay=gpio-ir,gpio_pin=17 #dtoverlay=gpio-ir-tx,gpio_pin=18 #modified #dtparam=audio=on [all] gpu_mem_256=128 gpu_mem_512=256 gpu_mem_1024=256 overscan_scale=1 #added dtoverlay=hifiberry-dac
I verified when running the command:
aplay -l
the device does show up:
pi@retropie:~ $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 [HifiBerry DAC HiFi pcm5102a-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0
My /etc/asound.conf file contains:
pcm.!default { type hw card 0 } ctl.!default { type hw card 0 }
I performed the following test:
aplay <wav file I have> speaker-test -D default -c 2 -twav mplayer <wave file I have>
In this case, there was no audio output from the device despite no errors being thrown in the console. The file modifications I made to the Pi Zero running RetroPie were the same in all three cases. I also used the same power supply, cables, and headphones. I have also messed with /usr/share/alsa/alsa.conf and ~/.emulationstation/es_settings.cfg and changing /boot/config.txt With no effect.
Of course, I have also tested to see if the device appears in the Audio settings of emulationstation and the RetroPie settings and it did not.
I have exhausted all my options and would like to know if anyone has any ideas.
Thanks -
@Affect said in No audio output when using PCM5102 on Pi Zero:
Of course, I have also tested to see if the device appears in the Audio settings of emulationstation and the RetroPie settings and it did not.
That's normal, the Audio menu in RetroPie only covers the on-board audio, but not external ones.
Stupid question, did you check the volume/mute settings with
alsamixer
? -
@mitu I just checked and the volume is at 100 When the Default card is selected. When press f6 to select the other card, it displays "This sound device does not have any controls" but that is expected since it does not.
-
And the card is not muted ?
You can add a software mixer to control the volume if you wish. -
@mitu Could you point me to a resource for that please?
-
-
I want to add that I have narrowed down my issue. The sound stops working due to my spi display. interfering with it. I suppose this topic is no longer relevant to this forum.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.