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/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index a1fb304..1e1db31 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1876,10 +1876,10 @@
void AudioFlinger::ioConfigChanged(audio_io_config_event_t event,
const sp<AudioIoDescriptor>& ioDesc,
pid_t pid) {
- media::AudioIoConfigEvent eventAidl = VALUE_OR_FATAL(
- legacy2aidl_audio_io_config_event_t_AudioIoConfigEvent(event));
media::AudioIoDescriptor descAidl = VALUE_OR_FATAL(
legacy2aidl_AudioIoDescriptor_AudioIoDescriptor(ioDesc));
+ media::AudioIoConfigEvent eventAidl = VALUE_OR_FATAL(
+ legacy2aidl_audio_io_config_event_t_AudioIoConfigEvent(event));
Mutex::Autolock _l(mClientLock);
size_t size = mNotificationClients.size();
@@ -2610,9 +2610,9 @@
audio_module_handle_t module = VALUE_OR_RETURN_STATUS(
aidl2legacy_int32_t_audio_module_handle_t(request.module));
audio_config_t halConfig = VALUE_OR_RETURN_STATUS(
- aidl2legacy_AudioConfig_audio_config_t(request.halConfig, false /*isInput*/));
+ aidl2legacy_AudioConfig_audio_config_t(request.halConfig));
audio_config_base_t mixerConfig = VALUE_OR_RETURN_STATUS(
- aidl2legacy_AudioConfigBase_audio_config_base_t(request.mixerConfig, false/*isInput*/));
+ aidl2legacy_AudioConfigBase_audio_config_base_t(request.mixerConfig));
sp<DeviceDescriptorBase> device = VALUE_OR_RETURN_STATUS(
aidl2legacy_DeviceDescriptorBase(request.device));
audio_output_flags_t flags = VALUE_OR_RETURN_STATUS(
@@ -2665,8 +2665,8 @@
mmapThread->ioConfigChanged(AUDIO_OUTPUT_OPENED);
}
response->output = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_io_handle_t_int32_t(output));
- response->config = VALUE_OR_RETURN_STATUS(
- legacy2aidl_audio_config_t_AudioConfig(halConfig, false /*isInput*/));
+ response->config =
+ VALUE_OR_RETURN_STATUS(legacy2aidl_audio_config_t_AudioConfig(halConfig));
response->latencyMs = VALUE_OR_RETURN_STATUS(convertIntegral<int32_t>(latencyMs));
response->flags = VALUE_OR_RETURN_STATUS(
legacy2aidl_audio_output_flags_t_int32_t_mask(flags));
@@ -2834,7 +2834,7 @@
audio_io_handle_t input = VALUE_OR_RETURN_STATUS(
aidl2legacy_int32_t_audio_io_handle_t(request.input));
audio_config_t config = VALUE_OR_RETURN_STATUS(
- aidl2legacy_AudioConfig_audio_config_t(request.config, true /*isInput*/));
+ aidl2legacy_AudioConfig_audio_config_t(request.config));
sp<ThreadBase> thread = openInput_l(
VALUE_OR_RETURN_STATUS(aidl2legacy_int32_t_audio_module_handle_t(request.module)),
@@ -2848,8 +2848,7 @@
String8{});
response->input = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_io_handle_t_int32_t(input));
- response->config = VALUE_OR_RETURN_STATUS(
- legacy2aidl_audio_config_t_AudioConfig(config, true /*isInput*/));
+ response->config = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_config_t_AudioConfig(config));
response->device = request.device;
if (thread != 0) {