This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Gstreamer running with DVSDK 4.01 DM365 EVM - alsasrc memory/cpu load too high (near 100%)

While building a pipeline for gst-launch using the DVSDK 4.01 for the DM365 on a DM365EVM. I discovered what I believe is a bug with the TI's implementation of gstreamer

I found that using alsasrc takes near 100% of the cpu and memory and produces very choppy audio.

Comands I used to test this were:

DM365 EVM #  gst-launch alsasrc ! alsasink &

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
WARNING: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Can't record audio fast enough
Additional debug info:
gstbaseaudiosrc.c(822): gst_base_audio_src_create (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
Dropped 8820 samples. This is most likely because downstream can't keep up and is consuming samples too sl
owly.

DM365 EVM # top

Mem: 41744K used, 8536K free, 0K shrd, 0K buff, 25168K cached
CPU:  32% usr  66% sys   0% nic   0% idle   0% io   0% irq   0% sirq
Load average: 0.60 0.20 0.05 2/40 1611
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
 1605  1446 root     S    49616  98%  99% /usr/bin/gst-launch-0.10 alsasrc ! als

 

I then tried

 

# arecord -f data | aplay.

This worked great and only took .2% of CPU.

Mem: 23176K used, 27104K free, 0K shrd, 0K buff, 8036K cached
CPU:   0% usr   0% sys   0% nic  99% idle   0% io   0% irq   0% sirq
Load average: 0.16 0.16 0.13 1/37 1445
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
 1445  1440 root     R     3072   6%   1% top
 1442  1440 root     S     3396   7%   0% arecord
 1443  1440 root     S     3396   7%   0% aplay

 

I did some tests with alsasink and this is not the problem.

 

I also tried.

# gst-launch alsasrc ! fakesink

The result was near 100% cpu and memory utilization.

 

I am using the suggested default bootargs as setup with the DVSDK4.01

 

bootargs=console=ttyS0,115200n8 rw mem=54M video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,4050K dm365_i
mp.oper_mode=0 davinci_capture.device_type=4 vpfe_capture.cont_bufsize=6291456 davinci_enc_mngr.ch0_output
=COMPONENT davinci_enc_mngr.ch0_mode=480P-60 root=/dev/nfs nfsroot=172.16.0.74:/home/user/targetfs ip=dhcp
bootcmd=dhcp;setenv serverip 172.16.0.74;tftpboot;bootm

I tried to adjust the mem=80M with little improvement.

 

This is a show stopper for us. Can you please test this on your DM365 EVM and see if you get similar results.

 

Thanks you for your help