[maemo-developers] GStreamer, mp3 playback and the DSP

From: Felipe Contreras felipe.contreras at gmail.com
Date: Thu Apr 15 16:32:04 EEST 2010
On Sun, Apr 11, 2010 at 12:01 AM, Javier S. Pedro <maemo at javispedro.com> wrote:
> Simon Pickering wrote:
>> So yes, my understanding is that that is exactly what's involved,
>> therefore it should be possible to write an OpenMAX compliant codec that
>> uses the DSP bridge to transfer data back and forth to a decoder running
>> on the DSP.
> There's a already a OpenMAX compliant MP3 decoder, the Palm Pre uses it.
> (mp3dec_sn.dll64P dsp side, libOMX.TI.Mp3.decode.so arm side).
> Unfortunately, I don't know the licensing of it, and Nokia for sure is not
> including it.

I don't know which specific version of TI's MP3 decoder is Palm using,
but you can find public versions of it from TI (not sure if you can
distribute them):

I haven't tried this, but my guess is that simply sending buffers back
and forth to the DSP would take more CPU, specially taking into
account the OpenMAX overhead.

The most efficient way to do this would be to add support for MP3
decoding to gst-dsp (bypassing OpenMAX). Then profiling would be
needed in order to tune gst-dsp for audio (audio buffers are much

You can try dsp-dummy to simulate MP3 decoding and see if it's worth
the trouble. An alternative would be to take FFmpeg's MP3 decoder and
see if there's any NEON optimizations that can be done.

> In fact, Nokia explicitly chose to remove the audio DSP decoders from the
> firmwares (see gst-openmax Maemo patches), probably to save rootfs space
> since the builtin media player would not be using them (for powersaving
> reasons).
> It would be nice if we could get a word or two from "above" about shipping
> those as an extras package, for the use cases like the one described by the
> OP.

gst-openmax is just a wrapper in order to use OpenMAX IL components;
there's no point in including the omx_mp3dec element if it's going to
fail due to missing omx component.

First you would need the DSP socket-node, then the omx component
(libOMX.TI.Mp3.decode.so), and then it would make sense to add the
element to gst-openmax. This would require modifications to
gst-openmax and could be done as a separate package.

>> I imagine/hope the N900 + DSP bridge setup is better, but I really don't
>> know. Does anyone know? Could a Nokian tell us about the possibility of
>> direct audio output from the DSP and how efficient the data passing is
>> in the absence of direct audio output?
> I am not an authority here either, but remember that audio to the speakers
> should pass through PulseAudio's HP filter, or else they might be damaged.
> (http://talk.maemo.org/showthread.php?t=36555). So I guess the question is
> indeed the latter one :)

Yeah, I don't know if it's possible to do that, but I wouldn't try.


Felipe Contreras
More information about the maemo-developers mailing list