Add alsa-$(board).conf files for select boards.
Some boards need their model name passed to the hda driver. That was
done in alsa-utils before we switched back to upstream. This file is
optional, if a board needs to pass options to the alsa driver it will
create one. The file is copied to /etc/modprobe.d on the target.
BUG=chromium-os:31063
TEST=build stumpy and alex, boot and check that the correct verbs have
been loaded by checking "amixer -c0 controls" and
"/proc/asound/card0/codec#0".
Change-Id: I67725fe9532c95b48fe1d23968cb0024d941e3e8
Signed-off-by: Dylan Reid <dgreid@chromium.org>
diff --git a/Makefile b/Makefile
index d340182..ab2c474 100644
--- a/Makefile
+++ b/Makefile
@@ -44,6 +44,18 @@
$(ECHO) "Installing '$<' to '$@'"
$(INSTALL) --mode 644 -D $< $@
+optional_alsa_conf := $(wildcard $(ADHD_DIR)/alsa-module-config/alsa-$(BOARD).conf)
+
+ifneq ($(strip $(optional_alsa_conf)),)
+
+$(DESTDIR)/etc/modprobe.d/alsa-$(BOARD).conf: $(optional_alsa_conf)
+ $(ECHO) "Installing '$<' to '$@'"
+ $(INSTALL) --mode 644 -D $< $@
+
+install: $(DESTDIR)/etc/modprobe.d/alsa-$(BOARD).conf
+
+endif
+
install: $(DESTDIR)/etc/init/adhd.conf \
$(DESTDIR)/etc/init/cras.conf \
$(DESTDIR)/etc/asound.state \