[Bug 698960] High CPU load with alsa

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun May 12 10:27:19 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=698960
  GStreamer | gst-plugins-base | 1.0.6

--- Comment #3 from Paul HENRYS <visechelle at gmail.com> 2013-05-12 17:27:14 UTC ---
Ok in the new patch in attachment I did the changes advised. Then, I don't know
if this is relevant for all architectures but it seems, as written above, that
most of the time, buffer size and period size are a power of 2.

Something else that I noticed lastly is that the way the ring buffer is used in
gstaudiobasesink and in Alsa lib is different. If I am not wrong, the number of
segments in the ring buffer in audiobasesink should be kept low to minimize the
latency. On the contrary in Alsa lib, the ring buffer is kept as full as
possible: "ALSA will endeavor to keep the buffer as full as possible"
(http://www.alsa-project.org/main/index.php/FramesPeriods). This means that by
default with alsasrc/sink, we get a latency of 200ms in the src and in the
sink. I am wondering if Alsa buffer size should not be set according to the
audio ring buffer size but base on the period size, e.g. 2 times the period
size as described in the link above. This will avoid to create latency in Alsa
and keep a good size for the audio ring buffer of gstaudiobasesink so it can
play its role.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list