Linux Audio the way to go!?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
am now having 2 setups

1. PC with Brutefir at max vol > passive preamp at low volume
2. PC with Brutefir at low vol > passive preamp at max volume

at low level listening, e.g. attenuation of more than 20dB, 1 is much
better than 2. At high volume, 1 = 2

I am using 64 bit floating point so I am aticipating the digital volume control to be a bit better. Am I doing anything wrong? Particularly the cfoa setting.

here is part of my config file

output "llow", "rlow", "lmid", "rmid", "lhigh", "rhigh" , "ltop", "rtop" {
device: "alsa" { device: "hw:0";};
sample: "S24_4LE";
channels: 26/0,1,2,3,4,5,6,7;
delay: 0,2,115,115,120,121,125,125;
dither: true;
};

## FILTERS ##

filter "llowfilter" {
from_inputs: "left"/0.5;
to_outputs: "llow";
coeff: "lowleft";
};

filter "rlowfilter" {
from_inputs: "right"/0.5;
to_outputs: "rlow";
coeff: "lowright";
};

filter "lmidfilter" {
from_inputs: "left"/0.5;
to_outputs: "lmid";
coeff: "midleft";
};

filter "rmidfilter" {
from_inputs: "right"/0.5;
to_outputs: "rmid";
coeff: "midright";
};

filter "lhighfilter" {
from_inputs: "left"/0.5;
to_outputs: "lhigh";
coeff: "highleft";
};

filter "rhighfilter" {
from_inputs: "right"/0.5;
to_outputs: "rhigh";
coeff: "highright";
};

filter "ltopfilter" {
from_inputs: "left"/0.5;
to_outputs: "ltop";
coeff: "topleft";
};

filter "rtopfilter" {
from_inputs: "right"/0.5;
to_outputs: "rtop";
coeff: "topright";
};



Should I use
cfoa 0 0 20;cfoa 1 1 20; cfoa 2 2 20.......

or

cfoa 0 0 20;cfoa 1 0 20;cfpa 2 0 20........?
 
Hi ackcheng.

THX for posting your setup.
What remote and receiver are you using?
I might want to try it.

Comment to digital volume control:

As discussed earlier, to be better then your passive volume control with a pure digital control you should connect your DAC directly to the amp and remove the pasive pre, your redundant coupling caps and connectors. If you further adopt your amp gain it should be possible to drive the digital control between 0 and -12 db.
The only way I am aware of for almost perfect volume control beating this, might be a Shunt-To-Ground volume control (see Lessloss-DAC)

Cheers
\Klaus
 
I have been using an XP/Foobar200/ASIO4All setup for a while with a PCM2706/TDA1543 of my own design/build - similar to the DDDAC model but buffered and just one DAC chip.

Having been using Ubuntu on another machine for some months (so a relative newbie with Linux but learning fast!) I came across this thread and decided Linux may well be the way to go. So my music server is now dual boot with Ubuntu Studio 8.04 and Amarok. A bit of fiddling around (thanks to the DIY-Linux-Audio-Wiki) to get Xine/ALSA to see my USB DAC and its sounding pretty good - I suspect better than the XP set-up. Of course A-B comparisons are very difficult if you have to reboot but I think there is more detail and better spatial effects with Linux.

So from here - where to? Is there tuning in ALSA, buffer sizes and the like? I am not sure what parts of the Wiki are applicable with the Ubuntu distro I have.

Also a minor irritation. In Amarok config under Engine I put "hw:1" as the stereo output. All works well but if I start Amarok with the USB DAC switched off (it uses internal power rather than USB power) Armarok goes back to default and no sound. Setting back to "hw:1" and restarting the music and its fine. Any way for making Armarok keep that setting?

Cheers and thanks for a really useful thread.
 
Hello Chris,

I followed more or less the same path as you. I have a few suggestions that you could check, if you want to spend time on it. Instead of Amarok I would suggest you to use XMMS. Sounds better and will solve the problem you mention. Try the 'real time' option of XMMS also. Do you already put your WAV's on a RAM-disk? That is also worthwhile and under Linux much easier than with Windows.

Next could be to upsample to 48 kHz with the Secret Rabbit converter. Finally, the best you can do is to install Brutus and fine tune your kernel for real time applications as described in the Wiki. The differences between the Ubuntu distros are much smaller than the difference between e.g. XMMS and Brutus. If you go this far you will find it very easy to tell the difference with Windows/Foobar.

Kind regards,
Eddie
 
Thanks Eddie,
Just tried to install XMMS - I ran this "sudo apt-get install xmms" to install, and I get:

"Package xmms is not available, but is refered to by another package. This may mean that the package is missing, has been absoleted, or is only available from another source
E: package xmms has no installation candidate"

I believe its no longer supported - is there another way to install?

I have Audacious installed ( believe it is based on XMMS) but haven't found it as easy to use as Amarok.

Will try your other suggestions as time permits!

Cheers
 
peufeu said:
audacious can replace xmms...

Audacious lacks realtime scheduling support. On some
DACs this makes a clear audible difference.

However. Audacious comes with integrated SRC (Secret Rabbit Code). To use this feature - upsampling to 48khz ( for e.g. PCM270x based DACs) or whatever frequency for other DACs might be more benefitial than the realtime scheduling option with XMMS.

