summaryrefslogtreecommitdiffstats
path: root/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-11-13 08:52:36 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-11-20 07:38:59 +0000
commitd2f637682baa3a910416bef73eb5a7b168b4134f (patch)
tree806b7bf03f2048af919ea281b2618a55b2f652f7 /meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend
parentbc253c92ccf64dd62fa39acb82c5c545503021cc (diff)
Add initial recipes for snd-avirt driver
The snd-avirt driver will provide an enhanced, dynamic ALSA loopback interface for 4a-softmixer, and provides the audio framework for low-latency audio hardmixers such as the Fiberdyne DSP onboard the Xtensa HiFi2, and the UNICENs Fiberdyne smart amplifier. Included are backport patches for kernels 4.12 and 4.9. Change-Id: I8b23507d7179d10dfa70b7f2f899db4534690392 Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend')
-rw-r--r--meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend22
1 files changed, 22 insertions, 0 deletions
diff --git a/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend b/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend
new file mode 100644
index 00000000..3c9fea0e
--- /dev/null
+++ b/meta-audio-4a-framework/recipes-kernel/snd-avirt/snd-avirt.bbappend
@@ -0,0 +1,22 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+def prep_version (d) :
+ KV = d.getVar('KERNEL_VERSION', True)
+ if not KV :
+ return "4.12"
+ else:
+ return KV
+
+ORIG_KERN_VER = "${@prep_version(d)}"
+
+VANILLA_KERNEL_VERSION = "${@str(ORIG_KERN_VER.split("-")[0].split(".")[0]+ORIG_KERN_VER.split("-")[0].split(".")[1])}"
+
+APPLY_0001 = "${@str('no' if ${VANILLA_KERNEL_VERSION} > 412 else 'yes')}"
+APPLY_0002 = "${@str('no' if ${VANILLA_KERNEL_VERSION} > 49 else 'yes')}"
+
+SRC_URI_append = " \
+ file://0001-snd-avirt-backport-kernel-4.12-api.patch;apply=${APPLY_0001} \
+ file://0002-snd-avirt-backport-kernel-4.9-api.patch;apply=${APPLY_0002} \
+ "
+# Make sure we can expose KERNEL_VERSION ...
+do_patch[depends] += "virtual/kernel:do_populate_sysroot"