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.
Hi,
my current Music-PC (Asus P4B) is a bit underused serving as an audio server, so I plugged the RME Digi96 in some even older hardware (Fujitsu/Siemens Scaleo 400) where sox and brutefir run fine, as well as mpd, but only if I don't upsample with libsamplerate.
If I write e.g.
samplerate_converter "0"
format "48000:16:2"
in mpd.conf.
I get stuttering playback. All settings equal to the settings of the former Music-PC.
With sox and brutefir I can safley play 24/96
I played with buffer_time, period_time and other buffer related settings to no avail in mpd.conf.

Let's sum it up. When resampling with sox all the way to 96, your HW can handle it OK. When resampling with MPD, the HW does not keep up? I do not know about brutefir resampling, but sox uses a different resampling algorithm than libsamplerate.

What buffer_time and period_time values did you try?
 
Sox runs fine with input ADC at 24/96 -> alsa -> sox (some biquad filtering) -> pipe -> brutefir (some dummy convolving) -> alsa -> DAC

Or, I play a 16/44.1 file and upsample it to 24/96 using sox, it works fine and needs around 13% cpu power

I tried 2, 4, 8 and 16 times the default buffer values

Rüdiger
 
Last edited:
I found it! It doesn't equal 'understood it', though.

I have to place the samplerate_converter command and the format setting within in the alsa-output section in mpd.conf. Now I have 24/96 resampling with an cpu duty cycle at around 10%.
The default config however is to set the samplerate_converter and format commands globally, as I had it working with my machine flawlessly. This gives me the described error, though.

Rüdiger
 
Did you check in /proc/asound/... that your card really runs at 96kHz? Quality resampling even in sox takes tens of CPU percents.

Yes, according to cat /proc/asound/card1/rme96 it does!

These are my settings:

Code:
audio_output {
	type		"alsa"
	name		"Alsa, Digi96"
	device		"hw:1,0"	# optional
	format		"96000:32:2"	# optional
	auto_resample "no"
period_time "1024000000"
	samplerate_converter "0"

}

Rüdiger
 
Hi folks.

I just installed the 2.6.38 Ubuntu kernel on my Linux Mint.

Really nice. The Desktop feels much better/responsive. Torvalds and his folks didn't promise too much here.

And even the Nvidia driver compiled. Looked great so far.


Then the first "shock". I had to learn that a brandnew 2.6.38 kernel comes with a year old Alsa 1.0.23. :mad:

I thought -- never mind -- the 1.0.24 changelog was long enough to give my Alsa-Upgrade-Script a chance to get 1.0.24 going.

I "almost" made it work. :rolleyes: How I love those Linux related "almost managed" DejaVus.:D

I just had to figure out that the "official" 1.0.24 release comes with a major bug in the alsa-tools. My HDSP mixer did not work. Without HDSP mixer not any RME soundcard -- the supposedly best supported pro-audio cards under Linux - will not work.

