diff mbox series

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

Message ID 20250528102653.323423-2-p-bhagat@ti.com
State New
Headers show
Series [scarthgap,1/2] meta-ti-bsp: conf: Package overlay for am62dxx-evm | expand

Commit Message

Paresh Bhagat May 28, 2025, 10:26 a.m. UTC
From: Vishnu Singh <v-singh1@ti.com>

Add rpmsg DMA library and simple DSP offload example, based on rpmsg & DMA Heap
buffers. This includes librpmsg_dma.so shared library used for real-time audio
offloading to DSP from Linux, Ethernet based control utility etc.

Signed-off-by: Vishnu Singh <v-singh1@ti.com>
---
 .../ipc/ti-librpmsg-dma-example_1.0.bb        | 28 +++++++++++++++++++
 .../recipes-ti/ipc/ti-librpmsg-dma_1.0.bb     | 26 +++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
 create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb

Comments

Denys Dmytriyenko May 28, 2025, 3:16 p.m. UTC | #1
On Wed, May 28, 2025 at 03:56:53PM +0530, Paresh Bhagat wrote:
> From: Vishnu Singh <v-singh1@ti.com>
> 
> Add rpmsg DMA library and simple DSP offload example, based on rpmsg & DMA Heap
> buffers. This includes librpmsg_dma.so shared library used for real-time audio
> offloading to DSP from Linux, Ethernet based control utility etc.
> 
> Signed-off-by: Vishnu Singh <v-singh1@ti.com>
> ---
>  .../ipc/ti-librpmsg-dma-example_1.0.bb        | 28 +++++++++++++++++++
>  .../recipes-ti/ipc/ti-librpmsg-dma_1.0.bb     | 26 +++++++++++++++++
>  2 files changed, 54 insertions(+)
>  create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
>  create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
> 
> diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
> new file mode 100644
> index 00000000..8b01fa46
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
> @@ -0,0 +1,28 @@
> +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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
> +
> +S = "${WORKDIR}/git"
> +
> +DEPENDS = "ti-librpmsg-dma fftw libsndfile1 alsa-lib ti-rpmsg-char"

See fftw comment below


