Cheap PCM5102a board working

It is actually a 40 pin Maple Mini (clone) STM32 microcontroller providing I2C interface to the rotary encoders (and more). See here and here.

2 Likes

Just had an issue with the sound output from my PCM510x board. No sound coming out. Eventually traced to the I2S board having stopped working. I don’t know if it was muted or just not happy. I had to remove power from the RPi to reset the board. (Powering down the RPi didn’t help because power was still fed to the I2S board so it wasn’t reset.) The PCM510x has power on reset but no other reset mechanism so if it gets upset like this then a power interruption is required.

Hi, I can’t connect this board,Zynthian I don’t see it.

PCM5102

@rozhok can you give some more detail of how you try to connect and configure? Some pictures of the installation and zynthian webconf details for the soundcard would help.

Hi,
I can confirm that these cheap ali express pcm5102 are working using the hifiberry dac light option in webconf.
But I’ve experienced a bunch of xruns. Having a better power supply improves these issues a lot.

I wired it as described on stackowerflow and enabled Hifibery DAC+ Light in webconf. No sound when testing from Zynthian UI (same true for mplayer via ssh).

root@zynthian:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 2: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 [HifiBerry DAC HiFi pcm5102a-hifi-0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 3: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
root@zynthian:~# mplayer -ao alsa:device=hw=2.0 /home/pi/zynthian-data/audio/test.mp3
Failed to read /etc/mplayer/mplayer.conf.local: No such file or directory
Warning unknown option include at line 177
MPlayer 1.4 (C) 2000-2019 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /home/pi/zynthian-data/audio/test.mp3.
libavformat version 58.20.100 (external)
Audio only file format detected.
Clip info:
 Title: 2 Piste audio.mp3
 Artist: 2 Piste audio
 Album: 
 Year: 
 Comment: 
 Genre: Blues
Load subtitles in /home/pi/zynthian-data/audio/
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
[AO_ALSA] alsa-lib: pcm_hw.c:1711:(snd_pcm_hw_open) open '/dev/snd/pcmC2D0p' failed (-16): Device or resource busy
[AO_ALSA] Playback open error: Device or resource busy
Failed to initialize audio driver 'alsa:device=hw=2.0'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video


Exiting... (End of file)

I don’t know that specific card. It is possible that some of the signals are not tied to default levels. You could add jumpers to pins:

  • FMT to GND (This formats the input as I2S)
  • XMT to VDD (This unmutes output)

Thank You. Now i can hear some cracking sound. When i touch ground on mini jack sound become better for a second but then returns to crackling again (even if i keep my hand on ground).

This is recorded sound of default mp3 from Zynthian:

1 Like

Also connect SLC to GND.

Thank you so much. It works!

SCL is an input for a clock signal but if you tie it to GND the device will create it’s own clock. The chip is very cleverly designed and works well. Watch our for the cryptic dungeon master requesting sound samples.

:face_with_monocle:

hello,

I have soldered a mt32-pi midi hat. There sketches for the PCB are there:

I’ve discovered it works great with Zynthian, the PCM5102a on board and the midi input are recognised perfectly!

2 Likes