Bit Perfect Audio from Linux
Nov 3, 2012 at 10:05 AM Post #76 of 543
Quote:
Sometimes with the E10 on ALSA though, playback speed gets doubled at arbitrarily random occasions. I just reset the device back to default, but some might view it as annoying.

 
 
Never had that happen with me. Must be software related.
 
Thankfully, I've never messed with pulseaudio at this point 
tongue.gif
. Probably a better solution exists, but I don't use the FiiO enough to warrant finding out why.

 
Spare yourself the headache and just leave it if it works. Apparently OSS4 is a very good audio system, but I'll only try it in about a months time when I do the bi-annual clean install.
 
Nov 3, 2012 at 12:43 PM Post #77 of 543
Quote:
Originally Posted by Hark3n /img/forum/go_quote.gif
...
 
After that it was over to finding the best player. For years I have been a staunch devotee to Amarok. Brilliant player with exceptional media library functions. Only problem is that it passes everything through its own mixer and highest output, according to the cat command, is only 16/48. That is while playing 24/192 audio. Also, for some reason the SQ is really bad. Allot of distortion. Enough so that I can hear it over my cheap desktop speakers. And it is not a volume problem. Even turning it down still result in serious distortion.
 
So with that I said goodbye to Amarok as my player of choice, although I still use it for music management, and setting off to find a new player.
...

 
I've been using exclusively Amarok for the past months, and it's as bit-perfect as any Linux system can get. I use Gstreamer backend, configured to output directly to the hardware without any conversion. It plays any sample rate just fine, and the hw_params are the same as with deadbeef. I think your Amarok system simply is not configured properly.
 
I'm currently using Kubuntu 12.04 with Amarok 2.5. This Amarok version has a few annoying bugs that I hope were fixed in 2.6, which comes with Kubuntu 12.10. I downloaded the dvd for a clean install, but college has kept me too busy to reinstall everything. I'll report back when I finally get a chance to try the latest releases.
 
Nov 3, 2012 at 1:08 PM Post #78 of 543
Quote:
Originally Posted by KimLaroux /img/forum/go_quote.gif
 
I think your Amarok system simply is not configured properly.

 
Not at all impossible. Like I said, I only do a fresh install every couple of years and there is one just around the corner for me, so there might be serious improvements that I haven't gotten yet.
 
Nov 3, 2012 at 5:35 PM Post #79 of 543
Quote:
 
 
Never had that happen with me. Must be software related.
 
Spare yourself the headache and just leave it if it works. Apparently OSS4 is a very good audio system, but I'll only try it in about a months time when I do the bi-annual clean install.

Probably not. A few posts into the thread, and I see that many have experienced similar problems with some portable dacs. Most likely something with the internal dac at high sampling rates. Just don't go over 24/96, and you'll be fine. 
 
Assuming that you're using Ubuntu (bi-annual install was the hint), I was curious on why you would have 25 devices listed by ALSA though. 
 
Nov 4, 2012 at 3:21 AM Post #80 of 543
Quote:
Assuming that you're using Ubuntu (bi-annual install was the hint), I was curious on why you would have 25 devices listed by ALSA though. 

 
Not Ubuntu, but Kubuntu. I usually only upgrade with every new LTS release, but this year I'm waiting for December. Have a couple of new HDD's to buy and then redo everything.
 
Anyway, onto the 25 devices thing. Command line lists only shows 3 devices. DigiHug (the E10), Nvidia Analog (onboard sound) and Nvidia HDMI stub (graphics card). Phonon is the bugger that lists absolutely everything, some even twice. Here's a couple of screenshots to show my list.
 
 
 
 
As you can see, quite a list. Doesn't bother me anymore, now that I know which devices to use.
 
Nov 4, 2012 at 3:44 AM Post #81 of 543
Quote:
 
Not Ubuntu, but Kubuntu. I usually only upgrade with every new LTS release, but this year I'm waiting for December. Have a couple of new HDD's to buy and then redo everything.
 
Anyway, onto the 25 devices thing. Command line lists only shows 3 devices. DigiHug (the E10), Nvidia Analog (onboard sound) and Nvidia HDMI stub (graphics card). Phonon is the bugger that lists absolutely everything, some even twice. Here's a couple of screenshots to show my list.
 
 
As you can see, quite a list. Doesn't bother me anymore, now that I know which devices to use.

