Use HAL-provided config for getInputBufferSize
Since getInputBufferSize is essentially the same
operation as opening a stream, it can also suggest
a config if the provided one is not supported.
Modify AudioFlinger::getInputBufferSize implementation
to retry with HAL-provided config.
Bug: 318423731
Test: run `atest audioeffect_tests` on cf_x86_64_auto-trunk_staging-userdebug
Change-Id: I0eb14966ce816674d631bfef097d243a0445c83b
diff --git a/media/libaudiohal/impl/DeviceHalHidl.cpp b/media/libaudiohal/impl/DeviceHalHidl.cpp
index e8e1f46..478e0f0 100644
--- a/media/libaudiohal/impl/DeviceHalHidl.cpp
+++ b/media/libaudiohal/impl/DeviceHalHidl.cpp
@@ -236,7 +236,7 @@
}
status_t DeviceHalHidl::getInputBufferSize(
- const struct audio_config *config, size_t *size) {
+ struct audio_config *config, size_t *size) {
TIME_CHECK();
if (mDevice == 0) return NO_INIT;
AudioConfig hidlConfig;