alsa-utils/alsactl/alsa-state.service.in
Chris Mayo f72a296d23 alsactl: Move systemd unit start-up from basic.target to sound.target
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>
2017-10-06 14:32:16 +02:00

14 lines
376 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=Manage Sound Card State (restore and store)
ConditionPathExists=@daemonswitch@
[Service]
Type=simple
ExecStart=-@sbindir@/alsactl -s -n 19 -c rdaemon
ExecStop=-@sbindir@/alsactl -s kill save_and_quit