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.
I brought DLNA/UPNP up because

a. I wanted to test how to configure the Raspberry Pi as UPNP renderer
(To checkout if there is an alternative to squeezelite. I won't go for MPD!!)
b. I do have an UPNP server (Serviio) running for Video, Audio and Images
anyhow
c. there are network audio renderers supporting UPNP only
We're just checking out the giant killer (NAD D7050), a network based
Full Digital Amplifier, which runs UPNP only.
d. all my phones and tablets can also act as UPNP renderer

There are several reasons for having a closer look at UPNP.

I did realize now that Android UPNP control apps can't compete with SqueezeUniverse controllers like iPeng or OrangeSqueeze.
From that persepective UPNP would be a significant step back.

My main priority and decision criteria for a system is the quality of availble control apps. That's where e.g. MPD failed.

Cheers
 
It's a huge tread. Just to say hello happy linux users :cheers:

I am an old linux user, begining with Suse on a 386, and now on gentoo ~amd84 for production and debian for testing. I also begun with rt-kernel at the time when no audio distribution was born. It was the only possibility to get jack to work in realtime as a normal user at that time. Now, I back with a "normal" kernel and the cgroups to get rt, that on gentoo. Unfortunately, they succeded to make the kernel cgroups fully unusable on Debian, so no rt on that box, and I don't want to install a rt kernel anymore if a vanilla one can provide me the same functionalities..
 
I was not online for 14 days.
I thought I'll give a short feedback anyhow.


Hey, finally another gentoo user!

Poor you. ;)


Do you care to share your kernel build options regarding real time functionality?

Rüdiger

* Processor Type and features
1. Preemption Model ( Fully Preemtible Kernel)
2. Timer Frequency (1000Hz)


These two options should do. Only these btw are also changed on the Ubuntu Low Latency Kernel (which I run on my Ubuntu Desktop system).
Full Preemption is obviously not avialable on the Ubuntu LL kernel.

My headless servers run newest 3.12.1-rt4

You might also want to checkout the Graysky patch, which explicitely lets you select your processor architecture from "make menuconfig". But that's maybe covered by your Gentoo installation.

Beside that remove all stuff form the kernel you don't need. And that's a lot. Probably 90% of default kernel options are activated, though useless for most machines.
And do not use "make localmodconfig". That option is supposed to select kernel options applicable to your HW only. It never really worked in my case. Usually I ran into hang-ups during boot. I do it manually nowadays (Usally I unselect a lot of driver related stuff, because that's the easiest part).

Once done with the kernel, make sure that your "user" is allowed to apply rt priorities and your app is supporting it. Otherwise the whole exercise is of no use.

Good luck.

Cheers
 
Last edited:
* Processor Type and features
1. Preemption Model ( Fully Preemtible Kernel)
2. Timer Frequency (1000Hz)


These two options should do. Only these btw are also changed on the Ubuntu Low Latency Kernel (which I run on my Ubuntu Desktop system).
Full Preemption is obviously not avialable on the Ubuntu LL kernel.
Good luck.

Cheers

Greetings
Have you compared the audio from a stock LL kernel with one rebuilt with full pre-emptible option and the RT patch?

I use the stock lowlatency kernel with linux mint and I notice a distinct improvement when jackd runs in RT mode (rtprio 99) versus stock priority of 20.

Without jack in RT mode (on LL), the sound is discernible as being somewhat thicker and sticky of a quality akin to congealed blood. Its a non-tactile version of that effect of course.

Since my audio PC is of low horsepower, I would like to save on the effort of compiling a kernel on that pc if possible. Or simply anticipate what kind of improvement a 4 to 6 hours compiling effort will bring to the table.

PS: These are the settings with stock LL

$ cat config-3.8.0-32-lowlatency | grep PREEMPT
CONFIG_TREE_PREEMPT_RCU=y
CONFIG_PREEMPT_RCU=y
CONFIG_PREEMPT_NOTIFIERS=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_COUNT=y
# CONFIG_DEBUG_PREEMPT is not set
# CONFIG_PREEMPT_TRACER is not set


--G0bble
 
Last edited:
Hi folks.

Idea:

I'm thinking of "activateing" a two-way speaker system.

I neither want to run MiniDSP stuff, nor I want to use
a multichannel audio interface and additional amps.
I want to keep things simple.

I'd prefer a PC->Full Digital USB amplifier setup.

Since November Hifimediy sells a very interesting FullDigitalAmp (80$/60€) with asynchronous USB interface.

Basically it's based on the same PCM/PWM technology as used in the DDX320 amp, which I'm using ( a tweaked version of it) for quite some time on my main system.
The idea with the new project would be to use one USB-FD-amp per speaker.
And let the PC (new Cubox-I or similar ) do the DSP work.

Now. I know from earlier (some years back) discussions, that it has been a kind of serious issue to keep two USB DACs in sync.
With above device I'd even have to keep two "asynchronous" USB DACs in sync, which could be worse then adpative mode.

I'm wondering if it is still the case that I can't keep the async USB DACs in sync with Linux/Alsa!?!?

How much would those DACs run out of sync??
Would it depend on the buffer the interface chip uses??

Does Jack help ??

I did read somewhere that a company managed through its propriatary ASIO driver to keep their own DACs in sync on a Windows system. It should be possible somehow.

And there are also speaker which e.g interconnect wireless - Avantgarde Zero 1. Not sure how they manage to keep both sides properly in sync!?!?

Any hints are welcome.

THX
 
> With above device I'd even have to keep two "asynchronous"
> USB DACs in sync, which could be worse then adpative mode.

Using only USB, only adaptive mode can do this, in this case the PC is the master clock, then You Got Another Problem.

Other solution is to transport a master clock (wordclock, etc) between devices, but you'll need to reconstruct it cleanly in each device...
 
With async you get multiple clock domains. Generally you have options:

A) Hope the clocks will not deviate apart too fast and for shorter playbacks (tracks) the difference will not cause any buffer underruns/overruns (xruns). That is actually a reasonable assumption, I have read success reports by people who had no idea they should handle the clock synchronization.

