diff mbox series

[V2,2/2] Add rpmsg DMA library and simple DSP offload example

Message ID 20250529121024.513864-2-v-singh1@ti.com
State New
Headers show
Series [V2,1/2] CI/CD Auto-Merger: cicd.scarthgap.202505230901 | expand

Commit Message

Vishnu Singh May 29, 2025, 12:10 p.m. UTC
From: Vishnu Singh <v-singh1@ti.com>

1. rpmsg DMA library (meta-ti-bsp/recipes-ti/ipc):
	based on rpmsg & DMA Heap buffers. this includes librpmsg_dma.so shared library
	which provides apis for
		1. rpmsg interface initialization
		2. rpmsg based recv/send api for communication
		3. dma heap buffer management
		4. DSP firmware synamin load/unload

2. rpmsg DMA offload example (meta-ti-extras/recipes-ti/ipc):
	provides example foraudio offloading to DSP from linux using
	ti-rpmsg-dma library. Alsove provide Ethernet based control
	utility (host).

Signed-off-by: Vishnu Singh <v-singh1@ti.com>
---
 .../recipes-ti/ipc/ti-librpmsg-dma_1.0.bb     | 25 +++++++++++++++++
 .../ipc/ti-librpmsg-dma-example_1.0.bb        | 27 +++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
 create mode 100644 meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
diff mbox series

Patch

diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
new file mode 100644
index 00000000..ad3f01f6
--- /dev/null
+++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
@@ -0,0 +1,25 @@ 
+SUMMARY = "RPMsg DMA shared library"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=744e63d2bb8c6151dcdd97f49aa02c53"
+
+SRC_URI = "git://github.com/TexasInstruments/rpmsg-dma.git;protocol=https;branch=main"
+SRCREV = "1fce50101eeeebb595dcc07bf8d3ca2a8f9ffe2c"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "ti-rpmsg-char"
+
+EXTRA_OEMAKE = "lib"
+do_compile() {
+	oe_runmake ${EXTRA_OEMAKE}
+}
+
+do_install() {
+	install -d ${D}${libdir}
+	install -m 0755 lib/librpmsg_dma.so.1.0 ${D}${libdir}/
+	ln -sf librpmsg_dma.so.1.0 ${D}${libdir}/librpmsg_dma.so.1
+	ln -sf librpmsg_dma.so.1 ${D}${libdir}/librpmsg_dma.so
+
+	install -d ${D}${includedir}/rpmsg_dma
+	install -m 0644 include/*.h ${D}${includedir}/rpmsg_dma/
+}
diff --git a/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb b/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
new file mode 100644
index 00000000..6dd614cd
--- /dev/null
+++ b/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
@@ -0,0 +1,27 @@ 
+SUMMARY = "Audio Offload Example using RPMsg DMA"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=744e63d2bb8c6151dcdd97f49aa02c53"
+
+SRC_URI = "git://github.com/TexasInstruments/rpmsg-dma.git;protocol=https;branch=main"
+SRCREV = "1fce50101eeeebb595dcc07bf8d3ca2a8f9ffe2c"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "ti-librpmsg-dma fftw libsndfile1 alsa-lib"
+
+do_compile() {
+	oe_runmake -C example/audio_offload
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 example/audio_offload/bin/rpmsg_audio_offload_example ${D}${bindir}/
+
+	install -d ${D}${sysconfdir}
+	install -d ${D}/opt
+	install -m 0644 example/audio_offload/config/dsp_offload.cfg ${D}${sysconfdir}/dsp_offload.cfg
+	install -m 0644 example/audio_offload/audio_sample/sample_audio.wav ${D}/opt/sample_audio.wav
+}
+
+FILES:${PN} += "${sysconfdir}/dsp_offload.cfg"
+FILES:${PN} += "/opt/sample_audio.wav"