Revert "Switch the framework AIDL to use AudioChannelLayout"
Revert submission 15379650
Reason for revert: Android Auto regression b/194987848
Reverted Changes:
Ie59cdd64f:Switch the framework AIDL to use AudioChannelLayou...
I35e5c83bc:Refactor AudioIoDescriptor
Change-Id: I7ecd9cfa86254d6736662ae752a7f4ef070f9aea
diff --git a/services/audiopolicy/service/AudioPolicyClientImpl.cpp b/services/audiopolicy/service/AudioPolicyClientImpl.cpp
index c8db45b..79252d4 100644
--- a/services/audiopolicy/service/AudioPolicyClientImpl.cpp
+++ b/services/audiopolicy/service/AudioPolicyClientImpl.cpp
@@ -56,18 +56,17 @@
media::OpenOutputResponse response;
request.module = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_module_handle_t_int32_t(module));
- request.halConfig = VALUE_OR_RETURN_STATUS(
- legacy2aidl_audio_config_t_AudioConfig(*halConfig, false /*isInput*/));
- request.mixerConfig = VALUE_OR_RETURN_STATUS(
- legacy2aidl_audio_config_base_t_AudioConfigBase(*mixerConfig, false /*isInput*/));
+ request.halConfig = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_config_t_AudioConfig(*halConfig));
+ request.mixerConfig =
+ VALUE_OR_RETURN_STATUS(legacy2aidl_audio_config_base_t_AudioConfigBase(*mixerConfig));
request.device = VALUE_OR_RETURN_STATUS(legacy2aidl_DeviceDescriptorBase(device));
request.flags = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_output_flags_t_int32_t_mask(flags));
status_t status = af->openOutput(request, &response);
if (status == OK) {
*output = VALUE_OR_RETURN_STATUS(aidl2legacy_int32_t_audio_io_handle_t(response.output));
- *halConfig = VALUE_OR_RETURN_STATUS(
- aidl2legacy_AudioConfig_audio_config_t(response.config, false /*isInput*/));
+ *halConfig =
+ VALUE_OR_RETURN_STATUS(aidl2legacy_AudioConfig_audio_config_t(response.config));
*latencyMs = VALUE_OR_RETURN_STATUS(convertIntegral<uint32_t>(response.latencyMs));
}
return status;
@@ -136,8 +135,7 @@
media::OpenInputRequest request;
request.module = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_module_handle_t_int32_t(module));
request.input = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_io_handle_t_int32_t(*input));
- request.config = VALUE_OR_RETURN_STATUS(
- legacy2aidl_audio_config_t_AudioConfig(*config, true /*isInput*/));
+ request.config = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_config_t_AudioConfig(*config));
request.device = VALUE_OR_RETURN_STATUS(legacy2aidl_AudioDeviceTypeAddress(deviceTypeAddr));
request.source = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_source_t_AudioSourceType(source));
request.flags = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_input_flags_t_int32_t_mask(flags));