aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/acp-rt286-load
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/acp-rt286-load')
-rw-r--r--meta-amd-bsp/recipes-kernel/acp-rt286-load/amd-acp-rt286-load_1.0.bb15
-rw-r--r--meta-amd-bsp/recipes-kernel/acp-rt286-load/files/modprobe.d/snd-soc-acp-rt286-mach.conf2
2 files changed, 17 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/acp-rt286-load/amd-acp-rt286-load_1.0.bb b/meta-amd-bsp/recipes-kernel/acp-rt286-load/amd-acp-rt286-load_1.0.bb
new file mode 100644
index 00000000..1e733186
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/acp-rt286-load/amd-acp-rt286-load_1.0.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "Configuration file to pass module load parameters to AMD ASoC ACP-12S driver"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+SRC_URI = "file://modprobe.d/snd-soc-acp-rt286-mach.conf"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/${sysconfdir}/modprobe.d/
+ install -m 0644 modprobe.d/snd-soc-acp-rt286-mach.conf ${D}${sysconfdir}/modprobe.d/
+}
+
+FILES:${PN} = "${sysconfdir}/modprobe.d"
+
diff --git a/meta-amd-bsp/recipes-kernel/acp-rt286-load/files/modprobe.d/snd-soc-acp-rt286-mach.conf b/meta-amd-bsp/recipes-kernel/acp-rt286-load/files/modprobe.d/snd-soc-acp-rt286-mach.conf
new file mode 100644
index 00000000..130de3d8
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/acp-rt286-load/files/modprobe.d/snd-soc-acp-rt286-mach.conf
@@ -0,0 +1,2 @@
+#install AMD ASoC ACP-12S driver only on non-embedded hardware by checking 6th bit of iGPU rev ID
+install snd-soc-acp-rt286-mach if [ $(( 2#$(echo "ibase=16; obase=2; $(lspci | awk '/VGA.*AMD.*ATI.*rev [0-9A-Fa-f]+/ {print toupper(substr($NF,1,length($NF)-1)); exit}')" | bc) & 2#00100000 )) -ne 0 ]; then /sbin/modprobe --ignore-install snd-soc-acp-rt286-mach; fi