this post was submitted on 04 Sep 2023
59 points (95.4% liked)

Linux

45573 readers
792 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

What are the main differences between pipewire and pulseaudio? Which one is better? What are other alternative popular sound servers besides these two?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 13 points 10 months ago (19 children)

What sort of problems have you heard of or seen? I'd like to hear your different perspective, if that's ok with you?

[–] [email protected] 4 points 10 months ago (6 children)

Fewer kernel calls between hardware and software for loerw latency processing of audio is a must, there is a minimum amount of latency you can have with audio for anyone performing and that's debated by a total round trip time frame. From the second someone plays a note on say a guitar to the moment the resulting sound comes out of their speakers and into their ears is rather critical for timing.

Trouble is to do most anything with digital audio you require a buffer (here we add more latency) so that we can do the things we need to. Your audio device will have it's own buffer (and in the case of ALSA and Linux) your operating system will implement what's considered an audio "server" which will add is own buffer to route to whatever you are thinking you need to do and blah blah so on so forth. HAL drivers like ASIO mean you have much higher stability and much lower latency as you now have fewer buffers which is less added latency, fewer interruptus to deal with, and everything just kinda works in harmony. If you want to learn more consider first learning what ALSA is or any of the terms I originally used. I suggested starting with the wiki page where all of this is already explained

[–] [email protected] 0 points 10 months ago* (last edited 10 months ago) (5 children)

Disclamer: I touched kernel driver development only for tiny TRNG driver for Rockchip SoC, but I mostly write user-space applications and did not touch audio directly as developer(only through OpenAL-soft).

Fewer kernel calls between hardware and software for loerw latency processing of audio is a must, there is a minimum amount of latency you can have with audio for anyone performing and that's debated by a total round trip time frame.

My eyes!

  1. There are no "kernel calls between hardware and software" normally. Well, Intel graphics drivers have execution requests, but that is definetly not what you wanted to say.
  2. Maybe you wanted to say fewer system calls? In that case I am sorry to disappoint you, but ALSA documentation states it has mapped ringbuffers, so it's already "zero" syscalls(preemption will still happen, but it is possible to make no context switches on multi-core system).
  3. Maybe you wanted to say fewer register updates? In that case the only solution is to make better drivers and better hardware.
  4. ALSA has much less latency than IPC-based APIs like JACK or Pulse.

Trouble is to do most anything with digital audio you require a buffer (here we add more latency) so that we can do the things we need to.

Correct, audiocards don't implement raw dac access because it is jittery shit.

Your audio device will have it's own buffer (and in the case of ALSA and Linux) your operating system will implement what's considered an audio "server" which will add is own buffer to route to whatever you are thinking you need to do and blah blah so on so forth.

And here you are mixing everything together to the point of being incorrect. ALSA is not audio server, it is audio userpace-to-driver api. You can opt for using audio server and you can opt to make alsa application to go through 11 out of 9 ring of hell to use audio server. There are two buffer at this point: one on your audio card(and you can do nothing about it) and one(or multiple "parallel" if mixing is enabled) in ALSA driver.

HAL drivers

Please stop adding more and more abstraction layers.

like ASIO

Ah, monopolistic(exclusive) mode. So many people complained about mixing being disabled by default, now people complain of it being enabled by default. I want to make a joke about OSS(deprecated API back in 90-ies).

mean you have much higher stability

ALSA is as stable as it gets. If your software is unable to keep-up with updates, then write software better.

and much lower latency as you now have fewer buffers which is less added latency, fewer interruptus to deal with,

So less latency or less interrupts? To reduce amount of interrupts you need to increase size of buffer and latency. Opposite is also true. You cannot say C and D both are less then A and B in A*B=C*D. At least using regular algebra.

If you want to learn more consider first learning what ALSA is or any of the terms I originally used. I suggested starting with the wiki page where all of this is already explained

Now I really want to know what you know about ALSA because it seems you don't know it well even as a user.

Funfact: you can force any application using ALSA to exclusive mode. Expect exclusive mode side-effects: no sound from other applications.

[–] [email protected] 0 points 10 months ago

I don't know how you got so confused about this. Noting I said was incorrect to begin with you just love of made your own nonsense explanation for everything. I suggest doing some research on the subject. YIKES! Lemmy dunnings strike again

load more comments (4 replies)
load more comments (4 replies)
load more comments (16 replies)