Tricks learned writing the software for the Pixel can hopefully make Bluetooth faster, stronger, and better.

In their Reddit AMA (Ask Me Anything) session today, the Google team takes on Bluetooth. Specifically, if Android O can make it suck less.

The team is aware of all the Bluetooth errors and inconsistencies evident on many Android phones and have used a trick they learned while writing the new system elements for Android N on the Pixel.

Tim Murray: The Android Bluetooth, audio, and performance teams actually did a lot of work to improve BT audio in O. We flipped the switch internally since the most recent developer preview because we needed a little more time to make sure that things were stable, so you haven’t seen the fruits of that labor quite yet.

What’d we do: back during Pixel development, the perf team guessed that it’s probably a good idea to make the UI-critical parts of the system as deterministic as possible to avoid random scheduler delays. Turns out yes, that’s a good idea, and removing scheduler delay from the UI pipeline fixes a ton of random jank. You can see the details of all the stuff we did at
It worked so well for UI that we decided to do the same thing for BT audio. We could see cases where random scheduler delay would cause BT audio artifacts, so we tried working our way through the entire BT pipeline to figure out exactly what guarantees were needed where to ensure that audio quality was perfect. This removed tens of milliseconds of possible jitter per BT packet and required fixes throughout the stack, from the framework down to kernel drivers.

Our testing shows that BT audio reliability is drastically better vs N because of these changes. We’re happy with how it’s turned out, and we hope you see the same kind of improvements.

Read the comment thread in it’s entirety

In “regular” speech, they simplified code for the critical UI elements so that it was more linear and the system didn’t have to wait for a task to get scheduled and have it’s turn. Cutting out the unnecessary delay and processing is much of what makes the UI on the Pixel as fluid and lag-free as it is. Using these same techniques on Bluetooth should mean more data gets sent in the same amount of time, and less time is being spent processing it at the source. This makes for a better connection and uninterrupted stream.

As noted, this was done since the last developer beta was released, so we haven’t seen it in action yet. We look forward to seeing it, along with all the other final tweaks and refinements when Android O is officially released.

Source link