All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] alsactl: Do not run udev rule before datadir is mounted
@ 2014-06-13  8:15 David Henningsson
  2014-06-13  8:26 ` Jaroslav Kysela
  0 siblings, 1 reply; 14+ messages in thread
From: David Henningsson @ 2014-06-13  8:15 UTC (permalink / raw)
  To: perex, tiwai, alsa-devel; +Cc: 1289730, David Henningsson

The 90-alsa-restore.rules udev rule is primarily meant to handle hotplugging,
but sometimes it is also run before /usr is mounted,
and alsactl restore depends on /usr/share/alsa being present.

If /usr/share/alsa is not present, we're so early in the boot
process that alsa-restore.service (or upstart equivalent) will
run later on.

BugLink: https://bugs.launchpad.net/bugs/1289730
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---

I'm not really sure of all quirks in the boot process, and I haven't tested the
patch either, hence the RFC above. Do you think it makes sense? Should we also
add @sbindir@ to the things to test for?

 alsactl/90-alsa-restore.rules.in | 2 +-
 alsactl/Makefile.am              | 1 +
 configure.ac                     | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in
index c68119d..c83c6b5 100644
--- a/alsactl/90-alsa-restore.rules.in
+++ b/alsactl/90-alsa-restore.rules.in
@@ -1,4 +1,4 @@
-ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", GOTO="alsa_restore_go"
+ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST=="@datadir@", GOTO="alsa_restore_go"
 GOTO="alsa_restore_end"
 
 LABEL="alsa_restore_go"
diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
index b862412..afbedb3 100644
--- a/alsactl/Makefile.am
+++ b/alsactl/Makefile.am
@@ -44,6 +44,7 @@ endif
 
 edit = \
 	$(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
+		  -e 's,@datadir\@,$(mydatadir),g' \
 		  -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
 							< $< > $@ || rm $@
 
diff --git a/configure.ac b/configure.ac
index 7e6894a..a4d2db3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -292,6 +292,7 @@ AC_DEFINE_UNQUOTED(SOUNDSDIR, "$soundsdir", [directory containing sample data])
 
 mydatadir="$dir/alsa"
 AC_DEFINE_UNQUOTED(DATADIR, "$mydatadir", [directory containing alsa configuration])
+AC_SUBST(mydatadir)
 
 AC_ARG_WITH(testsound,
   AS_HELP_STRING([--with-testsound=file], [give the path of test sound file for alsaconf]),
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-06-14 12:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-13  8:15 [RFC PATCH] alsactl: Do not run udev rule before datadir is mounted David Henningsson
2014-06-13  8:26 ` Jaroslav Kysela
2014-06-13  9:05   ` David Henningsson
2014-06-13  9:11     ` Jaroslav Kysela
2014-06-13  9:20     ` Takashi Iwai
2014-06-13  9:33       ` David Henningsson
2014-06-13 10:08         ` ALSA 1.0.28 release - request for testing Jaroslav Kysela
2014-06-13 10:52           ` David Henningsson
2014-06-13 17:17             ` Jaroslav Kysela
2014-06-13 10:59           ` Alexander E. Patrakov
2014-06-13 17:19             ` Jaroslav Kysela
2014-06-13 11:02           ` David Henningsson
2014-06-13 17:19             ` Jaroslav Kysela
2014-06-14 12:11           ` ALSA 1.0.28 release - Assertion failed Sergey

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.