Realtime necessary?

This forum is for discussion about general software issues.

Realtime necessary?

Postby masterkw » Fri Oct 16, 2020 8:10 pm

Hi,

I‘ve read much about bitperfect audio, realtime (-kernel), even realtime-privileges and PAM, but no idea.

My config is just „flac in over RJ45 and USB out to amp/dac“ (no I2S). Therefore, is a realtime-kernel really necessary to optimize or is it „good/perfect enough out of the box“? Actually I have no problems with playback.

My „light setting“ (audio player only):

  • - latest ALARM (Odroid C1+)
  • - mpd/mpc
  • - alsa-utils
  • - lighttpd

Regards,
Oliver
Last edited by masterkw on Sat Oct 17, 2020 4:41 am, edited 1 time in total.
masterkw
 
Posts: 9
Joined: Wed Oct 07, 2020 8:06 am

Re: Realtime necessary?

Postby moonman » Fri Oct 16, 2020 9:39 pm

I am not an audio engineer or anything similar, but it is my understanding realtime kernel is necessary for audio recording and production. If all you do is playback audio there is no need. 5ms delay won't affect the sound quality coming out from the speakers. But anyone is welcome to correct me if I'm wrong.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3302
Joined: Sat Jan 15, 2011 3:36 am

Re: Realtime necessary?

Postby masterkw » Sun Oct 18, 2020 8:45 am

Thank you so far.

Does it make sense to limit the speed when I only playback music? I've read this topic and for that reason he limited (see bottom line) his NanoPi NEO3 to 1Ghz
masterkw
 
Posts: 9
Joined: Wed Oct 07, 2020 8:06 am

Re: Realtime necessary?

Postby summers » Sun Oct 18, 2020 10:03 am

Probably depends on what other hardware you have.

Me, on my desk top, I record via an external Focusrite usb box. That box is good, it records at stupidly high rate, and bits, with very low noise, does phantom power. But importantly it buffers data before going across the usb. I believe it has its own internal clock (actually I should check). So for me that focusrite box does all the hard work, the desk top computer just needs to read the data.

But if you have a microphone just going straight into your computer, and the computer sound card doesn't do buffering, or has its own clock; then yes the OS e.g. the kernel needs *very* good timing - it isn't really what the linux OS is designed for, but yes will work with real time kernel.

Its the same with MIDI signals (e.g. from a keyboard), yes need good timing, until you have got the time signal into the midi packets.

My advice, is if you want any kind of quality - go to an external usb sound box like the focusrite. That will put you back £150 or so - but that is a good investment, as you trying to do anything that gets close to that quality would take huge time and expense.
summers
 
Posts: 867
Joined: Sat Sep 06, 2014 12:56 pm

Re: Realtime necessary?

Postby masterkw » Sun Oct 18, 2020 10:47 am

I've ripped all my CDs and only listen to digitized music stored on my NAS. My amplifier is an Audiolab M-One and my Odroid C1+ works as a kind of "middleware". Basically, a direct USB connection from NAS to AMP works well, but after an indefinite period of time, the NAS "falls asleep" and lose connection (Synology software Audio Station). The Odroid with it's "mediating role" keeps NAS "alive" using SMB/CIFS transfer.

No additional hardware else, no recording, no mic, etc.
masterkw
 
Posts: 9
Joined: Wed Oct 07, 2020 8:06 am

Re: Realtime necessary?

Postby summers » Sun Oct 18, 2020 11:26 am

From what I can see of the Audiolab M-One its a good bit of kit. So looks to me like the audio data is sent to in asynchronously, and the M-One recreates the sound against its own clock.

As such the M-One is doing all the real time processing, so linux won't need to do any of the processing, it will just need to feed the data across the usb bus at a fast enough rate, and not overflow, or empty buffers.

My focusrite does all this seamlessly, and I'd expect your M-One to be the same.

So as the data came from CD originally, so is already digital, the quality of your output should depend only on the M-One, and so transparent to the linux computer.

With the NAS problem, you'll need to work out how to keep it awake. Mine doesn't do that. Just a thought, you could copy all the files to be played for a CD into /tmp on the odroid-c1 and just play from there? Me, I keep the CDs on the NAS as flac files. But have a copy on my computer in opus format. This way I have the raw CD data if I need it, but usually just listen to the opus files, where there is plenty of room to keep them on the main computer (I've 1000's of CDs ...)
summers
 
Posts: 867
Joined: Sat Sep 06, 2014 12:56 pm

Re: Realtime necessary?

Postby masterkw » Sun Oct 18, 2020 12:45 pm

Okay, I expressed myself unfavorably, it was more fun. My NAS doesn't fall into sleep mode, standby or similar, is just lose connection, because data flow stops, quit by amps's display status "unlocked", which means "no incoming source signal". Only unplug the USB cable and everything's fine.

But if you're relaxing and in a light mood, suddenly music stops and you have get up to solve the problem over and over again... so I got to my Odroid. ;) :D

So, I think I'm fine with that config and thank you for your assessment.
masterkw
 
Posts: 9
Joined: Wed Oct 07, 2020 8:06 am


Return to General

Who is online

Users browsing this forum: No registered users and 3 guests