Google is giving Bluetooth Audio Playback Realtime CPU Scheduling Priority to Prevent Audio Skipping
With the recent launch of the Google Pixel 2, users may have been upset to find that the device does not sport a 3.5mm headphone jack, and instead have to rely on either USB-C audio or Bluetooth. Relying on Bluetooth audio can be problematic as playback can become glitchy or start skipping if the system is under high load.
This can cause an undesirable user experience, and it wouldn’t be too uncommon either for Bluetooth audio to skip occasionally. This is because the system needs to engage in extra processing to stream Bluetooth to another device. A good solution, which Google will implement according to a commit we recently discovered in the Android open source repository, is to grant real-time CPU scheduling of the Bluetooth audio playback. This should fix any previous issues involving Bluetooth audio skipping caused by the system being under heavy load when playing.
What Does Real-Time Bluetooth Audio Playback Processing Mean?
It sounds simple, and pretty much is. When we reference processing speed, we really are referring to two things. One of which is the actual processor and the number of cycles it makes per second, the other is how fast processes can be scheduled. When programs run on your device, computations are done with the “scheduler.” The scheduler decides what should run and when, prioritizing certain processes over others.
It’s worth noting that the Google Pixels use a special scheduler and load tracking system in the form of Energy Aware Scheduling (EAS), but the theory is the same. When a process is granted “real-time” CPU scheduling, it simply means that for each CPU cycle, the process—in this case Bluetooth audio playback—is prioritized above nearly all other processes. This allows the device to process all Bluetooth audio playback first, so even under high load Bluetooth audio playback should be near perfect.
Want more posts like this delivered to your inbox? Enter your email to be subscribed to our newsletter.