APM: use the device profile to update dynamic profiles.
In AIDL HAL, getParameters API is no longer supported. The profiles of
dynamic mix port will be determined by the connected device, which can
be known by calling getAudioPort API. In APM, use the device profiles
to update dynamic profiles when calling getParameters fails.
Bug: 277785275
Test: atest audiopolicy_tests
Test: manually with AIDL HAL
Change-Id: I99455c76267368c19b5be8e1667a10de84e3cedd
diff --git a/media/libaudiohal/impl/StreamHalAidl.cpp b/media/libaudiohal/impl/StreamHalAidl.cpp
index 3048580..eb6d6b1 100644
--- a/media/libaudiohal/impl/StreamHalAidl.cpp
+++ b/media/libaudiohal/impl/StreamHalAidl.cpp
@@ -167,9 +167,8 @@
ALOGD("%p %s::%s", this, getClassName().c_str(), __func__);
TIME_CHECK();
values->clear();
- if (!mStream) return NO_INIT;
- ALOGE("%s not implemented yet", __func__);
- return OK;
+ // AIDL HAL doesn't support getParameters API.
+ return INVALID_OPERATION;
}
status_t StreamHalAidl::getFrameSize(size_t *size) {