Re: Using available DSP tasks

2008-01-01 Thread Simon Pickering
Quoting Daniel Charles [EMAIL PROTECTED]:

 See the merged pipeline below

 Yes, this is certainly doable already. I don't have any G7.11 data to
 hand, but have tried it by mixing ogg and mp3 data (ogg using Tuomas
 Kulve's gstreamer plugin which uses the pcm dsp sink).

 E.g. These two commands can be run is separate terminal windows and  
  are mixed:

 gst-launch-0.10 filesrc location=20-16000HzExp5sec.mp3 ! dspmp3sink

 gst-launch-0.10 filesrc location=opensource.ogg  ! application/ogg !
 tremor ! dsppcmsink

 gst-launch-0.10 filesrc location=20-16000HzExp5sec.mp3 ! dspmp3sink \
 filesrc location=opensource.ogg  ! application/ogg !
 tremor ! dsppcmsink

 This way you can be sure that both pipelines are running on a single
 process.  I'm not certain it is going to work as expected due to
 constraints with two audio streams running at the same time, but you
 can write as many source-filter-sink pipelines in a single
 gst-launch as you want.

Thank you very much. Is the backslash optional? Was it there just to  
indicate a line continuation (my email client has wrapped the  
following line too) or is it the correct way to separate the different  
parts of the pipeline?

In any case your command (with or without backslash) produces the  
desired behaviour and both files play.

Cheers,


Simon

P.S. Just to test that the karaoke idea will work I tested MP3 and  
G7.29 data (I couldn't find any G7.11 data to test) and they play  
together without troubles:

E.g.
gst-launch-0.10 filesrc location=20-16000HzExp5sec.mp3 ! dspmp3sink  
filesrc location=./audio-temp/transfer.g729  ! dspg729sink

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Using available DSP tasks

2008-01-01 Thread Daniel Charles
On Jan 1, 2008 12:32 PM, Simon Pickering [EMAIL PROTECTED] wrote:
 Quoting Daniel Charles [EMAIL PROTECTED]:

  See the merged pipeline below

  Yes, this is certainly doable already. I don't have any G7.11 data to
  hand, but have tried it by mixing ogg and mp3 data (ogg using Tuomas
  Kulve's gstreamer plugin which uses the pcm dsp sink).
 
  E.g. These two commands can be run is separate terminal windows and
   are mixed:
 
  gst-launch-0.10 filesrc location=20-16000HzExp5sec.mp3 ! dspmp3sink
 
  gst-launch-0.10 filesrc location=opensource.ogg  ! application/ogg !
  tremor ! dsppcmsink
 
  gst-launch-0.10 filesrc location=20-16000HzExp5sec.mp3 ! dspmp3sink \
  filesrc location=opensource.ogg  ! application/ogg !
  tremor ! dsppcmsink
 
  This way you can be sure that both pipelines are running on a single
  process.  I'm not certain it is going to work as expected due to
  constraints with two audio streams running at the same time, but you
  can write as many source-filter-sink pipelines in a single
  gst-launch as you want.

 Thank you very much. Is the backslash optional? Was it there just to
 indicate a line continuation (my email client has wrapped the
 following line too) or is it the correct way to separate the different
 parts of the pipeline?

Yes it is a line continuation, normally in a command prompt you can
either type (copy/paste) the entire line or with the back slash for
read clarity but it is optional.

 In any case your command (with or without backslash) produces the
 desired behaviour and both files play.

I'm glad to hear that it worked :)

Daniel

 Cheers,


 Simon

 P.S. Just to test that the karaoke idea will work I tested MP3 and
 G7.29 data (I couldn't find any G7.11 data to test) and they play
 together without troubles:

 E.g.
 gst-launch-0.10 filesrc location=20-16000HzExp5sec.mp3 ! dspmp3sink
 filesrc location=./audio-temp/transfer.g729  ! dspg729sink


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Using available DSP tasks

2008-01-01 Thread Jean-Christian de Rivaz
Hello Simon and Daniel,

Your help is truly fantastic! I have found the gst-inspect-0.10 -a 
command and I have now almost all the informations I need. I have tested 
this command:

gst-launch-0.10 dspg729src dtx=3 ! dspg729sink filesrc 
location=MyDocs/.sound/Here_is_the_story.mp3

Most of the time this command raise a error in gst_dspg729src_start: 
could not open resource for reading and writing. But sometimes it work 
perfectly well as expected, with as bonus the automatic gain control of 
the voice with silence detection, and all that without loading the main 
CPU. Very nice!

But the following command never work as I expected:

gst-launch-0.10 dspg729src dtx=3 ! filesink location=in filesrc 
location=out ! dspg729sink filesrc 
location=MyDocs/.sound/Here_is_the_story.mp3

The in file start recorded only after the out file has been played. 
And sometimes the command failed with an error in gst_dspmp3sink_open : 
Could not open resource for reading and writing, witch is strange for 
the MP3 stream.

Other problem, the G729 stream is only usable for a few seconds if it is 
recorded into a file. I actually don't know if the problem is while 
recording or playing the stream. I suspect that I maybe need to use 
something that look more like stream of packets instead of a file to 
handle the G729 stream.

Best Regards,
--
Jean-Christian

 P.S. Just to test that the karaoke idea will work I tested MP3 and
 G7.29 data (I couldn't find any G7.11 data to test) and they play
 together without troubles:

 E.g.
 gst-launch-0.10 filesrc location=20-16000HzExp5sec.mp3 ! dspmp3sink
 filesrc location=./audio-temp/transfer.g729  ! dspg729sink


 
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Using available DSP tasks

2008-01-01 Thread Jean-Christian de Rivaz
Sorry, I missed the  ! dspmp3sink at the end of each command into my 
previous mail. The correct commands was:

gst-launch-0.10 dspg729src dtx=3 ! dspg729sink filesrc 
location=MyDocs/.sound/Here_is_the_story.mp3 ! dspmp3sink

gst-launch-0.10 dspg729src dtx=3 ! filesink location=in filesrc 
location=out ! dspg729sink filesrc 
location=MyDocs/.sound/Here_is_the_story.mp3 ! dspmp3sink

-- 
Jean-Christian de Rivaz
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Using available DSP tasks

2007-12-31 Thread Simon Pickering

 Thanks for your explanation.

np

 After having read the basic Gstreamer documentation, I understand
 better the sink pad concept of the mp3 task. In the application I am
 thinking about now, I don't need to look at the raw audio data decoded
 by the MP3 task as long as I can mix with it an other raw audio stream.
 I fact I need to mix a MP3 stream and a G711|G729|ILBC|AMR stream. You
 can see it as a kind of karaoke: mixing music (MP3) and voice (low
 bandwidth codec). The result should simply be available on the output
 jack.

 Did you think it is already doable now ?

Yes, this is certainly doable already. I don't have any G7.11 data to  
hand, but have tried it by mixing ogg and mp3 data (ogg using Tuomas  
Kulve's gstreamer plugin which uses the pcm dsp sink).

E.g. These two commands can be run is separate terminal windows and are mixed:

gst-launch-0.10 filesrc location=20-16000HzExp5sec.mp3 ! dspmp3sink

gst-launch-0.10 filesrc location=opensource.ogg  ! application/ogg !  
tremor ! dsppcmsink

So this uses the mp3 sink and the pcm sink simultaneously. I imagine  
it must be possible to start two separate sources in a single  
gstreamer pipeline and then send them to separate sinks (i.e. as I've  
done in the above example but all in one command). Anyone know how to  
do this?


Simon

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Using available DSP tasks

2007-12-31 Thread Daniel Charles
Hi,

See the merged pipeline below

On Dec 31, 2007 7:49 AM, Simon Pickering [EMAIL PROTECTED] wrote:

  Thanks for your explanation.

 np

  After having read the basic Gstreamer documentation, I understand
  better the sink pad concept of the mp3 task. In the application I am
  thinking about now, I don't need to look at the raw audio data decoded
  by the MP3 task as long as I can mix with it an other raw audio stream.
  I fact I need to mix a MP3 stream and a G711|G729|ILBC|AMR stream. You
  can see it as a kind of karaoke: mixing music (MP3) and voice (low
  bandwidth codec). The result should simply be available on the output
  jack.
 
  Did you think it is already doable now ?

 Yes, this is certainly doable already. I don't have any G7.11 data to
 hand, but have tried it by mixing ogg and mp3 data (ogg using Tuomas
 Kulve's gstreamer plugin which uses the pcm dsp sink).

 E.g. These two commands can be run is separate terminal windows and are mixed:

 gst-launch-0.10 filesrc location=20-16000HzExp5sec.mp3 ! dspmp3sink

 gst-launch-0.10 filesrc location=opensource.ogg  ! application/ogg !
 tremor ! dsppcmsink

gst-launch-0.10 filesrc location=20-16000HzExp5sec.mp3 ! dspmp3sink \
filesrc location=opensource.ogg  ! application/ogg !
tremor ! dsppcmsink

This way you can be sure that both pipelines are running on a single
process.  I'm not certain it is going to work as expected due to
constraints with two audio streams running at the same time, but you
can write as many source-filter-sink pipelines in a single
gst-launch as you want.

Thanks,

Daniel.


 So this uses the mp3 sink and the pcm sink simultaneously. I imagine
 it must be possible to start two separate sources in a single
 gstreamer pipeline and then send them to separate sinks (i.e. as I've
 done in the above example but all in one command). Anyone know how to
 do this?


 Simon


 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Using available DSP tasks

2007-12-30 Thread Tuomas Kulve
Jean-Christian de Rivaz wrote:

 g729_dec was runnings. I wonder if this was a limitation from the DSP 
 or from the Linux applications (e.g. Media Player and Skype trying to 
 use the same device).

I think the device stops all other audio when a VOIP call is made, but I
think this is how it's designed, not a technical limitation. I'm mostly
guessing here though.

You should be able to test that quite easily by running couple
gst-launch instances from the command line.

-- 
Tuomas



signature.asc
Description: OpenPGP digital signature
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Using available DSP tasks

2007-12-30 Thread Simon Pickering

 If the DSP in not the limitation, then the N800 could be used for a
 funny project I have now in my head. I there any documentation on how to
   program a Linux application to use some existing DSP tasks available
 on the N800? I am interesting about the MP3 decoder and a pair of low
 bandwidth coder/decoder like G711, G729 or ILBC.

There is source available for the ARM-side part of the gstreamer sinks  
(http://repository.maemo.org/pool/chinook/free/source/g/gst-plugins-dsp0.10/).  
That should show you how to use the dsp tasks.

There's a fundamental problem though, the mp3 dsp task sends its data  
directly to the audio codec (hardware) on the DSP-side, therefore  
you're probably not going to be able to access the raw data to  
reencode it as something else (unless it is also exposed in a buffer  
in shared memory).

I am debugging an mp3 dsptask at the moment, so you may yet have  
something to play with at some point in the near future if you can't  
get the built-in tasks to work as you wish.

Cheers,


Simon

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Using available DSP tasks

2007-12-30 Thread Tuomas Kulve
Simon Pickering wrote:
 There is source available for the ARM-side part of the gstreamer sinks  
 (http://repository.maemo.org/pool/chinook/free/source/g/gst-plugins-dsp0.10/).
   
 That should show you how to use the dsp tasks.

Source that is non-compilable:

https://bugs.maemo.org/show_bug.cgi?id=2271

-- 
Tuomas



signature.asc
Description: OpenPGP digital signature
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Using available DSP tasks

2007-12-30 Thread Jean-Christian de Rivaz
Tuomas Kulve a écrit :
 Jean-Christian de Rivaz wrote:
 
 g729_dec was runnings. I wonder if this was a limitation from the DSP 
 or from the Linux applications (e.g. Media Player and Skype trying to 
 use the same device).
 
 I think the device stops all other audio when a VOIP call is made, but I
 think this is how it's designed, not a technical limitation. I'm mostly
 guessing here though.
 
 You should be able to test that quite easily by running couple
 gst-launch instances from the command line.
 

Thanks for the gst-launch hint. I didn't know Gstreamer, so I will have 
to learn a bit before doing useful experiment. Seem to be a very nice 
open source framework.

Regards,
-- 
Jean-Christian de Rivaz
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Using available DSP tasks

2007-12-30 Thread Jean-Christian de Rivaz
Simon Pickering a écrit :
 
 If the DSP in not the limitation, then the N800 could be used for a
 funny project I have now in my head. I there any documentation on how to
   program a Linux application to use some existing DSP tasks available
 on the N800? I am interesting about the MP3 decoder and a pair of low
 bandwidth coder/decoder like G711, G729 or ILBC.
 
 There is source available for the ARM-side part of the gstreamer sinks 
 (http://repository.maemo.org/pool/chinook/free/source/g/gst-plugins-dsp0.10/).
  
 That should show you how to use the dsp tasks.
 
 There's a fundamental problem though, the mp3 dsp task sends its data 
 directly to the audio codec (hardware) on the DSP-side, therefore you're 
 probably not going to be able to access the raw data to reencode it as 
 something else (unless it is also exposed in a buffer in shared memory).
 
 I am debugging an mp3 dsptask at the moment, so you may yet have 
 something to play with at some point in the near future if you can't get 
 the built-in tasks to work as you wish.
 
 Cheers,

Hi Simon,

Thanks for your explanation.

After having read the basic Gstreamer documentation, I understand better 
the sink pad concept of the mp3 task. In the application I am thinking 
about now, I don't need to look at the raw audio data decoded by the MP3 
task as long as I can mix with it an other raw audio stream. I fact I 
need to mix a MP3 stream and a G711|G729|ILBC|AMR stream. You can see it 
as a kind of karaoke: mixing music (MP3) and voice (low bandwidth 
codec). The result should simply be available on the output jack.

Did you think it is already doable now ?

Best Regards,
-- 
Jean-Christian de Rivaz
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Using available DSP tasks

2007-12-29 Thread Jean-Christian de Rivaz
Hello,

I have monitored the DPS tasks by executing periodically the command 
cat /sys/devices/platform/dsp/dsptask*/taskname while playing some 
tests with a MP3 in media player and the Skype test call. I found that 
the DSP can run many tasks at the same time, but I was unable to catch 
the mp3dec task running at the same time that the g729_enc and 
g729_dec was runnings. I wonder if this was a limitation from the DSP 
or from the Linux applications (e.g. Media Player and Skype trying to 
use the same device).

If the DSP in not the limitation, then the N800 could be used for a 
funny project I have now in my head. I there any documentation on how to 
  program a Linux application to use some existing DSP tasks available 
on the N800? I am interesting about the MP3 decoder and a pair of low 
bandwidth coder/decoder like G711, G729 or ILBC.

Best Regards,
-- 
Jean-Christian de Rivaz
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers