AudioPolicyManager: fix device enumeration
The AudioDeviceInfo only had PCM_FLOAT because the device enumeration was
stopping because of an error. The error was detected by new code
in the AudioFlinger.
The root error was not clearing a variable after a close.
Bug: 27457547
Change-Id: I529a26c8c0a688863bcf316ad365feddc303fe43
Signed-off-by: Phil Burk <philburk@google.com>
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 584aadf..da845d4 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -3637,6 +3637,7 @@
output = AUDIO_IO_HANDLE_NONE;
} else if (profile->hasDynamicAudioProfile()) {
mpClientInterface->closeOutput(output);
+ output = AUDIO_IO_HANDLE_NONE;
profile->pickAudioProfile(config.sample_rate, config.channel_mask, config.format);
config.offload_info.sample_rate = config.sample_rate;
config.offload_info.channel_mask = config.channel_mask;