[Sound-open-firmware] Loading external library
Daniel Baluta
daniel.baluta at gmail.com
Thu Jun 21 08:43:48 CEST 2018
On Wed, Jun 20, 2018 at 7:26 PM, Pierre-Louis Bossart
<pierre-louis.bossart at linux.intel.com> wrote:
> On 6/20/18 9:52 AM, Daniel Baluta wrote:
>>
>> On Fri, Jun 15, 2018 at 9:28 PM, Liam Girdwood
>> <liam.r.girdwood at linux.intel.com> wrote:
>>>
>>> On Fri, 2018-06-15 at 18:42 +0300, Daniel Baluta wrote:
>>>>
>>>> Hi,
>>>>
>>>> Does SOF firmware/driver supports loading a library and executing code
>>>> from
>>>> it?
>>>
>>>
>>> Yes, this can currently done by :-
>>>
>>> 1) Building the library (source or binary) into the base firmware image
>>> like
>>> SRC, mixer etc is today.
>>>
>>> 2) Building the library as a separate module that is stitched into the FW
>>> image
>>> and loaded with base FW (like boot loader on APL/CNL).
>>>
>>> and step 3 is work in progress (in module branch)
>>>
>>> 3) Building the library as a separate module that is loaded and linked at
>>> runtime (like Linux kernel modules).
>>
>>
>> Thanks Liam. Another question:
>>
>> After implementing 3) how one can use the DSP to decode
>> for example an mp3 file back into a pcm file.
>>
>> I have some libraries that DSP can use to decode mp3 into pcm.
>>
>> So, I assume I can use cplay to stream an mp3 file into a compress device
>> then create a pipeline of components and buffers, but i'm not sure how do
>> I
>> get the pcm decoded bytes back. Ideally, would be to use crecord.
>
>
> So you want the PCM samples to be provided back to userspace?
Yes.
>
> That's not really a configuration we've tested at Intel, and the compressed
> stuff was more geared towards direct connection to the hardware to save on
> power.
>
> It's still possible but you have to play with the topology and have one
> stream providing the compressed data and another one to record, with some
> special scheduling to make sure this activity doesn't prevent the DSP from
> working (there is no output DMA or timer event to throttle the processing
> and e.g. handle IPC)
Ok. Will try to create a pipeline with two components: 1st component
output to be looped
into 2nd component input and some processing in between.
More information about the Sound-open-firmware
mailing list