[Sound-open-firmware] Loading external library

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Wed Jun 20 18:26:16 CEST 2018


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?

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)

> 
> I'm still reading sof code. Any ideas would be great!
> 
> thanks,
> daniel.
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
> 



More information about the Sound-open-firmware mailing list