From 25bea6baf7097dc0a701b27587be88b0b54a529c Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 7 Sep 2018 10:53:19 +0200 Subject: [PATCH] alsaucm: add alsa-ucm udev rules for PAZ00 (Toshiba AC100/Dynabook AZ). Signed-off-by: Jaroslav Kysela --- .gitignore | 1 + alsaucm/89-alsa-ucm.rules.in | 8 ++++++++ alsaucm/Makefile.am | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 alsaucm/89-alsa-ucm.rules.in 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