On Fri, Jun 15, 2018 at 9:28 PM, Liam Girdwood liam.r.girdwood@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 :-
- Building the library (source or binary) into the base firmware image like
SRC, mixer etc is today.
- 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)
- Building the library as a separate module that is loaded and linked at
runtime (like Linux kernel modules).
Hi Liam,
Just wanted to check with you if I'm going in the correct direction.
I'm trying to play an mp3 file using cplay from tinycompres. The question now is when to load the codec library.
It seems that the codec_id can be passed via SNDRV_COMPRESS_SET_PARAMS stored inside snd_codec id field.
Now, I can load the codec library in stream->ops->set_params and since set_params is called in compress_open I can have the codec loaded before playing starts.
My concern is that I also need to unload the library (to free resources) when playing is done.
But, there is no symmetric call to set_params to be called in compress_close.
Any idea is welcomed.
thanks, Daniel.