You guys just need to try it.
 
The major advantage of opensource is the availability of source code. If you look at the source of XMMS, it sets realtime priority of the main thread in the main function:

if (cfg.use_realtime)
{
sparam.sched_priority = sched_get_priority_max(SCHED_RR);
sched_setscheduler(0, SCHED_RR, &sparam);
}

It simply sets the highest priority of/and the SCHED_RR (round robin) scheduler policy for the main thread.

The same functionality can be achieved using chrt called under root, see man chrt or e.g. http://www.cyberciti.biz/faq/howto-set-real-time-scheduling-priority-process/. The only possible difference is that an application can set the realtime for individual threads (jackd sets only some threads as realtime), whereas via chrt you will set realtime attributes to the whole application.

Interesting reading https://help.ubuntu.com/community/UbuntuStudioPreparation

Linux is no voodoo.
 
I forgot to mention to run the before mentioned "chrt ...." as root

I prefer:

$sudo xterm
In the new terminal:
root$ chrt ......

to check the rt-priority run

$ps -eo pid,pri,ni,rtprio,command


ackcheng said:
by Brutus,

you mean this?

I called my brutefir based player "Brutus".
Beside the config you're aware of, it has some basic
functions as player.
It also sets the whole environment for best performance.
I also tweaked brutefir sources a bit, to handle the realtime-priorities
better. Eddie and Tom do enjoy pretty much the same setup.
 
OK, I have persevered with Audacious and its really just what I wanted now that I understand how the playlists work - I like it a lot. Listened to an album last night using the 48k upsampling, sounding better than Amarok I think. My system is very good at resolving detail and this seems to be where the improvements are.

Being new to Linux can I just clarify a few things I want to try:

Ramdisk - I assume you are simply preloading the music into ramdisk and pointing the player at it? No fancy way to make Audacious preload itself? Also Eddie mentioned preloading the WAV - all my music is in FLAC, is it better to load the WAV in ramdisk rather than the flac file which Audacious/ALSA would have to decompress? In fact do you consider it better to have all music files on disk in wav rather than any compressed format such that there is no need to do any decompression?

Real-time scheduling - you are saying this can effectively be achieved by upping the priority of the real-time scheduling attributes for Audacious via chrt? I am assuming this would have to be done each time you start Audacious and not something that remains in place across system restarts? Any way to do this?

Again, excuse my lack of Linux knowledge - your help greatly appreciated.
 
Hi Chris.

1. Yes. The flac conversion might cause some sound degradation due to the added processing. Just try it and make up your own mind.
2. RAMDISC. I mentioned that earlier. A standard HD is causing
much higher physical and logical impact than a ramdisc.
You need to copy your files (flac or wav) to the ramdisk
manually. On a CD basis this is acceptable
There is no player offering fullfilebuffering (like foobar)
under Linux.
3. You're right. chrt needs to applied every time you start the
application

You could start Audacious with a script to make live easier doing following changes:

Start a terminal first.

I assume that the binary is called /usr/bin/audacious

$ sudo mv /usr/bin/audacious /usr/bin/audacious.bin
$ sudo touch /usr/bin/audacious
$ sudo chmod 777 /usr/bin/audacious

Now prepare the shell script:

$ sudo gedit /usr/bin/audacious

--------enter below 3 lines------

#!/bin/bash
chrt -f -p 90 /usr/bin/audacious.bin
exit 0

-----Save & Exit -------------


Now you can start audacious as superuser to get access to the realtime priorities assigned to the process

$ sudo audacious


Hope this helps.

Cheers
\Klaus
 
Thanks Klaus, will give all this a go.

I looked up the commands and understand what you are doing. I note you are kicking off the shell script via the sudo command in a terminal - is there a way of doing this from the desktop in the way you normally start a program (clicking on an icon) or would this mean it wouldn't be under superuser?

I must admit I like things nice and easy to use such that others can also use it without having to use terminal/commands.

Cheers
 
First of a all here is a nice HowTo collection for Ubuntu Hardy:

http://ubuntuguide.org/wiki/Ubuntu:Hardy


What you can do:

You can change the starter in the menu first by adding a sudo in front of it. ( I think this works - I am not sitting at my Linux machine right now)
Than you need to avoid the password entry.

This you do the following way.

You need to figure out which group you as a user belong to.
Let say user "chris" belongs to group "audio"

Just type

$less /etc/group

to find out.

Than you do one of following changes:


$ sudo visudo

---- ADD following line for a group---------

%audio ALL = NOPASSWD:/usr/bin/audacious

------- save & exit -------

OR

---- ADD following line for a user---------

chris ALL = NOPASSWD:/usr/bin/audacious

------- save & exit -------


Hope this works.

Cheers
Klaus
 
Thanks Klaus, you are very patient with my poor Linux knowledge! You would never know I have 30+ years in the IT industry but IBM Mainframes are a little different!

However I will invest in some good reading material and a Linux command reference. I really enjoy this crossover between computers and Hifi.

I will try your suggestions this weekend. But right now some quality listening time I think!

Cheers
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.