RaspyFi » bit perfect http://www.raspyfi.com Pi never sounded so good! Mon, 16 Dec 2013 15:20:41 +0000 it-IT hourly 1 Raspberry Pi Usb Audio fix http://www.raspyfi.com/raspberry-pi-usb-audio-fix/ http://www.raspyfi.com/raspberry-pi-usb-audio-fix/#comments Fri, 10 May 2013 11:46:44 +0000 admin http://www.raspyfi.com/?p=392 Ladies and gens, finally usb audio problems affecting the Pi, have been solved! For those of you seeking a Raspberry Pi Usb Audio fix, you’re in the right place!  I was compulsively lurking this thread hoping that the foundation would eventually

L'articolo Raspberry Pi Usb Audio fix sembra essere il primo su RaspyFi.

]]>
Ladies and gens,

finally usb audio problems affecting the Pi, have been solved! For those of you seeking a Raspberry Pi Usb Audio fix, you’re in the right place!  I was compulsively lurking this thread hoping that the foundation would eventually find a fix for the usb issue. What was it?

Well, to make it simple, when the usb bus of the pi was receiving lot of i\o requests, it cannot satisfy them all, and as a result part of the data travelling trough usb was lost. So, while communicating with a usb dac , if the file being played was more than 44/16 the usb bus was overwhelmed and some parts of the data (packets, jargon comes in finally) was lost. If you google for packet loss, you can figure out what was happening.

I’ve been investigating a lot on the matter, hoping to find a Raspberry Pi usb audio fix , tried almost everything. But this was in the hands of the foundation, since there is no extensive documentation available.

Finally, the Raspberry Pi usb Audio Fix came on Thu May 09, 2013 9:19 am, from gsh (which has my imperiture gratitude)

Basically, this updates some part of the pi firmware and kernel, via rpi-update (this is an experimental branch you won’t find on the master branch of rpi-update by hexxeh 

For those of you on RaspyFi, update is hassle free since you already have rpi-update up and running. Just do this to enable the Raspberry Pi Usb Audio Fix:

sudo apt-get install git-core binutils

sudo BRANCH=fiq_split rpi-update

Let it run, it will need almost 20 minutes to complete. In case you’re receiving some errors, just retry. Sometimes the git servers are not able to face the requests of thousands users simoultaneusly.

Once it’s done, and you’re not getting any error, just reboot.

Now, it’s time to enable bit perfect playback on RaspyFi via mpd.conf

sudo nano /etc/mpd.conf

the line:

format “44100:16:2″ # optional

becomes

#format “44100:16:2″ # optional

ctrl + x to save.

Now, we’ll restart mpd:

sudo /etc/init.d/mpd restart

 

Now, play and enjoy! Files >44/16 will be played without glitches, and I hope that async dacs will work flawlessly as well! I cannot confirm this by now since I don’t have any async to the test this Raspberry Pi usb audio fix for them… But please let me know via comments below.

To check if your Pi now resides in Bit Perfect heaven just type, while playing:

cat /proc/asound/card0/pcm0p/sub0/hw_params

The output will show you current bit rate and bit depth, that should be the same as the file. Please note that if a bit rate/bit depth is not supported by your dac, mpd will automatically resample it to  the nearest supported one.

Here, an example (showing different bitrates/bitdepths, with perfect sound)

Raspberry Pi in bit perfect mode

Raspberry Pi in bit perfect mode

Obviously, this raspberry pi usb audio fix will be implemented and working out of the box in next Release of RaspyFi, which is in its final stage of development.

This raspberry pi audio fix, also can be excecuted on plain Raspbian and all the other distros out there. Just type that:

sudo apt-get install git-core
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo BRANCH=fiq_split rpi-update

Et voilà, you’re done! Please let me know if it works for you, and if you got some troubles doing it !

 

UPDATE FOR SAMBA USERS

As suggested by Klinkt Beter and Carlo Bernardini this fixes the samba issues for async dac users. With my new xmos to i2s dac  and this fix I don’t have any stuttering at 24/96 , some reports this works well with 24/192 as well. So edit /etc/auto.nas as follows:

Nas    -fstype=cifs,file_mode=0777,dir_mode=0777,iocharset=utf8,sec=ntlm,rsize=2048,wsize=4096,cache=strict,username=pi,password=    ://192.168.nasip/sharename

 

 

L'articolo Raspberry Pi Usb Audio fix sembra essere il primo su RaspyFi.

]]>
http://www.raspyfi.com/raspberry-pi-usb-audio-fix/feed/ 127