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
diff --git a/services/audiopolicy/service/AudioPolicyService.cpp b/services/audiopolicy/service/AudioPolicyService.cpp
index bf38477..bec6aff 100644
--- a/services/audiopolicy/service/AudioPolicyService.cpp
+++ b/services/audiopolicy/service/AudioPolicyService.cpp
@@ -1876,7 +1876,7 @@
void AudioPolicyService::onNewAudioModulesAvailable()
{
- mAudioCommandThread->audioModulesUpdateCommand();
+ mOutputCommandThread->audioModulesUpdateCommand();
}