getPrimary APIs now examine all non-duplicating output threads

and return the value corresponding to the thread with minimum frame count,
with a preference for a thread with fast mixer if there are multiple
output threads with the same minimum frame count.
This is in keeping with the expectation by apps that the getPrimary APIs
will return a value for the lowest available latency path.

Bug: 29164107
Change-Id: I8ae9bcad2d48185d7717ccf96085834c0ce00e37
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 4a5a643..c56dcc1 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -575,6 +575,9 @@
               PlaybackThread *primaryPlaybackThread_l() const;
               audio_devices_t primaryOutputDevice_l() const;
 
+              // return the playback thread with smallest HAL buffer size, and prefer fast
+              PlaybackThread *fastPlaybackThread_l() const;
+
               sp<PlaybackThread> getEffectThread_l(audio_session_t sessionId, int EffectId);