ALSACTL(1)

πŸ“¦
version 1.2.16 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ alsactl(1) Β· General Commands Manual πŸŽ€

okay bestie, this is the tea on alsactl πŸ’… it's the tool for the advanced stuff your soundcard can do that your mixer app just won't show you. let's go ✨

✨ NAME ✨

alsactl β€” advanced controls for the ALSA soundcard driver πŸ¦‹

πŸ’– SYNOPSIS πŸ’–

alsactl [options] [store|restore|init] <card # or id or device>
alsactl monitor <card # or id>
alsactl info <card # or id>
alsactl [clean] <card # or id or device> [[control identifiers]]

🌸 DESCRIPTION 🌸

alsactl handles the advanced settings for the ALSA soundcard drivers, and it works with multiple soundcards πŸ”₯ if your card has features you can't seem to control from a mixer application, you have come to the right place πŸ’œ

🌈 COMMANDS 🌈

🧚 Introduction

The <card> argument is optional. If you don't name any soundcards, setup for all cards gets saved, loaded or monitored ✨

πŸ’Ύ store <card>

saves the current driver state for the selected soundcard into the configuration file. easy peasy πŸ“

πŸ”„ restore <card>

loads the driver state for the selected soundcard from the configuration file. if restoring fails (eventually partly), the init action gets called as a backup plan 🫢

πŸ” nrestore <card>

it's basically restore, but it also tells the daemon to do a fresh rescan for available soundcards. main character energy πŸ‘‘

🌱 init <card>

tries to initialize all devices to a default state. if the device isn't known, you'll get error code 99 back πŸ’€

πŸ•°οΈ daemon

manages to save the sound state periodically ⭐

πŸŒ™ rdaemon

same vibe as daemon, but it restores the sound state at first 🧚

πŸ“£ kill <cmd>

notifies the daemon to do the specified operation: quit, rescan, or save_and_quit πŸ”₯

πŸ‘€ monitor <card>

monitors the events received from the given control device πŸ¦‹

πŸ“‹ info <card>

shows the general information in YAML format, collected from the given control device (sound card) πŸ’…

🧹 clean <card> [filter]

cleans up the controls created by applications. the optional element identifiers work as a filter, and one extra argument gets parsed as element identifiers 🫧

Example:

alsactl clean 0 "name='PCM'" "name='Mic Phantom'"

πŸ–¨οΈ dump-state

dumps the current state (all cards) to stdout 🌸

βš™οΈ dump-cfg

dumps the current configuration (all cards) to stdout. heads up: the configuration hooks get evaluated first πŸ‘€

πŸŽ›οΈ OPTIONS πŸŽ›οΈ

  • -h, --help β€” help! shows the available flags and commands πŸ†˜
  • -d, --debug β€” debug mode, a bit more chatty πŸ—£οΈ
  • -v, --version β€” prints the alsactl version number 🏷️
  • -f, --file β€” picks the configuration file to use. the default is /var/lib/alsa/asound.state πŸ“
  • -a, --config-dir β€” picks the boot / hotplug ALSA configuration directory. the default is /var/lib/alsa πŸ—‚οΈ
  • -l, --lock β€” uses file locking so concurrent access to the state file gets serialized (this one's the default for the global state file) πŸ”’
  • -L, --no-lock β€” no file locking for the state file, including the global state file πŸ”“
  • -O, --lock-state-file β€” picks the state lock file path πŸ—οΈ
  • -F, --force β€” used with restore. tries to restore the matching control elements as much as possible. this is the default now πŸ’ͺ
  • -g, --ignore β€” used with store, restore and init. doesn't show 'No soundcards found' and doesn't set an error exit code when soundcards aren't installed πŸ™ˆ
  • -P, --pedantic β€” used with restore. doesn't restore mismatching control elements. this was the old default behavior πŸ§“
  • -I, --no-init-fallback β€” don't initialize cards if restore fails. since version 1.0.18, alsactl tries to initialize the card with the restore operation by default, but that can cause incompatibility with older versions. the caller may expect the state to stay untouched if there's no state file. this option takes the restore behavior back to the older version by suppressing the initialization πŸ•ΉοΈ
  • -r, --runstate β€” saves restore and init state to this file. the file only contains errors, and each one gets appended with the soundcard id at the end of the file πŸ“
  • -R, --remove β€” removes the runstate file first 🧽
  • -E, --env #=# β€” sets an environment variable. handy for the init action, or you can override ALSA_CONFIG_PATH to read a different or optimized configuration (useful for "boot" scripts) 🌍
  • -i, --initfile β€” the configuration file for init. by default it's PREFIX/share/alsa/init/00main 🧭
  • -p, --period β€” the store period in seconds for the daemon command ⏱️
  • -e, --pid-file β€” the pathname to store the process-id file in the HDB UUCP format (ASCII) πŸ†”
  • -b, --background β€” runs the task in the background πŸŒ™
  • -s, --syslog β€” uses syslog for messages πŸ“œ
  • -n, --nice β€” sets the process priority (see 'man nice') πŸƒ
  • -c, --sched-idle β€” sets the process scheduling policy to idle (SCHED_IDLE) 😴
  • -D, --ucm-defaults β€” also executes the 'defaults' section from the UCM configuration. the standard behavior is to only execute the 'once' section 🧩
  • -U, --no-ucm β€” skips the UCM init even if it's available. useful for testing the legacy init configuration πŸ§ͺ

πŸ“ FILES πŸ“

/var/lib/alsa/asound.state (or whatever file you pass with the -f flag) stores the current settings for your soundcards. the settings include all the usual soundcard mixer settings. more importantly, alsactl can control other card-specific features that mixer apps usually don't even know about 🀯

The configuration file gets generated automatically when you run alsactl store. editing it by hand may be necessary for some soundcard features (e.g. enabling/disabling automatic mic gain, digital output, joystick/game ports, some future MIDI routing options, etc) 🎹

πŸ”— SEE ALSO πŸ”—

amixer(1), alsamixer(1), aplay(1), alsactl_init(7) 🫢

πŸ› BUGS πŸ›

None known. βœ…

πŸ‘‘ AUTHOR πŸ‘‘

alsactl is by Jaroslav Kysela <perex@perex.cz> and Abramo Bagnara <abramo@alsa-project.org>. This document is by Paul Winkler <zarmzarm@erols.com> πŸ’œ


and that's the whole manual, bestie! 🌈 this was the ALSACTL(1) page, dated 07 May 2014, and it's giving full legend status πŸ‘‘πŸ’– love you, go make your sound card behave ✨🫢