After googling the issue I found out that the problem had been fixed already. To make it work I had to download, compile and install the git version of alsa-tools. And guess what. I managed. :D
(No - I won't complain again about Alsa and its quality- and release-management.)

The HDSP mixer have been slightly improved. Still a good distance away from its Windows brother though.




BTW. Due to my little Squeezebox project I stopped maintaining the Alsa-Upgrade script at ubuntuforums.org. A guy called Temuejin continuous
to maintain it over here. The script works well on Ubuntu and Mint systems.


Next little project:

I plan to have a closer look at ulatencyd. This daemon manages scheduling of different processes from userspace. You got to setup rulesets for certain process groups.It might replace rt-patched kernels I guess.
E.g. Jack is explicitly listed as target application.


Cheers
 
Soundcheck, have you tried the liquorix kernels? I currently use them on all my computers, including my squeezebox server desktop. The current version is based on 2.6.37, and includes patches for low latency / RT. I would be interested to hear your opinion on liquorix for linux audio (server and client).
 
Hi folks.

I played around a bit with ulatencyd and also got in touch with the designer.

For those who want to try it:

You can install it via ppa:

sudo add-apt-repository https://launchpad.net/~ulatencyd/+archive/stable
sudo apt-get update
sudo apt-get install ulatencyd

The daemon gets automatically started.


Config:

You can add your preferred app to a particular group under:

/etc/ulatencyd/simple.d

You'll find 3 files.

I changed media.conf ( There is also audio.conf and video.conf) . In media.conf you find the rt scheduled processes.

# mixing processes and other special programs
/usr/bin/jackd sched.rt instant=1
/usr/bin/pulseaudio sched.rt instant=1
/usr/bin/ecasound sched.rt instant=1
/usr/bin/brutefir sched.rt instant=1
/usr/bin/vlc sched.rt instant=1


I took vlc out of video.conf and put it, as well as brutefir and ecasound. into media.conf, since I run rt-prio on all of them.

You see jack and brutefir is put in this group by default.


Hope that's enough for a head start. (Don't forget to get 2.8.38 and Alsa 1.0.24 installed first ;) )

I still need to do some testing on its effects. Let me know what you think.

Enjoy

Cheers
 
Last edited:
I'm now working on a multimedia network setup.

Today I tried Kubuntu 11.04 beta 1.

My plan was to use Digikam (as network setup) as photo management tool in its own environment. Under Gnome it acts a bit weired.
I made it work. I had to learn though that it works slower under KDE than Gnome.
I got pretty disappointed.

Next I had to realize that the audio situation gets even worse in a KDE environment.

I had to learn about phonon+gstreamer+pulseaudio-alsa. Phonon another layer in the game. Oh god. :mad:

Try to compile alsa to get your professional soundcard+tools working under these conditions.

Folks. Linux audio is going down the drain if it continuous like that. As if Alsa wouldn't
be bugging us more than enough. No - those folks involved introduce even more layers.
I'm wondering if all those folks involved ever get in sync.

There's no other way than getting quickly rid of it. Kubuntu 11.04 looks modern and cool, though it's nothing I could live with. And nothing I would recommend to try.
It's a real pity that Amarok and Digikam, two of the IMO best Linux media apps are made for that environment only. Those apps are lightyears ahead of it's Gnome counterparts.


I now gonna try Linux-Mint-Debian (rolling release) and a liqourix kernel. Let see how far I get with this.

Cheers
 
Hi,
you may use mpd (music player daemon) on any modern linux distribution. This daemon reads music files and passes their audio content to your soundcard. You might use it via Music Player Minion, a Firefox plugin on any linux or windows machine. For the network, you just need a basic setup: if you can ping your linux machine from your windows machine, your basically done. Just take care your firewall allows port 6600 (you may change the port settings in mpd, anyway).
You might use an android smart phone player for mpd as well.

Rüdiger
 
thanks. I got the iphone. But i will try it. Linux is all new to me and a bit hard to figure out.

If Linux is new to you MPD is the wrong choice. It's not what I'd call a plug'n play app.


Amarok is IMO the best Linux based media player.

Maybe you'd try VLC player first. That's IMO quite a good one to start with. Though VLC doesn't put a lot of focus on audio.


Audacious goes a bit into the Foobar direction. It also comes with a huge number of plugins.


All Linux apps are still lightyears away from e.g. J.River, which is IMO an amazing piece of SW - from a sound and management perspective. I'd love to see that some Linux designers would just install a test license of JRMC to see what's going on out there.


Cheers
 
thanks. I got the iphone. But i will try it. Linux is all new to me and a bit hard to figure out.

There is an iphone app called 'MpoD' should you choose to use MPD with Linux. It allows you to use your iphone like a remote control.

You did not say whether you intend to use Linux as a server for music or whether you intend it to use a desktop environment. There are a few choices for a Linux GUI.

For the network, samba works very well with Linux & Win 7.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.