diff --git a/.gitignore b/.gitignore index bc08f4f..d2175b0 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,7 @@ speaker-test/speaker-test alsaloop/alsaloop alsaucm/alsaucm alsaucm/alsaucm.1 +alsaucm/89-alsa-ucm.rules topology/alsatplg include/aconfig.h* diff --git a/alsaucm/89-alsa-ucm.rules.in b/alsaucm/89-alsa-ucm.rules.in new file mode 100644 index 0000000..52a7616 --- /dev/null +++ b/alsaucm/89-alsa-ucm.rules.in @@ -0,0 +1,8 @@ +SUBSYSTEM!="sound", GOTO="ucm_end" +ACTION!="change", GOTO="ucm_end" +KERNEL!="card*", GOTO="ucm_end" + +ATTRS{id}=="PAZ00", RUN+="@bindir@/alsaucm -c PAZ00 set _verb HiFi" +ATTRS{id}=="PAZ00", RUN+="@bindir@/alsaucm -c PAZ00 set _verb Record" + +LABEL="ucm_end" diff --git a/alsaucm/Makefile.am b/alsaucm/Makefile.am index ee0391e..651f678 100644 --- a/alsaucm/Makefile.am +++ b/alsaucm/Makefile.am @@ -15,4 +15,17 @@ alsaucm_LDADD = -lasound %.1: %.rst rst2man $< > $@ -EXTRA_DIST = alsaucm.rst +udevrules_DATA = \ + 89-alsa-ucm.rules + +edit = \ + $(SED) -r -e 's,@bindir\@,$(bindir),g' \ + -e 's,@mydatadir\@,$(mydatadir),g' \ + < $< > $@ || rm $@ + +89-alsa-ucm.rules: 89-alsa-ucm.rules.in + $(edit) + +EXTRA_DIST = alsaucm.rst 89-alsa-ucm.rules.in + +CLEANFILES = 89-alsa-ucm.rules