Into 12.10? Any specific reason? Nothing major has been really fixed or update this release, but performance has degraded quite a bit (even on Kubuntu), partly due to the social integration stuff. It's been the only edition where not only my usual VBox machine for Ubuntu testing had froze from the sluggishness, many of my friend's machines had completely refused to work without freezing (and these are Core Duos). The general consensus from many users is that performance has gone down as well. Makes me glad I stick to Arch on my home rig. I'd stick with 12.04 (Just wait till 12.04.2 in January if you have to reinstall for several machines without having to go through the usual 1 year's worth of updates)
 
Rant aside, I just found that I have the exact same 25 things that you have listed when on a KDE virtual machine (devices attached), so makes sense. Just got used to alsamixer's output, I guess.
 
Nov 4, 2012 at 4:07 AM Post #82 of 543
Quote:
Into 12.10? Any specific reason?

 
Ah, I missed a section of my previous post. I meant to say that I will be trying Mint in December as well. Friend of mine is a huge Mint fan, and dev as well on some libs, and he is raving about it to no end. Thought that I will try my hand at it this December. If I don't like it I'll move back to Kubuntu. 
 
Nov 4, 2012 at 4:13 AM Post #83 of 543
Quote:
 
Ah, I missed a section of my previous post. I meant to say that I will be trying Mint in December as well. Friend of mine is a huge Mint fan, and dev as well on some libs, and he is raving about it to no end. Thought that I will try my hand at it this December. If I don't like it I'll move back to Kubuntu. 

Ahh, Mint, now there's a solid distro. Although I would hope there be something akin to a LTS version, or to stick to the Debian edition, as I think the performance regressions on 12.10 go more than skin deep. Hopefully they fix them before December 
wink.gif

 
Nov 4, 2012 at 5:07 PM Post #84 of 543
This happened to me too.  It's because your DSP (like mine) does not natively support 88.2KHz.
 
You can confirm this (as I learned from another poster on this thread) by running 
  % cat /proc/asound/card0/stream0
 
Here's an example from mine (an Audio-GD DAC 19DSP)
GFEC ASSP DigiHug USB Audio at usb-0000:00:13.0-1, full speed : USB Audio

Playback:
Status: Running
Interface = 3
Altset = 2
URBs = 3 [ 7 7 8 ]
Packet Size = 582
Momentary freq = 48000 Hz (0x30.0000)
Interface 3
Altset 1
Format: S16_LE
Channels: 2
Endpoint: 3 OUT (ADAPTIVE)
Rates: 8000, 16000, 32000, 44100, 48000, 96000
Interface 3
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 3 OUT (ADAPTIVE)
Rates: 8000, 16000, 32000, 44100, 48000, 96000

 
There's no "88200" value in the "Rates:" line.
 
When I play an 88.2K album, I manually enable the "Secret Rabbit Code" resampler.  This does exactly what I want: downsample to 44.1 but preserving the 24-bit depth:
Status: Running
Interface = 3
Altset = 2
URBs = 3 [ 8 8 8 ]
Packet Size = 582
Momentary freq = 44100 Hz (0x2c.199a)
Interface 3
Altset 1
Format: S16_LE
Channels: 2
Endpoint: 3 OUT (ADAPTIVE)
Rates: 8000, 16000, 32000, 44100, 48000, 96000
Interface 3
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 3 OUT (ADAPTIVE)
Rates: 8000, 16000, 32000, 44100, 48000, 96000

 
 
Quote:
I was using Deadbeef for while now and thought I did it to Bit Perfect settings. Using Alsa / USB CODEC USB AUDIO IEC956 S/PDIF output to my DAC. I also set the Alsa plugin to not use ALSA resampling. I never worried about the DSP tab. Now after reading the post from Kim Laroux quoted above, I removed the Resampler (Secret Rabbit Code) and restarted. Unfortunately all my HD 24kbit 88200Hz music files play now half velocity. So this means what got out before was not Bit Perfect, because it had to go through the Resampler. Well, I am confused. Can anyone help?
 
Nov 27, 2012 at 9:39 AM Post #85 of 543
Hi guys,
 
