Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

134.3. alsa-lib-1.2.16.1

ALSA library used by programs (including ALSA Utilities) requiring access to the ALSA sound interface

Version 1.2.16.1, release 1
Shelf audio-io — The sound stack: ALSA, PipeWire and WirePlumber, PulseAudio client, and portable audio I/O APIs
Phase 41_system (System), 13 of 1047 in build order
Licence LGPL-2.1-or-later
Homepage https://www.alsa-project.org/
Build time 0.6 SBU
Installed size 2.2 MiB in 139 files
Recipe ports/core/audio-io/alsa-lib/kpkgbuild

About

alsa-lib is the user-space half of the Advanced Linux Sound Architecture: libasound, through which a program opens a sound card’s PCM, mixer, MIDI and timer devices, and the configuration language, read from /usr/share/alsa/alsa.conf, that defines virtual devices on top of them. Every program that plays or records sound on KDOS without a sound-server library of its own goes through it, which is why so many ports depend on it, and PipeWire both drives the cards through it and offers itself back to plain ALSA programs as a device.

Sources

Dependencies

Depends on: alsa-ucm-conf, alsa-topology-conf.

Required by (74): alsa-utils, ardopcf, ardour, audacious-plugins, audacity, avidemux, baresip, bluez, brltty, chess-tui, chromium, cmus, direwolf, dosbox-staging, dosbox-x, ffmpeg, firefox-esr, fluidsynth, freerdp, ft2-clone, furnace, gimp, gnuradio, gst-plugins-base, hydrogen, kmix, kodi, kwave, libao, libcanberra, libmikmod, librewolf, libsndfile, libsoundio, lirc, lmms, mednafen, milkytracker, mlt, mpd, mpg123, mpv, mumble, musescore, obs-studio, openal-soft, openjdk, openmsx, pcaudiolib, pipewire, portaudio, portmidi, predict, qemu, qsstv, qt5-qtmultimedia, qt6-qtwebengine, qv4l2, retroarch, rtaudio, rtmidi, schismtracker, scummvm, sdl3, sniffnet, sox, speech-dispatcher, stk, strawberry, termusic, thunderbird, vice, vlc, wine.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install alsa-lib'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/audio-io/alsa-lib.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/audio-io/alsa-lib
echo 'f740db7f488255944ffd4428416ee3390a96742856916433df468c281436480e  alsa-lib-1.2.16.1.tar.bz2' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/alsa-lib
SRC=$SRC_ROOT/alsa-lib-1.2.16.1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf alsa-lib-1.2.16.1.tar.bz2 -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

  	./configure --prefix=/usr
make
make DESTDIR=$PKG install

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/alsa-lib, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf alsa-lib-1.2.16.1-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/alsa-lib, and runs the triggers its paths call for.

Contents

Installed programs: aserver.

Installed libraries: libasound.so, libatopology.so.

Installed directories: /usr/include/alsa, /usr/share/alsa/cards, /usr/share/alsa/ctl, /usr/share/alsa/pcm, /usr/share/licenses/alsa-lib.

Short descriptions

alsa.pc Advanced Linux Sound Architecture (ALSA) - Library
alsa-topology.pc Advanced Linux Sound Architecture (ALSA) - Topology Library

Notes