-
Notifications
You must be signed in to change notification settings - Fork 5.2k
bcm2835-codec sound distortions issue (clipping at volume level above 85%) #5587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The analogue audio on Pi boards is rather low level for headphones use which can result in too quiet audio for some headphones. Because of this, we allow the audio to be overdriven by 4dB (see here). When going above 0, you will clip a full range signal. But if you know signal is not full range, you may choose to get the higher volume level. When using alsamixer to set volume, it shows red when above 0dB and clipping can occur. The recommendation is to not go above that if you may be using full range signals. |
how to disable this 4 dB overdrive? I don't need distorted gain. I want to set 100% volume and don't get clipping for max level signal. |
From a linux point of view, you run aslamixer. But I'm less familiar with pulseaudio, so I'm not sure how that interacts. |
well is it possible to disable dB gain above 0 dB in the driver? So that 100% volume bar in the desktop panel can be equals to 0 dB gain for bcm2835 and alsamixer will be unable to set gain above 0 dB for bcm2835 and alsamixer Master volume 100% can be equals to 0 dB gain for bcm2835? Can you provide some configurable option like "bcm2835codec_overdrive" which can enable or disable distorted gain above 0 dB for bcm2835? |
not relevant anymore |
Describe the bug
When sound volume is above 85% it leads to a sound distortion. Oscilloscope shows that there is amplitude clipping.
RPI4 output waveform at volume level 75%:

RPI4 output waveform at volume level 100%:

This clipping distortion is present for any load impedance (tested for open output, 57 kΩ and 32 Ω).
Steps to reproduce the behaviour
Expected result: clean sine sound at 100% volume level.
Actual result: sound distortions happens when volume level is more than 85%
Device (s)
Raspberry Pi 4 Mod. B
System
$ cat /etc/rpi-issue
Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7c750947a959fb626a70c09fd17c65815df192ac, stage4
$ vcgencmd version
Mar 17 2023 10:50:39
Copyright (c) 2012 Broadcom
version 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean) (release) (start)
$ uname -a
Linux raspi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
Logs
there is no error in the log related to this bug
Additional context
No response
The text was updated successfully, but these errors were encountered: