mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-14 18:05:42 +01:00
f72a296d23
Ensures soundcard is ready before restoring state. sound.target added to systemd in v18: https://cgit.freedesktop.org/systemd/systemd/commit/?id=88dfa2938af Simplify dependencies: - After=alsa-state.service is not needed because both units test for @daemonswitch@ with opposite outcomes. - After=sysinit.target is automatically added by systemd. First proposed by Tom Yan. Signed-off-by: Chris Mayo <aklhfex@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 lines
399 B
SYSTEMD
15 lines
399 B
SYSTEMD
#
|
|
# Note that two different ALSA card state management schemes exist and they
|
|
# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
|
|
#
|
|
|
|
[Unit]
|
|
Description=Save/Restore Sound Card State
|
|
ConditionPathExists=!@daemonswitch@
|
|
ConditionPathExistsGlob=/dev/snd/control*
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=true
|
|
ExecStart=-@sbindir@/alsactl restore
|
|
ExecStop=-@sbindir@/alsactl store
|