ggking7 Posted February 5, 2010 Share Posted February 5, 2010 If anyone is using mpd on Linux with a 24-bit USB DAC (such as the Wavelength Proton), mpd recently incorporated S24_3LE support into the latest version in git. This means mpd can send audio straight to the DAC instead of processing in alsa first. This means no 32-bit conversion in mpd before being converted to S24_3LE in alsa. mpd converts straight to S24_3LE and outputs to the DAC if you specify hw:0,0. I'm noticing a definite improvement on my Audioengine 2A's. Once this change makes it's way to an mpd release instead of only being in the git repository, I bet audiophile mpd users take immediate notice of the change. Link to comment
davidR Posted February 5, 2010 Share Posted February 5, 2010 king this is really cool. I might have to pick up Linux soon. david is hear[br]http://www.tuniverse.tv Link to comment
BobH Posted February 5, 2010 Share Posted February 5, 2010 Linux has a Git Repository - I knew it would! Link to comment
BobH Posted February 5, 2010 Share Posted February 5, 2010 .. and Linux Lovers everywhere, for the above frippery. I just couldn't resist it. Link to comment
vortecjr Posted February 5, 2010 Share Posted February 5, 2010 can you elaborate on what S24_3LE is? I can't find much info on it. What does the mpd config file look like using it? Jesus R www.sonore.us ps that project we spoke about is up and running:) SONORE computer audio | opticalRendu | ultraRendu | microRendu | Signature Rendu SE | endPoint | opticalModule DX | Power Supplies | Link to comment
agillis Posted February 6, 2010 Share Posted February 6, 2010 Nice, If anybody using Fedora wants to test it out I have the latest GIT build of mpd in the VortexBox repo. http://yum.vortexbox.org/releases/11/i386/RPMS/mpd-0.16-5.fc11.i586.rpm agillis Small Green Computer http://www.smallgreencomputer.com/ Link to comment
ggking7 Posted February 6, 2010 Author Share Posted February 6, 2010 S24_3LE is a 24-bit format also known as "packed 24-bit". All 24-bit USB DACs only support S24_3LE. Since mpd didn't support this format before, it converted everything to a 32-bit format and then ALSA was needed to convert that 32-bit format to S24_3LE for a 24-bit USB DAC. That's why I could never get mpd to send audio straight to the Wavelength Proton with hw:0,0. I had to use plughw:0,0 instead because that allowed ALSA to make the conversion. hw:0,0 sends the audio straight to the DAC without any conversion. No other mpd.conf configuration is necessary besides specifying hw:0,0. Jesus, very glad to hear it worked out. If anybody is using Gentoo there is an ebuild which pulls in the latest git, but it isn't in portage. Link to comment
vortecjr Posted February 6, 2010 Share Posted February 6, 2010 thanks for the initial update and additional info! Now I understand what you were doing before with plughw:0,0.... Jesus R www.sonore.us SONORE computer audio | opticalRendu | ultraRendu | microRendu | Signature Rendu SE | endPoint | opticalModule DX | Power Supplies | Link to comment
realmassy Posted June 26, 2010 Share Posted June 26, 2010 Today I had the chance to test my Halide Bridge on a Linux Box, with Ubuntu and MPD. Using the 0.15 version of MPD (with no support for S24_3LE) the sound was dull, flat, at least compared to my Windows 7 box with JRiver. So I've compiled the new alpha version (0.16), and the change is not subtle. I think I'll use this configuration for a few weeks, and then I'll come back to Windows to understand which one I prefer, but so far I'm very pleased. Massimiliano Link to comment
jma2 Posted November 21, 2010 Share Posted November 21, 2010 Hello everybody, A question related to hirez playback on the Ayre QB-9 (upgraded version): According to what I read, the git version of MPD should be capable of delivering S24_3LE directly to the DAC. I build MPD from the git repository: ~/git/mpd/src/mpd -V Cannot create thread 1 Operation not permitted mpd (MPD: Music Player Daemon) 0.16~git Copyright © 2003-2007 Warren Dukes Copyright © 2008-2010 Max Kellermann This is free software; see the source for copying conditions. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Supported decoders: .... [flac] flac [audiofile] wav au aiff aif .... Supported outputs: shout null fifo alsa ao oss pulse jack httpd recorder ffado Supported encoders: null vorbis lame twolame wave flac Supported protocols: file:// http:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// When I play hirez files, the Ayre displays the samplerate correctly (192, 96 where appropriate) and the files played sound great (not sure if perfect) but when I check the stream.... jma2@jma2-900:/proc/asound$ cat card1/stream0 Ayre Acoustics Ayre USB Interface at usb-0000:00:1d.7-3, high speed : USB Audio Playback: Status: Running Interface = 1 Altset = 1 URBs = 3 [ 64 64 64 ] Packet Size = 1024 Momentary freq = 192000 Hz (0x18.0000) Interface 1 Altset 1 Format: S32_LE Channels: 2 Endpoint: 1 OUT (ASYNC) Rates: 44100, 48000, 96000, 192000, 88200, 176400 Data packet interval: 125 us If I understand well, the S32_LE should be S24_3LE for optimum performance. My mpd config file contains: audio_output { type "alsa" name "Ayre QB9" device "hw:1,0" } the hw:1,0 being based on: jma2@jma2-900:/proc/asound$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Interface [Ayre USB Interface], device 0: USB Audio [uSB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0 The version of alsa I am using is: jma2@jma2-900:/proc/asound$ cat version Advanced Linux Sound Architecture Driver Version 1.0.23. The problem might be alsa. And if somebody here is convinced alsa is indeed the problem, I have the following concrete questions: 1) What does the Ayre get over the USB: 24bit or 32bit 2) If it gets 24bit, where is the conversion taking place (if there is a conversion taking place)? And why the S32_LE display in the stream0? 3) If it gets 32bit, is it actually 24bit and a padded zero byte that is discarded anyway? If so, how does this influence the sound quality (timing obstructed?)? 4) What do you think I should do to resolve the issue? 5) If I need to upgrade alsa, where can I find good instructions on how to do so? I am using Ubuntu 10.10 netbook edition. I am not familiar with alsa and as far as I understood alsa comes with many components and it is not clear which components need upgrading and I couldn't find specific instrutions yet. Furthermore, I couldnt find instructions on building all alsa components in one shot (maybe because I'm not familiar with alsa at all).If you have suggestions for a good primer on alsa, please let me know. Before I start experimenting myself and before I ruin my current setup, I would really appreciate any help here. Thanks in advance for any help. Jan MPD on EEE900 (Ubuntu 10.10 netbook ed)-> upgraded Ayre QB-9 -> LFD NCSE -> Esoteric MG-20 Link to comment
vortecjr Posted November 22, 2010 Share Posted November 22, 2010 try this to playing back a wav file of known bit/sample rate and it will tell you what is going on before it plays the file. aplay -d hw:1,0 /storage/16_44.wav I like to name the test files for what they are to make if easy on me during testing to call up different bit/sample rates. Please note your files may be in a different location compared to mine. Jesus R www.sonore.us SONORE computer audio | opticalRendu | ultraRendu | microRendu | Signature Rendu SE | endPoint | opticalModule DX | Power Supplies | Link to comment
jma2 Posted November 23, 2010 Share Posted November 23, 2010 Dear Jesus and other readers, Sorry for the delay for replying and thank you Jesus for the hint. I tried what you suggested and here is the outcome for the hires tracks: jma2@jma2-900:/var/lib/mpd/music/Testwav$ aplay -d hw:1,0 test24-96.wav Playing WAVE 'test24-96.wav' : Signed 24 bit Little Endian in 3bytes, Rate 96000 Hz, Stereo aplay: set_params:1053: Sample format non available Available formats: - U8 - S16_LE - S16_BE - S32_LE - S32_BE - FLOAT_LE - FLOAT_BE - MU_LAW - A_LAW jma2@jma2-900:/var/lib/mpd/music/Testwav$ aplay -d hw:1,0 test24-192.wav Playing WAVE 'test24-192.wav' : Signed 24 bit Little Endian in 3bytes, Rate 192000 Hz, Stereo aplay: set_params:1053: Sample format non available Available formats: - U8 - S16_LE - S16_BE - S32_LE - S32_BE - FLOAT_LE - FLOAT_BE - MU_LAW - A_LAW So correct me if I'm wrong, but I am tempted to conclude/determine the following: 1) my alsa, or at least aplay (which is just one module in alsa AFAIK), does not support 24bit hires files 2) in case my assumption in 1) is correct Jesus, and given the fact that when using MPD v0.16-git for the same files, I get respectively playback on the Ayre with 96 and 192 in the display, there must be conversion involved (do you agree?). And if the source files are 24bit and the Ayre plays 24bit I assume there must be at least two conversions taking place (in different(?) alsa components?), no? I suppose I'm now getting to the point of having to compile and install the ltest alsa... (which version would you suggest?) If you confirm this indeed then I appreciate any pointers on how to proceed. Kind regards, Jan PS: I hope Chris will not complain about the rather OS oriented content of my posts. It only shows that it's not that easy to get things sorted out for hires playback under Linux in an optimal way. Hopefully I won't be the only one to learn from this experience and others might also benefit from this. Most likely these problems will be non-existing in upcoming distributions. Link to comment
The Computer Audiophile Posted November 23, 2010 Share Posted November 23, 2010 "PS: I hope Chris will not complain..." Hi Jan - No worries. If you learned something from the experience the chances are high someone else reading this has learned something as well. The more information sharing the better. Founder of Audiophile Style | My Audio Systems Link to comment
vortecjr Posted November 24, 2010 Share Posted November 24, 2010 First, the command above should have been aplay -D hw:1,0 /storage/24_96.wav caps matter...my bad:) I'm not even sure how you received any useful output... Anyway, seems that things have changed in the Streamlength code from usb 24/96 support to usb high speed 24/192 support! 1. I have the 24/96 Halide Bridge here and the command aplay -D hw:1,0 /storage/24_96.wav works all day long and cat card1/stream0 shows the format is S24_3LE as Grant wrote above. 2. With the 24/192 Wavelink (same code as the GB9) the command aplay -D hw:1,0 /storage/24_96.wav does not work. Instead you need to enter the command aplay -D plughw:1,0 /storage/24_96.wav and cat card1/stream0 shows the format is S32_LE as Jan wrote above. Is a conversion taking place...yep! However, nothing to worry about!! I tested the output of the Wavelink the other day and it's bit perfect:) Jesus R www.sonore.us SONORE computer audio | opticalRendu | ultraRendu | microRendu | Signature Rendu SE | endPoint | opticalModule DX | Power Supplies | Link to comment
jma2 Posted November 24, 2010 Share Posted November 24, 2010 Hello Team (borrowed that one from Jesus), With option -D I get the following: jma2@jma2-900:/var/lib/mpd/music/Testwav$ aplay -D hw:1,0 test24-96.wav Playing WAVE 'test24-96.wav' : Signed 24 bit Little Endian in 3bytes, Rate 96000 Hz, Stereo aplay: set_params:1053: Sample format non available Available formats: - S32_LE jma2@jma2-900:/var/lib/mpd/music/Testwav$ aplay -D hw:1,0 test24-192.wav Playing WAVE 'test24-192.wav' : Signed 24 bit Little Endian in 3bytes, Rate 192000 Hz, Stereo aplay: set_params:1053: Sample format non available Available formats: - S32_LE I've been digging a bit deeper and found that (if I want to go further with this) I will have to rebuild the whole kernel since alsa is part of the kernel. I'll have to collect some more info before I take on this hurdle. In the mean time I'll assume that also on my system, despite the conversions that take place, I have bit-perfect playback. At least the display on the Ayre is consistent with the bit-rate of the material that is played on it. Thanks for the help and feedback Jesus, and if somebody has more experience and knowledge on how to proceed, do not hesitate to share in this - or another thread. Kind regards, Jan Link to comment
joelha Posted December 17, 2010 Share Posted December 17, 2010 I was on another forum (http://forums.slimdevices.com/showthread.php?t=82110) (forgive me, Chris : ) ). I've been trying to get John Swenson's mod on the Squeezebox Touch to output audio through its USB port, a port which is traditionally only used as an input. Reviews have stated that the Touch, using USB as an output, can be an even more impressive, bit perfect device. I know there's a thread for the Touch on this site, but given that the Linux mavens seem to have checked in on this thread, I'm bringing my question here. I've made the mod to my Touch and have connected my HRT Streamer II+ to the Touch via its USB (now) output. While I'm getting sound, I'm also getting an occasional "tick"ing sound. It's occurring about every 20-30 seconds, but its random. Some have suggested that the asynchronous feature of the II+ is what's causing the problem. Yet, I've read at least two people on the internet who say they are using the Touch with the II+ successfully. I've listed the instructions for the mod below. Based on those instructions, does anyone have thoughts about what the issue might be? I apologize if I'm bringing an unrelated topic to this thread but I think my question, given that the Touch is a Linux device, is at least tangentially related to what's being discussed. Thanks in advance for the help any of you are able to offer. Joel You will need to SSH into the Touch. In order to do this you will need an SSH client running on a computer on your network. On windows this is called PuTTy, its free, you can find it on the web. For Mac OSX its builtin, called SSH. PuTTy is a regular windows GUI program, when you bring it up you type in the IP address of the Touch, press . It will then ask for the user, type in root. Then it asks for the password. (See below) For SSH on OSX you have to start a command window, then type: ssh -l root It will then ask for the password. To SSH into the Touch you have to turn remote access on, this is done with settings->advanced->Remote access Touch the "enable remote access" line, you should see the little square go blue. You will also get a popup which gives the IP address and the password, write these down. These will be used when you SSH into the Touch. Now plug the USB DAC into the Touch and reboot the Touch (or reboot and plug the DAC in) Pull the power plug and reinsert it to reboot. When up and running SSH into the Touch (see above). (for each line you see in these instructions type at the end of the line) Type: aplay -l (thats dash ell) This gives you a list of the audio devices on the Touch. You should see the USB DAC. Each device will have a line starting with card such as card 3 USB The name is the one you want to write down. In this case it was USB. It might be something such as "default". In this case the rest of the line will let you know its the USB DAC. Then type: cd /etc cp asound.conf asound.conf.orig sync Now you are going to create a new config file. The only editor available is "vi", which is very weird to use if you have not used it before. It runs in a display mode (default)and an insert mode. You get into insert mode by tapping the 'i', type stuff you want, then tap to get out of insert mode. When in display mode tapping 'x' will delete the character the cursor is under. Tapping 'dd' will delete a line. That should be enough to edit this simple file. In the file below replace with the name you wrote down in the previous step. For example card USB; Type: vi asound.conf.usb tap 'i', type: pcm.usbdac { type hw; card ; } pcm.plugusb { type plug; slave.pcm "usbdac"; } ctl.plugusb { type hw; card ; } pcm.!default plugusb Tap the key type: :wq (thats don't forget the colon) To quite without writing anything type: :!q This will write the file and quit. Then type: cp asound.conf.usb asound.conf sync sync (the syncs make sure memory buffers get written to disk) Type: exit This gets you out of SSH. At this point reboot the Touch and the music should now play through the USB DAC. Link to comment
vortecjr Posted February 12, 2011 Share Posted February 12, 2011 did you ever resolve this issue? Jesus R www.sonore.us SONORE computer audio | opticalRendu | ultraRendu | microRendu | Signature Rendu SE | endPoint | opticalModule DX | Power Supplies | Link to comment
joelha Posted February 13, 2011 Share Posted February 13, 2011 Hi Jesus, I'm sorry to say I didn't resolve the issue. As a matter of fact, because I just didn't have the patience to keep trying to work this out, I've moved to a Mac Mini with as SSD, 8GB RAM, using Pure Music and Amarra. I wish I hadn't had to make the move, but I couldn't find another reasonable alternative. Why do you ask? Did you find a solution or are you just hoping I did? Joel Link to comment
vortecjr Posted February 13, 2011 Share Posted February 13, 2011 I read the post from John and it seems towards the end that he did fix the issue. Look on page 12 http://forums.slimdevices.com/showthread.php?t=82110&page=12 Jesus R www.sonore.us SONORE computer audio | opticalRendu | ultraRendu | microRendu | Signature Rendu SE | endPoint | opticalModule DX | Power Supplies | Link to comment
joelha Posted February 13, 2011 Share Posted February 13, 2011 You're a good man, Jesus. Thanks so much for checking in with me about this. Looking forward to learning more about this mod and giving it a try. Comparisons should be interesting as well. At the very least, I hope to end up with a backup system which I can use just in case. Thanks again, Joel Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now