I2S Bus Channel Configuration in GStreamer alsasrc
A colleague recently observed a significant discrepancy in CPU usage while testing the GStreamer alsasrc and osssrc plugins. On our hardware platforms, alsasrc was consuming about 16% of CPU resources, whereas the vendor-provided test tools achieved the same task with only 1~2% overhead. This massive gap in efficiency piqued my curiosity, and I decided to investigate the root cause. After several hours of deep diving into the code, I discovered that when the plugin is set to “non-blocking mode,” it can trigger a busy-wait condition within a while loop, needlessly spiking CPU cycles. After a quick patch to optimize this behavior, I managed to bring the CPU usage down to 12%. While an improvement, it still felt far from the vendor tool’s efficiency. ...