I've read and experienced that music (mp3 etc) through the audio-jacket is poorly (popping sounds in between songs). Is this already solved or what's the best way (setting) to decrease this problem?
It appears to be an issue with the Broadcom VideoCore firmware, and the popping is caused by voltage jumps as the audio is enabled and disabled.
There is no current solution to the problem, however you can mitigate it's effect by playing audio continuously, instead of having a gap between songs. A script to do this is provided by
ski522 in the same forum thread I posted before.
Create a shell script:
sudo nano mpgapless.sh
Then enter the following into the shell script.
#!/bin/bash # mpgapless case "$@" in *.m3u) PL="-playlist" ;; esac rm /tmp/audiofifo mkfifo /tmp/audiofifo aplay -t raw -c 2 -f S16_LE -r 48000 /tmp/audiofifo &> \ /tmp/aplayfifo.log & mplayer -noconfig all -nolirc -nojoystick \ -novideo -benchmark -vc null -vo null -ao pcm:fast -af resample=48000 -nocache \ -ao pcm:nowaveheader:file=/tmp/audiofifo $PL "$@"
Make the file executable:
chmod 555 ./mpgapless.sh
If you have a directory of music files you can use it like:
All credit for this script to ski522.
I gave up on the integrated audio jack and am glad that I did. I bought the following USB audio interface for a few dollars:
This way, the Pi does something it's good at (emitting digital data) and leaves the D/A conversion to the interface. It sounds great. Here's how I got it to work:
comment out the following line in
/etc/modprobe.d/alsa-base.conf(uncommented, I think it gives the USB sound card minimum priority to become the default sound device)
options snd-usb-audio index=-2
The only downside is the added bulk of a dongle and that you lose an USB port.
The issue with the popping has now been fixed, but you need to upgrade your Raspberry Pi's firmware to take advantage of the fix. I had this issue with a brand-new Pi running Linux raspberrypi 3.6.11+ #399 (2013-02-09-wheezy-raspbian). As cited above, this is the history of the audio popping sound issue:
This is the web site I used to find out how to update my Pi's firmware:
For those not familiar with the "&&" syntax in Bash, these are the specific commands you can use to update your Pi (note the
sudo prefix to ensure that commands are run with root privileges).
Update to the latest version of the Raspbian OS:
sudo apt-get update sudo apt-get upgrade
Install the git version control system:
sudo apt-get install git
rpi-update firmware update script:
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update sudo sudo chmod +x /usr/bin/rpi-update
Run the firmware update process, then reboot:
sudo rpi-update sudo shutdown -r now
After that, my Pi no longer clicks before and after playing an audio file. After rebooting and logging in again, try it on your Pi with the following command:
It looks like you can use pulse audio and then disable the sleep between no activity in the audio. ( disable a line in /etc/pulse/default.pa). It should fix the audio popping issue.
Check this solution. Need to use good power supply which can filter out static current and provide clean audio on analog aux port.
Apart from solving these problems you mention. The audio out of the Pi is pretty poor in general.
I think it is best to use either a USB sound card, or a GPIO header sound card like one of these. The reason is that the audio codecs which they use are far more linear then a pulse width modulation (PWM) strategy which the Pi uses. This linearity implies much better sound quality.