2021-02-08 11:19:49 +01:00
|
|
|
#
|
|
|
|
# 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=!/etc/alsa/state-daemon.conf
|
|
|
|
ConditionPathExistsGlob=/dev/snd/control*
|
2021-02-09 20:05:18 +01:00
|
|
|
ConditionPathExists=/etc/voicecard/asound.state
|
2021-02-08 11:19:49 +01:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
|
|
|
RemainAfterExit=true
|
|
|
|
ExecStartPre=/bin/mkdir -p /run/alsa
|
|
|
|
ExecStart=-/usr/sbin/alsactl -E HOME=/run/alsa -f /etc/voicecard/asound.state restore
|
|
|
|
ExecStop=-/usr/sbin/alsactl -E HOME=/run/alsa -f /etc/voicecard/asound.state store
|
|
|
|
|