77

Well, this confuses me for a long time. As far as I know, ALSA is a package of many sound card drivers, and PulseAudio is a audio application that operate the sound data like mixing or equalizer.

But why there is a control bar called PCM in the panel of alsamixer. Does that actually change volume by controlling the chip on the sound card? If not, why it isn't PulseAudio'a job?

What is the relation between ALSA and PulseAudio sound architecture?

Kevin Dong
  • 1,015
  • 2
  • 9
  • 11

1 Answers1

93

PulseAudio basically sits atop ALSA and uses it internally. ALSA is unable to be used by multiple applications by itself. PulseAudio provides this functionality among others.

Summarized:

  • ALSA - dealing with the hardware, basically owning it.
  • PulseAudio - a software proxy providing additional featues (mixing, equalizer) between your application and the ALSA/OSS subsystem.

This diagram is from the Wikipedia page of PulseAudio:

PulseAudio operational flow chart

htellez
  • 103
  • 4
meskobalazs
  • 2,883
  • 17
  • 26
  • Could you be so kind and write, where does the ALSA loopback device sits in this model? (the one, that gets installed by `sudo modprobe snd-aloop`)? – Adam Ryczkowski Mar 21 '17 at 09:43
  • My guess is that is in the ALSA/OSS HW driver square. AFAIK it is basically a soundcard implemented fully in software. – meskobalazs Mar 21 '17 at 09:54
  • google just brought me here but "ALSA is unable by itself to be used by multiple applications" is untrue. It has just worked by default since alsa 1.0.9... released in 2005. – Adam D. Ruppe Oct 19 '19 at 01:59
  • @AdamD.Ruppe AFAIK the `dmix` plugin provides mixing, that's why I said "by itself". – meskobalazs Oct 20 '19 at 13:09
  • Where does pavucontrol fit into this? – Paul Draper Oct 21 '20 at 22:16
  • 1
    @PaulDraper pavucontrol is a frontend application for configuring pulseaudio mixing, so it's in the application layer. – meskobalazs Oct 22 '20 at 08:35
  • 1
    The dmix plugin has been integrated with alsa and enabled by default since version 1.0.9 released in 2005. From any real metric, it is part of alsa by itself. It is simply misleading to imply alsa doesn't do what it has done successfully BY DEFAULT for over 16 years at this point. – Adam D. Ruppe Jul 09 '21 at 13:25