[pulseaudio-discuss] pulsesrc consumes much more CPU than alsasrc

Bin Gao bin.gao at intel.com
Mon Mar 15 03:28:56 PDT 2010


(resend as plain text)

Hi all,

It seems both pulseaudio alsa PCM plugin (source) and  gstreamer
pulsesrc consume much more CPU resource than alsa when working on the
same sample (rate, channel and format). I had a rough look at the source
code and found they both use the threaded mainloop model. Can we have
any chance to optimize for this?

$ arecord -Dhw:0,0 -c 2 -f S32_LE test.wav   CPU% = 1~2%
$ arecord -c 2 -f S32_LE test.wav                  CPU% = 15~18%
(default device is pulseaudio PCM plugin)
$ gst-launch alsasrc device="hw:0,0" ! queue ! audioconvert ! wavenc !
filesink location=test.wav     CPU% = 2~3% 
$ gst-launch pulsesrc ! queue ! audioconvert ! wavenc ! filesink
location=test.wav   CPU% = 12~14%

Thanks,
Bin




More information about the pulseaudio-discuss mailing list