diff options
| author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2026-02-04 10:20:55 +0100 |
|---|---|---|
| committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2026-03-10 11:23:30 +0100 |
| commit | de8b977d4e62bca47f696f7f1debf69a3b9078d4 (patch) | |
| tree | dcdc32be9d54d933c1c421537d4ca4a9f4929def /doc | |
| parent | 06c6c3ede530585f643e09afa7259498299cef78 (diff) | |
services: Generalize alsa-configuration.
* gnu/packages/sound.scm (alsa-pcm-configuration, alsa-ctl-configuration): New
configuration records.
(serialize-alsa-pcm-configuration, serialize-alsa-ctl-configuration): New variables.
(<alsa-configuration>): Remove alsa-plugins and pulseaudio?.
Add default-pcm and default-ctl.
Rename extra-options to options.
(alsa-config-file): Adjust accordingly.
(alsa-servcice-type): Add compose and extend.
(<pulseaudio-configuration>): Add alsa-lib.
(pulseaudio-alsa-configuration): New procedure.
(pulseaudio-service-type): Extend alsa-servcice-type.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 58 |
1 files changed, 46 insertions, 12 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 44873afa2a4..b0ab0c1db5b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -27878,24 +27878,47 @@ record as in this example: | |||
| 27878 | See below for details about @code{alsa-configuration}. | 27878 | See below for details about @code{alsa-configuration}. |
| 27879 | @end defvar | 27879 | @end defvar |
| 27880 | 27880 | ||
| 27881 | @deftp {Data Type} alsa-configuration | 27881 | @deftp {Data Type} alsa-pcm-configuration |
| 27882 | Data type representing the configuration for @code{alsa-service}. | 27882 | Data type representing an ALSA @code{pcm} block. |
| 27883 | 27883 | ||
| 27884 | @table @asis | 27884 | @table @asis |
| 27885 | @item @code{alsa-plugins} (default: @var{alsa-plugins}) | 27885 | @item @code{alsa-pcm-configuration-type} (type: symbol) |
| 27886 | @code{alsa-plugins} package to use. | 27886 | The type of the PCM (if not builtin to alsa, should be introduced via a ``pcm_type'' block). |
| 27887 | @item @code{alsa-pcm-configuration-hint} (type: maybe-string) | ||
| 27888 | A human-readable description of the PCM. | ||
| 27887 | 27889 | ||
| 27888 | @item @code{pulseaudio?} (default: @var{#t}) | 27890 | @item @code{alsa-pcm-configuration-configuration} (type: list-of-string) |
| 27889 | Whether ALSA applications should transparently be made to use the | 27891 | Raw additional configuration. |
| 27890 | @uref{https://www.pulseaudio.org/, PulseAudio} sound server. | 27892 | Each item will be printed on a separate line. |
| 27893 | @end table | ||
| 27894 | @end deftp | ||
| 27891 | 27895 | ||
| 27892 | Using PulseAudio allows you to run several sound-producing applications | 27896 | @deftp {Data Type} alsa-ctl-configuration |
| 27893 | at the same time and to individual control them @i{via} | 27897 | Data type representing an ALSA @code{ctl} block. |
| 27894 | @command{pavucontrol}, among other things. | ||
| 27895 | 27898 | ||
| 27896 | @item @code{extra-options} (default: @var{""}) | 27899 | @table @asis |
| 27897 | String to append to the @file{/etc/asound.conf} file. | 27900 | @item @code{alsa-pcm-configuration-type} (type: symbol) |
| 27901 | The type of the ctl (if not builtin to alsa, should be introduced via a ``ctl_type'' block). | ||
| 27898 | 27902 | ||
| 27903 | @item @code{alsa-pcm-configuration-configuration} (type: list-of-string) | ||
| 27904 | Raw additional configuration. | ||
| 27905 | Each item will be printed on a separate line. | ||
| 27906 | @end table | ||
| 27907 | @end deftp | ||
| 27908 | |||
| 27909 | @deftp {Data Type} alsa-configuration | ||
| 27910 | Data type representing the configuration for @code{alsa-service}. | ||
| 27911 | |||
| 27912 | @table @asis | ||
| 27913 | @item @code{default-pcm} (default: #f) | ||
| 27914 | The configuration to use for the default @code{pcm}. | ||
| 27915 | |||
| 27916 | @item @code{default-ctl} (default: #f) | ||
| 27917 | The configuration to use for the default @code{ctl}. | ||
| 27918 | |||
| 27919 | @item @code{options} (default: '()) (type: list-of-strings) | ||
| 27920 | Additional configuration strings to | ||
| 27921 | append to the @file{/etc/asound.conf} file. | ||
| 27899 | @end table | 27922 | @end table |
| 27900 | @end deftp | 27923 | @end deftp |
| 27901 | 27924 | ||
| @@ -27934,6 +27957,12 @@ pcm.!default @{ | |||
| 27934 | See @uref{https://www.alsa-project.org/main/index.php/Asoundrc} for the | 27957 | See @uref{https://www.alsa-project.org/main/index.php/Asoundrc} for the |
| 27935 | details. | 27958 | details. |
| 27936 | 27959 | ||
| 27960 | Services can likewise extend alsa-service-type to add options and | ||
| 27961 | configure the default PCM and CTL. One service, which transparently | ||
| 27962 | extends alsa-service-type to make use of the | ||
| 27963 | @uref{https://www.pulseaudio.org/, PulseAudio} sound server, | ||
| 27964 | is the pulseaudio-service-type, shown below. | ||
| 27965 | |||
| 27937 | @defvar pulseaudio-service-type | 27966 | @defvar pulseaudio-service-type |
| 27938 | This is the type for the @uref{https://www.pulseaudio.org/, PulseAudio} | 27967 | This is the type for the @uref{https://www.pulseaudio.org/, PulseAudio} |
| 27939 | sound server. It exists to allow system overrides of the default settings | 27968 | sound server. It exists to allow system overrides of the default settings |
| @@ -27985,6 +28014,11 @@ commands, refer to @command{man pulse-cli-syntax}. | |||
| 27985 | 28014 | ||
| 27986 | @item @code{system-script-file} (default: @code{(file-append pulseaudio "/etc/pulse/system.pa")}) | 28015 | @item @code{system-script-file} (default: @code{(file-append pulseaudio "/etc/pulse/system.pa")}) |
| 27987 | Script file to use as @file{system.pa}. | 28016 | Script file to use as @file{system.pa}. |
| 28017 | |||
| 28018 | @item @code{alsa-lib} | ||
| 28019 | The alsa-lib package to use for defining the “pulse” pcm_type | ||
| 28020 | and ctl_type. | ||
| 28021 | |||
| 27988 | @end table | 28022 | @end table |
| 27989 | 28023 | ||
| 27990 | The example below sets the default PulseAudio card profile, the default | 28024 | The example below sets the default PulseAudio card profile, the default |