> +
> +do_compile() {
> +	oe_runmake -C example/audio_offload
> +}
> +
> +do_install() {
> +	install -d ${D}${bindir}
> +	install -m 0755 example/audio_offload/bin/audio_offload ${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"
> +FILES:${PN} += "/opt/sample_audio.wav"

Last 2 lines can be combined


> 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..666439dd
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
> @@ -0,0 +1,26 @@
> +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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
> +
> +S = "${WORKDIR}/git"
> +
> +DEPENDS = "fftw libsndfile1 alsa-lib ti-rpmsg-char"

fftw is not in oe-core, but in meta-openembedded, and meta-ti does not depend 
on meta-openembedded


> +
> +do_compile() {
> +	oe_runmake
> +}
> +
> +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/
> +}
> +
> +INSANE_SKIP:${PN} += "dev-so"

Is it needed here? I see the versioned links are setup above, so this should 
not be needed...
Ryan Eatmon May 28, 2025, 3:27 p.m. UTC | #2
On 5/28/2025 10:16 AM, Denys Dmytriyenko wrote:
> On Wed, May 28, 2025 at 03:56:53PM +0530, Paresh Bhagat wrote:
>> From: Vishnu Singh <v-singh1@ti.com>
>>
>> Add rpmsg DMA library and simple DSP offload example, based on rpmsg & DMA Heap
>> buffers. This includes librpmsg_dma.so shared library used for real-time audio
>> offloading to DSP from Linux, Ethernet based control utility etc.
>>
>> Signed-off-by: Vishnu Singh <v-singh1@ti.com>
>> ---
>>   .../ipc/ti-librpmsg-dma-example_1.0.bb        | 28 +++++++++++++++++++
>>   .../recipes-ti/ipc/ti-librpmsg-dma_1.0.bb     | 26 +++++++++++++++++
>>   2 files changed, 54 insertions(+)
>>   create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
>>   create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
>>
>> diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
>> new file mode 100644
>> index 00000000..8b01fa46
>> --- /dev/null
>> +++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
>> @@ -0,0 +1,28 @@
>> +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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
>> +
>> +S = "${WORKDIR}/git"
>> +
>> +DEPENDS = "ti-librpmsg-dma fftw libsndfile1 alsa-lib ti-rpmsg-char"
> 
> See fftw comment below

My counter response... if this recipe depends on ti-librpmsg-dma, then 
does this recipe need to depend on fftw?  Same question for all of the 
other DEPENDS entries.  Does this recipe actually depend on all this 
other packages or just ti-librpmsg-dma?


Follow on question.. why do we have two recipes that are both pointing 
at the same repository?


> 
>> +
>> +do_compile() {
>> +	oe_runmake -C example/audio_offload
>> +}
>> +
>> +do_install() {
>> +	install -d ${D}${bindir}
>> +	install -m 0755 example/audio_offload/bin/audio_offload ${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"
>> +FILES:${PN} += "/opt/sample_audio.wav"
> 
> Last 2 lines can be combined
> 
> 
>> 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..666439dd
>> --- /dev/null
>> +++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
>> @@ -0,0 +1,26 @@
>> +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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
>> +
>> +S = "${WORKDIR}/git"
>> +
>> +DEPENDS = "fftw libsndfile1 alsa-lib ti-rpmsg-char"
> 
> fftw is not in oe-core, but in meta-openembedded, and meta-ti does not depend
> on meta-openembedded

That's a problem then...  We don't want to blow up the requirements for 
building with just meta-ti-bsp (which a number of customers do).

Does this belong more in meta-ti-extras then?

> 
>> +
>> +do_compile() {
>> +	oe_runmake
>> +}
>> +
>> +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/
>> +}
>> +
>> +INSANE_SKIP:${PN} += "dev-so"
> 
> Is it needed here? I see the versioned links are setup above, so this should
> not be needed...
vishnu singh May 29, 2025, 12:01 p.m. UTC | #3
On 28/05/25 20:57, Ryan Eatmon wrote:
>
>
> On 5/28/2025 10:16 AM, Denys Dmytriyenko wrote:
>> On Wed, May 28, 2025 at 03:56:53PM +0530, Paresh Bhagat wrote:
>>> From: Vishnu Singh <v-singh1@ti.com>
>>>
>>> Add rpmsg DMA library and simple DSP offload example, based on rpmsg 
>>> & DMA Heap
>>> buffers. This includes librpmsg_dma.so shared library used for 
>>> real-time audio
>>> offloading to DSP from Linux, Ethernet based control utility etc.
>>>
>>> Signed-off-by: Vishnu Singh <v-singh1@ti.com>
>>> ---
>>>   .../ipc/ti-librpmsg-dma-example_1.0.bb        | 28 
>>> +++++++++++++++++++
>>>   .../recipes-ti/ipc/ti-librpmsg-dma_1.0.bb     | 26 +++++++++++++++++
>>>   2 files changed, 54 insertions(+)
>>>   create mode 100644 
>>> meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
>>>   create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
>>>
>>> diff --git 
>>> a/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb 
>>> b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
>>> new file mode 100644
>>> index 00000000..8b01fa46
>>> --- /dev/null
>>> +++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
>>> @@ -0,0 +1,28 @@
>>> +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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
>>> +
>>> +S = "${WORKDIR}/git"
>>> +
>>> +DEPENDS = "ti-librpmsg-dma fftw libsndfile1 alsa-lib ti-rpmsg-char"
>>
>> See fftw comment below
>
> My counter response... if this recipe depends on ti-librpmsg-dma, then 
> does this recipe need to depend on fftw?  Same question for all of the 
> other DEPENDS entries.  Does this recipe actually depend on all this 
> other packages or just ti-librpmsg-dma?
>
>
> Follow on question.. why do we have two recipes that are both pointing 
> at the same repository?
>
@Denys Dmytriyenko, @Eatmon, Ryan
ti-librpmsg-dma only depends on ti-librpmsg-dma, update the recipe (will 
send new patch)
ti-librpmsg-dma-example depends upon "ti-librpmsg-dma fftw libsndfile1 
alsa-lib", I have moved this recipe to ti-extras

Below is the summary of both recipes

     1. rpmsg DMA library (meta-ti-bsp/recipes-ti/ipc): This is generic 
rpmsg based library .
            This is 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).
>>> +
>>> +do_compile() {
>>> +    oe_runmake -C example/audio_offload
>>> +}
>>> +
>>> +do_install() {
>>> +    install -d ${D}${bindir}
>>> +    install -m 0755 example/audio_offload/bin/audio_offload 
>>> ${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"
>>> +FILES:${PN} += "/opt/sample_audio.wav"
>>
>> Last 2 lines can be combined
>>
Addressed in next 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..666439dd
>>> --- /dev/null
>>> +++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
>>> @@ -0,0 +1,26 @@
>>> +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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
>>> +
>>> +S = "${WORKDIR}/git"
>>> +
>>> +DEPENDS = "fftw libsndfile1 alsa-lib ti-rpmsg-char"
>>
>> fftw is not in oe-core, but in meta-openembedded, and meta-ti does 
>> not depend
>> on meta-openembedded
>
> That's a problem then...  We don't want to blow up the requirements 
> for building with just meta-ti-bsp (which a number of customers do).
>
> Does this belong more in meta-ti-extras then?
>
Example recipe is moved to meta-ti-extras
>>
>>> +
>>> +do_compile() {
>>> +    oe_runmake
>>> +}
>>> +
>>> +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/
>>> +}
>>> +
>>> +INSANE_SKIP:${PN} += "dev-so"
>>
>> Is it needed here? I see the versioned links are setup above, so this 
>> should
>> not be needed...
Fixed in next patch
vishnu singh May 29, 2025, 12:14 p.m. UTC | #4
Please Ignore this

On 29/05/25 17:31, Vishnu Singh via lists.yoctoproject.org wrote:
> On 28/05/25 20: 57, Ryan Eatmon wrote: > > > On 5/28/2025 10: 16 AM, Denys
> Dmytriyenko wrote: >> On Wed, May 28, 2025 at 03: 56: 53PM +0530, Paresh Bhagat
> wrote: >>> From: Vishnu Singh <v-singh1@ ti. com> >>>
> ZjQcmQRYFpfptBannerStart
> This message was sent from outside of Texas Instruments.
> Do not click links or open attachments unless you recognize the source of this
> email and know the content is safe.
> Report Suspicious
> <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/G3vK!uVdqPBcPGKOVSwYFPHPjEn1VP1DNy3c_pMmSGYURFTRCmE4iuZqsEa1FniwWTuWgs72SecwCpCxYwusVAnFNpgsNLgpYhw$>
> ZjQcmQRYFpfptBannerEnd
>
> On 28/05/25 20:57, Ryan Eatmon wrote:
> >
> >
> > On 5/28/2025 10:16 AM, Denys Dmytriyenko wrote:
> >> On Wed, May 28, 2025 at 03:56:53PM +0530, Paresh Bhagat wrote:
> >>> From: Vishnu Singh <v-singh1@ti.com>
> >>>
> >>> Add rpmsg DMA library and simple DSP offload example, based on rpmsg 
> >>> & DMA Heap
> >>> buffers. This includes librpmsg_dma.so shared library used for 
> >>> real-time audio
> >>> offloading to DSP from Linux, Ethernet based control utility etc.
> >>>
> >>> Signed-off-by: Vishnu Singh <v-singh1@ti.com>
> >>> ---
> >>>   .../ipc/ti-librpmsg-dma-example_1.0.bb        | 28 
> >>> +++++++++++++++++++
> >>>   .../recipes-ti/ipc/ti-librpmsg-dma_1.0.bb     | 26 +++++++++++++++++
> >>>   2 files changed, 54 insertions(+)
> >>>   create mode 100644 
> >>> meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
> >>>   create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
> >>>
> >>> diff --git 
> >>> a/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb 
> >>> b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
> >>> new file mode 100644
> >>> index 00000000..8b01fa46
> >>> --- /dev/null
> >>> +++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
> >>> @@ -0,0 +1,28 @@
> >>> +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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
> >>> +
> >>> +S = "${WORKDIR}/git"
> >>> +
> >>> +DEPENDS = "ti-librpmsg-dma fftw libsndfile1 alsa-lib ti-rpmsg-char"
> >>
> >> See fftw comment below
> >
> > My counter response... if this recipe depends on ti-librpmsg-dma, then 
> > does this recipe need to depend on fftw?  Same question for all of the 
> > other DEPENDS entries.  Does this recipe actually depend on all this 
> > other packages or just ti-librpmsg-dma?
> >
> >
> > Follow on question.. why do we have two recipes that are both pointing 
> > at the same repository?
> >
> @Denys Dmytriyenko, @Eatmon, Ryan
> ti-librpmsg-dma only depends on ti-librpmsg-dma, update the recipe (will
> send new patch)
> ti-librpmsg-dma-example depends upon "ti-librpmsg-dma fftw libsndfile1
> alsa-lib", I have moved this recipe to ti-extras
>
> Below is the summary of both recipes
>
>        1. rpmsg DMA library (meta-ti-bsp/recipes-ti/ipc): This is generic
> rpmsg based library .
>               This is 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).
> >>> +
> >>> +do_compile() {
> >>> +    oe_runmake -C example/audio_offload
> >>> +}
> >>> +
> >>> +do_install() {
> >>> +    install -d ${D}${bindir}
> >>> +    install -m 0755 example/audio_offload/bin/audio_offload 
> >>> ${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"
> >>> +FILES:${PN} += "/opt/sample_audio.wav"
> >>
> >> Last 2 lines can be combined
> >>
> Addressed in next 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..666439dd
> >>> --- /dev/null
> >>> +++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
> >>> @@ -0,0 +1,26 @@
> >>> +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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
> >>> +
> >>> +S = "${WORKDIR}/git"
> >>> +
> >>> +DEPENDS = "fftw libsndfile1 alsa-lib ti-rpmsg-char"
> >>
> >> fftw is not in oe-core, but in meta-openembedded, and meta-ti does 
> >> not depend
> >> on meta-openembedded
> >
> > That's a problem then...  We don't want to blow up the requirements 
> > for building with just meta-ti-bsp (which a number of customers do).
> >
> > Does this belong more in meta-ti-extras then?
> >
> Example recipe is moved to meta-ti-extras
> >>
> >>> +
> >>> +do_compile() {
> >>> +    oe_runmake
> >>> +}
> >>> +
> >>> +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/
> >>> +}
> >>> +
> >>> +INSANE_SKIP:${PN} += "dev-so"
> >>
> >> Is it needed here? I see the versioned links are setup above, so this 
> >> should
> >> not be needed...
> Fixed in next patch
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#18605): https://urldefense.com/v3/__https://lists.yoctoproject.org/g/meta-ti/message/18605__;!!G3vK!QIQh4LqnWLO8ALUaJ0n9o-1TTcwiIILHP5WbekmadaM13vLEfrpYHiUsVvDq6msvsageGKEL2TufNelRhboLRt7NfyFGJyzd454$
> Mute This Topic: https://urldefense.com/v3/__https://lists.yoctoproject.org/mt/113341387/9299023__;!!G3vK!QIQh4LqnWLO8ALUaJ0n9o-1TTcwiIILHP5WbekmadaM13vLEfrpYHiUsVvDq6msvsageGKEL2TufNelRhboLRt7NfyFGtL4aJAA$
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://urldefense.com/v3/__https://lists.yoctoproject.org/g/meta-ti/unsub__;!!G3vK!QIQh4LqnWLO8ALUaJ0n9o-1TTcwiIILHP5WbekmadaM13vLEfrpYHiUsVvDq6msvsageGKEL2TufNelRhboLRt7NfyFG9mY6tAM$  [v-singh1@ti.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Denys Dmytriyenko May 29, 2025, 2:52 p.m. UTC | #5
On Wed, May 28, 2025 at 10:27:01AM -0500, Ryan Eatmon wrote:
> 
> 
> On 5/28/2025 10:16 AM, Denys Dmytriyenko wrote:
> >On Wed, May 28, 2025 at 03:56:53PM +0530, Paresh Bhagat wrote:
> >>From: Vishnu Singh <v-singh1@ti.com>
> >>
> >>Add rpmsg DMA library and simple DSP offload example, based on rpmsg & DMA Heap
> >>buffers. This includes librpmsg_dma.so shared library used for real-time audio
> >>offloading to DSP from Linux, Ethernet based control utility etc.
> >>
> >>Signed-off-by: Vishnu Singh <v-singh1@ti.com>
> >>---
> >>  .../ipc/ti-librpmsg-dma-example_1.0.bb        | 28 +++++++++++++++++++
> >>  .../recipes-ti/ipc/ti-librpmsg-dma_1.0.bb     | 26 +++++++++++++++++
> >>  2 files changed, 54 insertions(+)
> >>  create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
> >>  create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
> >>
> >>diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
> >>new file mode 100644
> >>index 00000000..8b01fa46
> >>--- /dev/null
> >>+++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
> >>@@ -0,0 +1,28 @@
> >>+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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
> >>+
> >>+S = "${WORKDIR}/git"
> >>+
> >>+DEPENDS = "ti-librpmsg-dma fftw libsndfile1 alsa-lib ti-rpmsg-char"
> >
> >See fftw comment below
> 
> My counter response... if this recipe depends on ti-librpmsg-dma,
> then does this recipe need to depend on fftw?  Same question for all
> of the other DEPENDS entries.  Does this recipe actually depend on
> all this other packages or just ti-librpmsg-dma?
> 
> 
> Follow on question.. why do we have two recipes that are both
> pointing at the same repository?
> 
> 
> >
> >>+
> >>+do_compile() {
> >>+	oe_runmake -C example/audio_offload
> >>+}
> >>+
> >>+do_install() {
> >>+	install -d ${D}${bindir}
> >>+	install -m 0755 example/audio_offload/bin/audio_offload ${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"
> >>+FILES:${PN} += "/opt/sample_audio.wav"
> >
> >Last 2 lines can be combined
> >
> >
> >>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..666439dd
> >>--- /dev/null
> >>+++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
> >>@@ -0,0 +1,26 @@
> >>+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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
> >>+
> >>+S = "${WORKDIR}/git"
> >>+
> >>+DEPENDS = "fftw libsndfile1 alsa-lib ti-rpmsg-char"
> >
> >fftw is not in oe-core, but in meta-openembedded, and meta-ti does not depend
> >on meta-openembedded
> 
> That's a problem then...  We don't want to blow up the requirements
> for building with just meta-ti-bsp (which a number of customers do).
> 
> Does this belong more in meta-ti-extras then?

I don't think meta-ti-extras makes much difference, as meta-ti overall does 
not depend on meta-openembedded.

* meta-ti-extras and meta-beagle both depend on meta-ti-bsp
* meta-ti-bsp depends only on oe-core and meta-arm

In general, BSPs are meant to have as fewer dependencies, as possible. E.g. 
OE-Core is obvious, while meta-arm provides some common pieces for ARM-based 
SoCs.

The entire split with meta-arago was partially to ensure this policy from the 
very beginning and we kept it this way for 15 years.


> >>+
> >>+do_compile() {
> >>+	oe_runmake
> >>+}
> >>+
> >>+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/
> >>+}
> >>+
> >>+INSANE_SKIP:${PN} += "dev-so"
> >
> >Is it needed here? I see the versioned links are setup above, so this should
> >not be needed...
diff mbox series

Patch

diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
new file mode 100644
index 00000000..8b01fa46
--- /dev/null
+++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb
@@ -0,0 +1,28 @@ 
+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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "ti-librpmsg-dma fftw libsndfile1 alsa-lib ti-rpmsg-char"
+
+do_compile() {
+	oe_runmake -C example/audio_offload
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 example/audio_offload/bin/audio_offload ${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"
+FILES:${PN} += "/opt/sample_audio.wav"
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..666439dd
--- /dev/null
+++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb
@@ -0,0 +1,26 @@ 
+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 = "b71b6a2690eaac4ec1619a18733f73e505023ff7"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "fftw libsndfile1 alsa-lib ti-rpmsg-char"
+
+do_compile() {
+	oe_runmake
+}
+
+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/
+}
+
+INSANE_SKIP:${PN} += "dev-so"