Zynthian (Raspberry Pi 5 + PCM5122) Audio Quality Issue and Click Noise on Note Stop

Hello everyone, I am using Zynthian with Raspberry Pi 5 and the PCM5122 Audio Board

config.txt (3.7 KB)

for audio output. However, the sound I get lacks detail and spatial depth. With the same file and the same headphones, playback from my computer sounds noticeably more detailed. This applies to both SF2 and SFZ files. Honestly, when I listen on my computer using a Focusrite Scarlett Solo, the sound is still fuller and more detailed.

I understand that this comparison may not be entirely fair, but I would like to ask whether this is a hardware limitation or an issue with my configuration.

Additionally, when I stop playing a note, there is a slight click sound just before the audio fully cuts off. Has anyone experienced this issue, and is there any way to resolve it or any alternative solution?

Thank you, and have a nice day.

1 Like

Try using your scarlet with zynthian. That will rule in/out the soundcard.

The clock is likely to be an automate iIRC the PCM5122 had a mute circuit that may be disabled with a jumper.

[Edit] The 5122 also had a filter that may need to be disabled.

Thank you, riban. I will try reconfiguring it. There are no jumpers on my board, so I assume those functions are managed by software and controlled via I²C.

Additionally, I would like to ask about another issue: my output volume is usually lower compared to other instruments. Could this be due to the board’s output level? Are there any boards with a stronger line-out level?

Please show us which board you have. This chip is used on many audio interfaces and may have different hardware configuration.

How have you configured zynthian soundcard? Show us the webconf page.

ALSA mixer may allow adjustment of levels. In webconf, go to HARDWARE->Audio, enable “Advanced view” and click on the button below “Mixer Controls”. This will show the ALSA mixer controls that zynthian has detected. You can make changes here in webconf and/or enable the “View” checkboxes to expose to the zynthian GUI “Audio Levels” view.

“Soft mute” is enabled via a hardware pin on the PCM5122 so there may be a solder bridge or similar on the PCB for this. The data sheet labels it, “XSMT/UVP”. GPIO 6 on the chip is labelled FLT which can enable the normal/low latency filter. (Odd terminology!). I am familiar with the PCM5012 which does not have I2C. The 5122 has I2C which may be used to configure it. If this is enabled on your board then some of these features may be exposed to ALSA mixer:
900px-PCM5122 Audio Board (A) 1.png

  • Adjusting FIR and Deemphas (filters) may be beneficial to sound quality.
  • The output levels can be adjusted.
  • Auto mute should be disabled.

I would make the changes to these ALSA mixer settings in webconf and only expose the ouptput levels to the GUI.

1 Like

I tested it and realized the issue was caused by auto mute. I had set the slope too high and configured it to mute immediately, which caused that behavior. I have now disabled it, and although there is a bit of background noise, it is still more acceptable than having the audio cut off.

1 Like

Yep! That was the most likely candidate for the mute. (I suffered it with the PCM5012 and also with the HifiBerry which has a similar feature (which we now disable by default).

You should look to improve your noise floor (SNR). Ideally there should not be objectionably noise at normal listening levels. You could be suffering analouge noise introduced at the output of the card and/or in you audio wiring (hum, buzz, noise) and you could be suffering digital noise introduced within the device (aliasing, interpolation, interference) which may be due to wiring, board layout and positioning, signal flow (temination impeadance, etc.).

If you post an audio recording of the noise, someone may be able to provide some adivce.

2 Likes

Thank you, Riban. I think it might be due to my setup. The components are connected using regular wires, so I may need to mount them directly onto the board instead of using wires.

Regarding the audio quality issue, I use sfizz on Zynthian and sforzando on my computer with the same SFZ, but I feel that sforzando produces better sound. Everything sounds fine when I use headphones, but when performing on different sound systems the problem starts to appear: the piano sound becomes compressed and loses its sense of width.

I’m not sure whether this is related to interpolation in sfizz. However, the samples I use were recorded for every note from 21 to 108, and each note has about 9 velocity layers. I’m just wondering whether this difference comes from the two engines or if the issue lies somewhere in my system.

I would suggest connecting your Scarlett to the zynthian and doing some listenting tests. I would expect similar result from both machines using the same source samples but there is a possibility that the audio filtering and processing in sfizz differs to that ins sforzando.

As you said, when I connect the Scarlett, the sound result is similar, so I tend to agree with the second assumption.
By the way, I would also like to ask whether sforzando can be integrated into Zynthian with acceptable performance. If it works well, I will try to find a way to implement it.

We discussed this recently in another thread and came to the conclusion that it was not something to do at the moment. There is a closed-source binary that can be installed but it provides no API for control and needs a GUI, i.e. cannot be run headless. It also takes a long while to start up and is generally suboptimal. So we decided to park that idea and concentrate on sfizz. I added some code to identify sfz opcode compatibility and only a few of the existing soundfonts have one or two unsupported opcodes. We would prefer to find workarounds for these, e.g. patching sfizz, finding altenative opcodes, etc.