[Main]
Type = oneshot
Version = 0.0.2
Description = "Restore and store sound card state"
User = ( root )

[Start]
Execute = (
    /usr/lib/execline/bin/foreground {
         execl-toc -n -e ${AlsaStateFile}
         alsactl store
    }
     alsactl restore
)

[Stop]
Execute = (  alsactl store )

[Environment]
AlsaStateFile=/var/lib/alsa/asound.state
