APM: Notify the client about new audio ports
Added missing notification to the APM client
about new audio ports. This should make the
ports provided by the newly discovered HAL
to be available to apps.
Process the onNewAudioModulesAvailable notification
on the "APM Output" command thread to avoid clashing
with outgoing commands from APM during module
initialization.
Bug: 149854039
Test: atest audiopolicy_tests
Change-Id: I3fede7f5a04419b15e15476d8b5ac7dc6d63c98d
Merged-In: I3fede7f5a04419b15e15476d8b5ac7dc6d63c98d
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.h b/services/audiopolicy/managerdefault/AudioPolicyManager.h
index 4604676..9eb9a1d 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.h
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.h
@@ -776,6 +776,8 @@
std::unordered_map<uid_t, audio_flags_mask_t> mAllowedCapturePolicies;
private:
+ void onNewAudioModulesAvailableInt(DeviceVector *newDevices);
+
// Add or remove AC3 DTS encodings based on user preferences.
void modifySurroundFormats(const sp<DeviceDescriptor>& devDesc, FormatVector *formatsPtr);
void modifySurroundChannelMasks(ChannelMaskSet *channelMasksPtr);
@@ -865,6 +867,8 @@
const char *device_address,
const char *device_name,
audio_format_t encodedFormat);
+ status_t setDeviceConnectionStateInt(const sp<DeviceDescriptor> &device,
+ audio_policy_dev_state_t state);
void setEngineDeviceConnectionState(const sp<DeviceDescriptor> device,
audio_policy_dev_state_t state);