audio: Add missing fields from APM XSD schema to structs
Since APM XML configuration is being replaced with data
provided by the HAL, add data fields used to be in the APM XSD
schema to HAL structures. Summary of changes:
- Audio*Flags enum types moved to HAL types because flags
are specified for mixPorts in the APM config;
- AudioGainSys.useForVolume -> AudioGain;
- added AudioPort.flags because they are specified in the
APM config for mixPorts; since AudioIoFlags is a union,
it will be used for determining the mix port role;
- added AudioPortMixExt.max{Open|Active}Count;
- added AudioPortMixExt.recommendedMuteDurationMs;
- AudioPortConfigSys.flags -> AudioPortConfig
this is for symmetry with AudioPort;
- added AudioPortDeviceExt which encapsulates device
and encodedFormats information for device ports.
Bug: 198812639
Test: atest audiofoundation_parcelable_test
Change-Id: Id5fd537b11e43e85b3caa93b2cb3bc7f482a3199
diff --git a/media/Android.bp b/media/Android.bp
index aa07c13..15b24b2 100644
--- a/media/Android.bp
+++ b/media/Android.bp
@@ -68,13 +68,17 @@
"aidl/android/media/audio/common/AudioGain.aidl",
"aidl/android/media/audio/common/AudioGainConfig.aidl",
"aidl/android/media/audio/common/AudioGainMode.aidl",
+ "aidl/android/media/audio/common/AudioInputFlags.aidl",
+ "aidl/android/media/audio/common/AudioIoFlags.aidl",
"aidl/android/media/audio/common/AudioMMapPolicy.aidl",
"aidl/android/media/audio/common/AudioMMapPolicyInfo.aidl",
"aidl/android/media/audio/common/AudioMMapPolicyType.aidl",
"aidl/android/media/audio/common/AudioMode.aidl",
"aidl/android/media/audio/common/AudioOffloadInfo.aidl",
+ "aidl/android/media/audio/common/AudioOutputFlags.aidl",
"aidl/android/media/audio/common/AudioPort.aidl",
"aidl/android/media/audio/common/AudioPortConfig.aidl",
+ "aidl/android/media/audio/common/AudioPortDeviceExt.aidl",
"aidl/android/media/audio/common/AudioPortExt.aidl",
"aidl/android/media/audio/common/AudioPortMixExt.aidl",
"aidl/android/media/audio/common/AudioPortMixExtUseCase.aidl",
diff --git a/media/aidl/android/media/audio/common/AudioGain.aidl b/media/aidl/android/media/audio/common/AudioGain.aidl
index 90fdeb6..dbfcd8c 100644
--- a/media/aidl/android/media/audio/common/AudioGain.aidl
+++ b/media/aidl/android/media/audio/common/AudioGain.aidl
@@ -43,4 +43,6 @@
int minRampMs;
/** Maximum ramp duration in milliseconds. */
int maxRampMs;
+ /** Indicates whether it is allowed to use this stage for volume control. */
+ boolean useForVolume;
}
diff --git a/media/aidl/android/media/audio/common/AudioInputFlags.aidl b/media/aidl/android/media/audio/common/AudioInputFlags.aidl
new file mode 100644
index 0000000..e4b6ec2
--- /dev/null
+++ b/media/aidl/android/media/audio/common/AudioInputFlags.aidl
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.common;
+
+/**
+ * Specifies options applicable to audio input. These can be functional
+ * requests or performance requests. These flags apply both to audio ports and
+ * audio streams. Flags specified for an audio stream are usually used to find
+ * the best matching audio port for it.
+ *
+ * {@hide}
+ */
+@VintfStability
+@Backing(type="int")
+enum AudioInputFlags {
+ /**
+ * Input is optimized for decreasing audio latency.
+ */
+ FAST = 0,
+ /**
+ * Input is for capturing "hotword" audio commands.
+ */
+ HW_HOTWORD = 1,
+ /**
+ * Input stream should only have minimal signal processing applied.
+ */
+ RAW = 2,
+ /**
+ * Input stream needs to be synchronized with an output stream.
+ */
+ SYNC = 3,
+ /**
+ * Input uses MMAP no IRQ mode--direct memory mapping with the hardware.
+ */
+ MMAP_NOIRQ = 4,
+ /**
+ * Input is used for receiving VoIP audio.
+ */
+ VOIP_TX = 5,
+ /**
+ * Input stream contains AV synchronization markers embedded.
+ */
+ HW_AV_SYNC = 6,
+ /**
+ * Input contains an encoded audio stream.
+ */
+ DIRECT = 7,
+}
diff --git a/media/aidl/android/media/audio/common/AudioIoFlags.aidl b/media/aidl/android/media/audio/common/AudioIoFlags.aidl
new file mode 100644
index 0000000..f978fb6
--- /dev/null
+++ b/media/aidl/android/media/audio/common/AudioIoFlags.aidl
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.common;
+
+/**
+ * Stores a bitmask of input or output flags.
+ *
+ * {@hide}
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+union AudioIoFlags {
+ /** Bitmask indexed by AudioInputFlags. */
+ int input;
+ /** Bitmask indexed by AudioOutputFlags. */
+ int output;
+}
diff --git a/media/aidl/android/media/audio/common/AudioOutputFlags.aidl b/media/aidl/android/media/audio/common/AudioOutputFlags.aidl
new file mode 100644
index 0000000..0505036
--- /dev/null
+++ b/media/aidl/android/media/audio/common/AudioOutputFlags.aidl
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.common;
+
+/**
+ * Specifies options applicable to audio output. These can be functional
+ * requests or performance requests. These flags apply both to audio ports and
+ * audio streams. Flags specified for an audio stream are usually used to find
+ * the best matching audio port for it.
+ *
+ * {@hide}
+ */
+@VintfStability
+@Backing(type="int")
+enum AudioOutputFlags {
+ /**
+ * Output must not be altered by the framework, it bypasses software mixers.
+ */
+ DIRECT = 0,
+ /**
+ * When used with audio ports, indicates the "main" (primary) port. This
+ * port is opened by default and receives routing, audio mode and volume
+ * controls related to voice calls.
+ */
+ PRIMARY = 1,
+ /**
+ * Output is optimized for decreasing audio latency.
+ */
+ FAST = 2,
+ /**
+ * Output is optimized for having the low power consumption.
+ */
+ DEEP_BUFFER = 3,
+ /**
+ * Output is compressed audio format, intended for hardware decoding.
+ */
+ COMPRESS_OFFLOAD = 4,
+ /**
+ * Write operations must return as fast as possible instead of
+ * being blocked until all provided data has been consumed.
+ */
+ NON_BLOCKING = 5,
+ /**
+ * Output stream contains AV synchronization markers embedded.
+ */
+ HW_AV_SYNC = 6,
+ /**
+ * Used to support ultrasonic communication with beacons.
+ * Note: "TTS" here means "Transmitted Through Speaker",
+ * not "Text-to-Speech".
+ */
+ TTS = 7,
+ /**
+ * Output stream should only have minimal signal processing applied.
+ */
+ RAW = 8,
+ /**
+ * Output stream needs to be synchronized with an input stream.
+ */
+ SYNC = 9,
+ /**
+ * Output stream is encoded according to IEC958.
+ */
+ IEC958_NONAUDIO = 10,
+ /**
+ * Output must not be altered by the framework and hardware.
+ */
+ DIRECT_PCM = 11,
+ /**
+ * Output uses MMAP no IRQ mode--direct memory mapping with the hardware.
+ */
+ MMAP_NOIRQ = 12,
+ /**
+ * Output is used for transmitting VoIP audio.
+ */
+ VOIP_RX = 13,
+ /**
+ * Output is used for music playback during telephony calls.
+ */
+ INCALL_MUSIC = 14,
+ /**
+ * The rendered must ignore any empty blocks between compressed audio
+ * tracks.
+ */
+ GAPLESS_OFFLOAD = 15,
+}
diff --git a/media/aidl/android/media/audio/common/AudioPort.aidl b/media/aidl/android/media/audio/common/AudioPort.aidl
index 19652bc..8e1c5af 100644
--- a/media/aidl/android/media/audio/common/AudioPort.aidl
+++ b/media/aidl/android/media/audio/common/AudioPort.aidl
@@ -17,6 +17,7 @@
package android.media.audio.common;
import android.media.audio.common.AudioGain;
+import android.media.audio.common.AudioIoFlags;
import android.media.audio.common.AudioPortConfig;
import android.media.audio.common.AudioPortExt;
import android.media.audio.common.AudioProfile;
@@ -45,6 +46,10 @@
*/
AudioProfile[] profiles;
/**
+ * I/O feature flags.
+ */
+ AudioIoFlags flags;
+ /**
* ExtraAudioDescriptors supported by this port. Used for formats not
* recognized by the platform. The audio capability is described by a
* hardware descriptor.
diff --git a/media/aidl/android/media/audio/common/AudioPortConfig.aidl b/media/aidl/android/media/audio/common/AudioPortConfig.aidl
index 44850f4..e3a9374 100644
--- a/media/aidl/android/media/audio/common/AudioPortConfig.aidl
+++ b/media/aidl/android/media/audio/common/AudioPortConfig.aidl
@@ -19,6 +19,7 @@
import android.media.audio.common.AudioChannelLayout;
import android.media.audio.common.AudioFormatDescription;
import android.media.audio.common.AudioGainConfig;
+import android.media.audio.common.AudioIoFlags;
import android.media.audio.common.AudioPortExt;
import android.media.audio.common.Int;
@@ -44,6 +45,8 @@
@nullable AudioFormatDescription format;
/** Gain to apply. Can be left unspecified. */
@nullable AudioGainConfig gain;
+ /** I/O feature flags. Can be left unspecified. */
+ @nullable AudioIoFlags flags;
/** Extra parameters depending on the port role. */
AudioPortExt ext;
}
diff --git a/media/aidl/android/media/audio/common/AudioPortDeviceExt.aidl b/media/aidl/android/media/audio/common/AudioPortDeviceExt.aidl
new file mode 100644
index 0000000..940566c
--- /dev/null
+++ b/media/aidl/android/media/audio/common/AudioPortDeviceExt.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.common;
+
+import android.media.audio.common.AudioDevice;
+import android.media.audio.common.AudioFormatDescription;
+
+/**
+ * Extra parameters which are specified when the audio port is in the device role.
+ *
+ * {@hide}
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable AudioPortDeviceExt {
+ /** Audio device specification. */
+ AudioDevice device;
+ /**
+ * List of supported encoded formats. Specified for ports that perform
+ * hardware-accelerated decoding or transcoding, or connected to external
+ * hardware.
+ */
+ AudioFormatDescription[] encodedFormats;
+}
diff --git a/media/aidl/android/media/audio/common/AudioPortExt.aidl b/media/aidl/android/media/audio/common/AudioPortExt.aidl
index 9b60c57..c4681cb 100644
--- a/media/aidl/android/media/audio/common/AudioPortExt.aidl
+++ b/media/aidl/android/media/audio/common/AudioPortExt.aidl
@@ -16,7 +16,7 @@
package android.media.audio.common;
-import android.media.audio.common.AudioDevice;
+import android.media.audio.common.AudioPortDeviceExt;
import android.media.audio.common.AudioPortMixExt;
/**
@@ -30,9 +30,9 @@
union AudioPortExt {
/** Represents an empty union. Value is ignored. */
boolean unspecified;
- /** Audio device specification. */
- AudioDevice device;
- /** Mix specific info. */
+ /** Information specific to device ports. */
+ AudioPortDeviceExt device;
+ /** Information specific to mix ports. */
AudioPortMixExt mix;
/** Audio session identifier. */
int session;
diff --git a/media/aidl/android/media/audio/common/AudioPortMixExt.aidl b/media/aidl/android/media/audio/common/AudioPortMixExt.aidl
index 54c5d8b..f3613a4 100644
--- a/media/aidl/android/media/audio/common/AudioPortMixExt.aidl
+++ b/media/aidl/android/media/audio/common/AudioPortMixExt.aidl
@@ -30,4 +30,16 @@
int handle;
/** Parameters specific to the mix use case. */
AudioPortMixExtUseCase usecase;
+ /**
+ * Maximum number of input or output streams that can be simultaneously
+ * opened for this port.
+ */
+ int maxOpenStreamCount;
+ /**
+ * Maximum number of input or output streams that can be simultaneously
+ * active for this port.
+ */
+ int maxActiveStreamCount;
+ /** Mute duration while changing device, when used for output. */
+ int recommendedMuteDurationMs;
}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioGain.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioGain.aidl
index 71891eb..adc5b672 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioGain.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioGain.aidl
@@ -43,4 +43,5 @@
int stepValue;
int minRampMs;
int maxRampMs;
+ boolean useForVolume;
}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioInputFlags.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioInputFlags.aidl
new file mode 100644
index 0000000..8a5dae0
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioInputFlags.aidl
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.media.audio.common;
+/* @hide */
+@Backing(type="int") @VintfStability
+enum AudioInputFlags {
+ FAST = 0,
+ HW_HOTWORD = 1,
+ RAW = 2,
+ SYNC = 3,
+ MMAP_NOIRQ = 4,
+ VOIP_TX = 5,
+ HW_AV_SYNC = 6,
+ DIRECT = 7,
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioIoFlags.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioIoFlags.aidl
new file mode 100644
index 0000000..4a46725
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioIoFlags.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.media.audio.common;
+/* @hide */
+@JavaDerive(equals=true, toString=true) @VintfStability
+union AudioIoFlags {
+ int input;
+ int output;
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioOutputFlags.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioOutputFlags.aidl
new file mode 100644
index 0000000..ed16d17
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioOutputFlags.aidl
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.media.audio.common;
+/* @hide */
+@Backing(type="int") @VintfStability
+enum AudioOutputFlags {
+ DIRECT = 0,
+ PRIMARY = 1,
+ FAST = 2,
+ DEEP_BUFFER = 3,
+ COMPRESS_OFFLOAD = 4,
+ NON_BLOCKING = 5,
+ HW_AV_SYNC = 6,
+ TTS = 7,
+ RAW = 8,
+ SYNC = 9,
+ IEC958_NONAUDIO = 10,
+ DIRECT_PCM = 11,
+ MMAP_NOIRQ = 12,
+ VOIP_RX = 13,
+ INCALL_MUSIC = 14,
+ GAPLESS_OFFLOAD = 15,
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPort.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPort.aidl
index ceb3774..8f563b3 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPort.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPort.aidl
@@ -38,6 +38,7 @@
int id;
@utf8InCpp String name;
android.media.audio.common.AudioProfile[] profiles;
+ android.media.audio.common.AudioIoFlags flags;
android.media.audio.common.ExtraAudioDescriptor[] extraAudioDescriptors;
android.media.audio.common.AudioGain[] gains;
android.media.audio.common.AudioPortConfig activeConfig;
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortConfig.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortConfig.aidl
index fcc5458..78967b4 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortConfig.aidl
@@ -40,5 +40,6 @@
@nullable android.media.audio.common.AudioChannelLayout channelMask;
@nullable android.media.audio.common.AudioFormatDescription format;
@nullable android.media.audio.common.AudioGainConfig gain;
+ @nullable android.media.audio.common.AudioIoFlags flags;
android.media.audio.common.AudioPortExt ext;
}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortDeviceExt.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortDeviceExt.aidl
new file mode 100644
index 0000000..2e8124a
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortDeviceExt.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.media.audio.common;
+/* @hide */
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioPortDeviceExt {
+ android.media.audio.common.AudioDevice device;
+ android.media.audio.common.AudioFormatDescription[] encodedFormats;
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortExt.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortExt.aidl
index 241e4e6..af9d9c4 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortExt.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortExt.aidl
@@ -36,7 +36,7 @@
@JavaDerive(equals=true, toString=true) @VintfStability
union AudioPortExt {
boolean unspecified;
- android.media.audio.common.AudioDevice device;
+ android.media.audio.common.AudioPortDeviceExt device;
android.media.audio.common.AudioPortMixExt mix;
int session;
}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortMixExt.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortMixExt.aidl
index 547396c..5b74c0d 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortMixExt.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortMixExt.aidl
@@ -37,4 +37,7 @@
parcelable AudioPortMixExt {
int handle;
android.media.audio.common.AudioPortMixExtUseCase usecase;
+ int maxOpenStreamCount;
+ int maxActiveStreamCount;
+ int recommendedMuteDurationMs;
}