B) Synchronize the clocks by some means (e.g. like this guy http://quicktoots.linux-audio.com/toots/el-cheapo/ if your clock is not generated by PLL)

C) use adaptive resampling (called asynchronous resampling, ASRC in hardware world). E.g. jackd (zita resampler) or pulseaudio (module-combine-sink Modules ). I am afraid you will hit problems with time alignment (the resampled stream being delayed) of all the channels

D) Use a multichannel device with a single clock domain. IMO that is the best solution.

Those HW solutions most likely employ an ASRC chip on input and use its internal clock for master.
 
Since November Hifimediy sells a very interesting FullDigitalAmp (80$/60€) with asynchronous USB interface.
:nownow:

“The UD20 amplifier uses the Savitech SA9023 USB receiver to connect to a USB host (computer, iPad etc). SA9023 works in adaptive USB mode

"adaptive mode" means that it's NOT async!

(the claim that it does not require a custom driver on windows is yet another proof of it not being async...).
 
Last edited:
OK.

I'm running into a few issues. Accidentially, my standalone mpd-based player is out of function. Running mpd on my workstation doesn't work as expected.

Code:
  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND  
 7518 rudi      20   0  623668  16968   6572 S 169,7  0,1  13:07.18 mpd

This is with samplerateconverter "0" (libsamplerate is compiled in)

Anyway, I have no idea how to enable sox with mpd
Obviously, the excess cpu usage is wrong, and unlikley for my machine if anything were right.
This is my current setting:

Code:
audio_output {
        type            "alsa"
        name            "EG-Server (ALSA, RME)"
        device          "hw:0,0"        # optional
        auto_resample    "yes"
        enable          "yes"
     format             "96000:32:2"    # optional
}
samplerate_converter "0"
Code:
media-sound/mpd-0.18.5 was built with the following:
USE="alsa bzip2 curl ffmpeg fifo flac id3tag ipv6 libsamplerate mad (multilib) network ogg pipe pulseaudio systemd tcpd unicode vorbis -adplug -ao -audiofile -cdio -debug -faad -fluidsynth -gme -inotify -jack -lame -libmpdclient -mikmod -mms -modplug -mpg123 -musepack -openal -opus -oss -recorder -sid -sndfile -soundcloud -sqlite -twolame -wavpack -wildmidi -zeroconf -zip" ABI_X86="64"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -L/usr/lib64/sidplay/builders"

Code:
Portage 2.2.7 (default/linux/amd64/13.0/desktop/gnome, gcc-4.8.2, glibc-2.17, 3.12.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.12.6-gentoo-x86_64-AMD_Athlon-tm-_II_X4_630_Processor-with-gentoo-2.2
KiB Mem:    12305492 total,   8033668 free
KiB Swap:    8393956 total,   8393956 free
Timestamp of tree: Mon, 30 Dec 2013 11:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.2.5-r3, 3.3.3
dev-util/cmake:           2.8.12.1-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.14.1
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.12 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo sunrise eva qt
Installed sets: @kernels
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
..in case someone can read something out of it...

Also, for debian an reaitime-patch for mpd exists, i did not find anything equal for gentoo or compiling 'by hand'.
 
Last edited:
Linux Audio Tuning

Hi All,

I've been using VoyageMPD on an Alix 2d2 for around 4 years. Presently I am using an Audiophilleo 1 with PurePower to do the conversion to S/PDIF.

Recently I was much surprised when I hooked up an old DIY CD transport that I was using 7 years ago. It is quite a well regarded CD player in the DIY community that I modded for use as a transport. The tone of the transport is not as good - it sounds a bit thin and wiry, but the illusion of space and clarity is audibly superior to the computer playback. I'm not much of one for small differences - this is a big, plainly audible difference.

I've tried taking out the Audiophilleo and using the USB input on my Metrum DAC (I think it's an OEM HiFace) and while I believe there is a small difference between it and the Audiophilleo, it is nothing compared to the Cd transport.

Overall, I'm very much committed to computer audio. I'm addicted to the convenience. My CDs have been in boxes for 7 years. But this has shaken my commitment a bit.

I'm posting here because most of the advice I'm getting from others regarding the computer is that I'm doing it wrong. I should by a big horsepower box, put Windows 8 or Server 2012 on it, etc.

I'm allergic to Apple and Microsoft, so I can't go there. This post comes to you via CrunchBang Linux.

So, what is your advice regarding my set up to improve it? In particular, I am skeptical that software type tuning can make a large difference. What is something I can easily try on my existing set up that will show me a taste of what can be achieved through software tuning. I have already tested the output of the computer as bit-perfect. I don't use any resampling or software volume controls.

Any and all advice appreciated that doesn't involve buyng Windows or MacOS!

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