[Sound-open-firmware] Loading external library

Liam Girdwood liam.r.girdwood at linux.intel.com
Wed Jun 27 09:49:19 CEST 2018


On Tue, 2018-06-26 at 19:05 +0300, Daniel Baluta wrote:
> 
> 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.

No sure, Pierre did a lot on work on the compressed APIs so best for him to
comment on the intended approach here.

If nothing is obvious, perhaps we need to add an equivalent of hw_free() for
compressed streams.

Liam


More information about the Sound-open-firmware mailing list