Thanks for all the tips, I have done great progress... but I still have the same trouble than Gustmahler in reply 59: if I disable DSP, my 96kHz files are played at 48kHz speed, i.e. twice slower and twice deeper (using DeadBeef and Ubuntu 12.04 on a (very) old DELL Inspiron 8600, output directly to SPDIF, not USB). 
 
Is it a pb with my DAC? It is however supposed to accept anything from 32 to 96kHz according to the manufacturer (it's a Musical Fidelity kW DM25).
 
Thanks for your answers,
 
Nov 27, 2012 at 10:58 PM Post #86 of 543
I just tried to replicate the bug, but it works just fine here.
 
Ubuntu 12.04.1
DeadBeef 0.5.5
 
No DSP, No plugins.
Output plugin; Alsa.
Output device; Digital (SPDIF) Direct hardware device without any conversion.
File FLAC 96Khz 24bit.
 
My DAC is an Audio-gd NFB-12.
 
The audio plays at the right speed.
 

 
 
Maybe the Alsa wiki has information regarding this. I'm not sure though where to look as the bug could be the sound card, the DAC itself not being supported, or simply a configuration corruption.
 
Nov 28, 2012 at 2:38 PM Post #87 of 543
Hi Kim,
 
Well, actually, I cannot use the option "Direct Hardware without any convertion", because in that case the output is not directed to the spdif (no sound). I use instead "IEC958 (s/pdif) Digital Audio Output".
 
The interesting thing is that in the file hw_params, I see rate 48000 (see printscreen below), and on my DAC display I also read 48000 as well, but on the status bar of DeadBeef I read 96000 (the actual definition of the file). So a 96k file is read at 48k/sec. Also interesting is that the time on the status bar shows 13:15/8:30. It continues reading until 17:00 (in this case), confirming a half rate reading.
 
The funny thing (so to speak) is that 44,1kHz is also read at 48kHz, making the tracks a bit shorter this time.
 
Couldn't see anything in the alsa wiki.
 
What do you mean by "configuration corruption". How do you address that?
 
Many thanks,
 
image.tiff


 
Nov 28, 2012 at 11:47 PM Post #88 of 543
Yeah I think the problem is software. By default ALSA resamples everything to 48khz so it can mix different sources together. The only way to bypass this is to use "direct hardware device without any conversion". Since you're not using direct hardware, everything gets sampled to 48khz. I find it amusing though that it cannot properly downsample to 48khz. It seems as though a programmer somewhere had an "oops" moment.
 
Wait, you're saying even 44.1khz isn't resampled properly? Wow that's weird. I think your ALSA is broken. Maybe the driver it uses is not the right one for your audio device. Does this happen only using Deadbeef? Are other music players playing at normal speeds?
 
There's actually a couple of "direct hardware device without any conversion". There's Analog and Digital. Analog uses the DAC of your sound card while Digital uses the SPDIF out. Are you sure you're using the Digital out?
 
If you're unsure which to use, can you paste the output of "aplay -L"? Note the capital L. This is where the "Output device" drop-down menu of Deadbeef comes from.
 
Nov 29, 2012 at 4:36 AM Post #89 of 543
Well, I can downsample to 48kHz but only with the resampler Secret Rabbit Code installed in the DSP tab of the Preferences pannel. If I remove it, as you suggested earlier, it doesn't work properly. The same wiht 44.1: it only works with a rabbit nearby, which completely defeat the "bit perfect" concept. Do you have an idea on why "direct hw..." doesn't work with the spdif output? Would it work better with usb?
 
aplay -l outputs:
card 0: I82801DBICH4 [Intel I82801DB-ICH4], device 0: Intel ICH [Intel I82801DB-ICH4]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
 
card 0: I82801DBICH4 [Intel I82801DB-ICH4], device 4: Intel ICH - IEC958 [Intel I82801DB-ICH4 - IEC958]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
 
Thanks a lot
 
Nov 29, 2012 at 5:54 PM Post #90 of 543
Just for testing, could you try running "vlc --alsa-audio-device=hw:0,4 -I qt4 -d" in terminal. This runs VLC using card 0 device 4.
 

Users who are viewing this thread

Back
Top