Updated: 2022-12-26 Mon 17:06

Audio on Linux

Taking a leap into understanding a little more about Pipewire since pulseaudio is being a pain and my mic is not working on my archlinux system either.

Refs:

  1. https://www.youtube.com/watch?v=HxEXMHcwtlI
  2. Soundcard is the DAC to convert analog sound to digital (and vice-versa)
  3. Soundcards also include other hardware for amplifiers etc.
  4. Kernel has a driver that will allow interaction with the sound card
  5. OSS (Open sound system) was the first sound driver.
  6. OSS is now replaced by ALSA (Advanced Linux Sound Architecture).
  7. ALSA provides the required drivers to interact with different forms of devices (mic, headphone, speaker etc.)
  8. ALSA doesn’t allow multiple inputs to one output (multiplexing)
  9. Program (client) -> Pulseaudio (server) -> ALSA (driver) -> sound card
  10. This moves the responsibility of sampling and mixing from ALSA or the card to the server.
  11. The server can also take in multiple inputs from the microphone and push that into multiple programs (outputs)
  12. JACK (Jack Audio Connection Kit) is also a sound server that works better with pro-audio tools.
  13. JACK is more flexible than pulseaudio but is a bit more difficult to use. (as if pulseaudio is easy to troubleshoot…)
  14. JACK also has much smaller latencies.
  15. Pipewire - hopefully the ultimate replacement of both Pulseaudio and JACK.
  16. Pipewire works as a drop-in replacement for Pulseaudio and JACK.
  17. Pipewire needs the session plumber (wireplumber) to actually route audio to devices.
  18. streambay is a Pipewire graph GUI interface.

1. Pipewire installation

  • Install the following:
    • pipewire
    • pipewire-docs for documentation
    • wireplumber for pipewire session management
    • wireplumber-docs for wireplumber documentation
    • qpwgraph for Pipewire Patchbay
    • pipewire-alsa to route all applications using ALSA through pipewire (and remove pulseaudio-alsa if installed)
    • pipewire-pulse to replace pulseaudio and pulseaudio-bluetooth
    • pipewire-jack for JACK support
  • Playing anything after installation should just work. qpwgraph can be used to visualize the sources and sinks.

    2022-12-26_16-37-21_screenshot.png
  • Audio playback works after reboot too, without any extra configuration.
  • To check the microphone, first test on https://mictests.com
    • Mic still doesn’t seem to be working.
    • Checking the graph, when firefox tries to record, the capture device is connected to the Tiger Lake-H HD Audio Controller (Microphone (*)) device which I would assume to be the right one. It is also labelled as a capture device so that tracks too.