Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33575cb9 authored by Andy Hung's avatar Andy Hung
Browse files

Change Nexus 5 and Nexus 6 deep buffer to 2 periods of 1920 frames(40ms)

Prior setting of 8 periods of 960 frames had identical
thread processing interval to the normal mixer thread.
By increasing the thread processing interval, there is
a measured power reduction of 10 percent on MSM8994.

Note: as a consequence, operations such as pause or volume
may have a slightly greater granularity (40 ms vs 20 ms).

Bug: 21198655
Change-Id: Icd8ce12c987d2b89578c2d2ad9a2ded54c6ce4c0
parent 8c8d0cf4
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -156,8 +156,11 @@ enum {
 * We should take care of returning proper size when AudioFlinger queries for
 * the buffer size of an input/output stream
 */
#define DEEP_BUFFER_OUTPUT_PERIOD_SIZE 960
#define DEEP_BUFFER_OUTPUT_PERIOD_COUNT 8

/* 1920 frames(40ms) at 2 buffers gives a good tradeoff between power and latency */
#define DEEP_BUFFER_OUTPUT_PERIOD_SIZE 1920
#define DEEP_BUFFER_OUTPUT_PERIOD_COUNT 2

#define LOW_LATENCY_OUTPUT_PERIOD_SIZE 240
#define LOW_LATENCY_OUTPUT_PERIOD_COUNT 2