Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From b9d41b784657152a4c5683a9458dffab557f0689 Mon Sep 17 00:00:00 2001 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2 | From: Koen Kooi <koen@dominion.thruhere.net> |
| 3 | Date: Fri, 29 Aug 2014 18:58:56 +0300 |
| 4 | Subject: [PATCH] alsactl: don't let systemd unit restore the volume when |
| 5 | asound.state is missing |
| 6 | |
| 7 | This avoids an error on bootup |
| 8 | |
| 9 | Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459 |
| 10 | |
| 11 | Upstream-Status: Pending |
| 12 | |
| 13 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> |
| 14 | Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 15 | |
| 16 | Rebased on 1.1.0. |
| 17 | |
| 18 | Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | --- |
| 20 | alsactl/Makefile.am | 7 ++++--- |
| 21 | alsactl/alsa-restore.service.in | 1 + |
| 22 | 2 files changed, 5 insertions(+), 3 deletions(-) |
| 23 | |
| 24 | diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 25 | index 90fab9d..190525a 100644 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | --- a/alsactl/Makefile.am |
| 27 | +++ b/alsactl/Makefile.am |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 28 | @@ -38,9 +38,10 @@ install-data-hook: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | endif |
| 30 | |
| 31 | edit = \ |
| 32 | - $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \ |
| 33 | - -e 's,@mydatadir\@,$(mydatadir),g' \ |
| 34 | - -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ |
| 35 | + $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \ |
| 36 | + -e 's,@sbindir\@,$(sbindir),g' \ |
| 37 | + -e 's,@mydatadir\@,$(mydatadir),g' \ |
| 38 | + -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ |
| 39 | < $< > $@ || rm $@ |
| 40 | |
| 41 | alsa-state.service: alsa-state.service.in |
| 42 | diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 43 | index 80fd5fd..6beb36d 100644 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 44 | --- a/alsactl/alsa-restore.service.in |
| 45 | +++ b/alsactl/alsa-restore.service.in |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 46 | @@ -7,6 +7,7 @@ |
| 47 | Description=Save/Restore Sound Card State |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 48 | ConditionPathExists=!@daemonswitch@ |
| 49 | ConditionPathExistsGlob=/dev/snd/control* |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | +ConditionPathExists=@localstatedir@/lib/alsa/asound.state |
| 51 | |
| 52 | [Service] |
| 53 | Type=oneshot |
| 54 | -- |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 55 | 2.14.2 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 56 | |