summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-07 00:22:46 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-07 00:22:46 +0000
commit26f5254e30df154394329555e88abb03027375da (patch)
tree4afeb3f16944f7e54fe4f7f6f699b74cf31176d1
parent27c1e82d11bccf90202ce34711458c39683ff493 (diff)
parentd28818f6907eed882b492c0e6c37d76d67d22972 (diff)
downloadinterfaces-android14-qpr2-release.tar.gz
Change-Id: Iaea3089a50f865f3f409f4bcd124cd39efd29524
-rw-r--r--media/aidl/android/media/audio/common/AudioDeviceDescription.aidl3
-rw-r--r--media/aidl/android/media/audio/common/AudioDeviceType.aidl19
-rw-r--r--media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceDescription.aidl3
-rw-r--r--media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceType.aidl2
4 files changed, 27 insertions, 0 deletions
diff --git a/media/aidl/android/media/audio/common/AudioDeviceDescription.aidl b/media/aidl/android/media/audio/common/AudioDeviceDescription.aidl
index ac89ffc..002914f 100644
--- a/media/aidl/android/media/audio/common/AudioDeviceDescription.aidl
+++ b/media/aidl/android/media/audio/common/AudioDeviceDescription.aidl
@@ -68,6 +68,9 @@ parcelable AudioDeviceDescription {
*/
const @utf8InCpp String CONNECTION_BT_SCO = "bt-sco";
/**
+ * @deprecated Bus devices are attached, and must be represented using
+ * `{IN|OUT}_BUS` type + empty connection.
+ *
* Bus connection. Mostly used in automotive scenarios.
*/
const @utf8InCpp String CONNECTION_BUS = "bus";
diff --git a/media/aidl/android/media/audio/common/AudioDeviceType.aidl b/media/aidl/android/media/audio/common/AudioDeviceType.aidl
index 43b32d6..5a75da7 100644
--- a/media/aidl/android/media/audio/common/AudioDeviceType.aidl
+++ b/media/aidl/android/media/audio/common/AudioDeviceType.aidl
@@ -100,6 +100,19 @@ enum AudioDeviceType {
*/
IN_DOCK = 14,
/**
+ * An alias for "bus" devices. Must have an empty connection type.
+ *
+ * Note: Since bus devices are non-removable, they need to be represented by
+ * a dedicated type with an empty connection type. However, there has been a
+ * historic accident of defining them as an `{IN|OUT}_DEVICE` type with
+ * `CONNECTION_BUS`. It was fixed by reserving the pair of `{IN|OUT}_DEVICE`
+ * type + empty connection for bus devices. This alias is added for clarity.
+ *
+ * Important: since `{IN|OUT}_BUS` is an alias, always check the connection
+ * type, it must be empty.
+ */
+ IN_BUS = IN_DEVICE,
+ /**
* The "default" device is used when the client does not have any
* preference for a particular device.
*/
@@ -173,4 +186,10 @@ enum AudioDeviceType {
* Output to a broadcast group.
*/
OUT_BROADCAST = 146,
+ /**
+ * An alias for "bus" devices. Must have an empty connection type.
+ *
+ * See the note on `IN_BUS` for details.
+ */
+ OUT_BUS = OUT_DEVICE,
}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceDescription.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceDescription.aidl
index a17f46d..d1bcfed 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceDescription.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceDescription.aidl
@@ -41,6 +41,9 @@ parcelable AudioDeviceDescription {
const @utf8InCpp String CONNECTION_BT_A2DP = "bt-a2dp";
const @utf8InCpp String CONNECTION_BT_LE = "bt-le";
const @utf8InCpp String CONNECTION_BT_SCO = "bt-sco";
+ /**
+ * @deprecated Bus devices are attached, and must be represented using `{IN|OUT}_BUS` type + empty connection. Bus connection. Mostly used in automotive scenarios.
+ */
const @utf8InCpp String CONNECTION_BUS = "bus";
const @utf8InCpp String CONNECTION_HDMI = "hdmi";
const @utf8InCpp String CONNECTION_HDMI_ARC = "hdmi-arc";
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceType.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceType.aidl
index 2617dfa..f7d1b77 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceType.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceType.aidl
@@ -50,6 +50,7 @@ enum AudioDeviceType {
IN_TELEPHONY_RX = 12,
IN_TV_TUNER = 13,
IN_DOCK = 14,
+ IN_BUS = IN_DEVICE /* 4 */,
OUT_DEFAULT = 129,
OUT_ACCESSORY = 130,
OUT_AFE_PROXY = 131,
@@ -68,4 +69,5 @@ enum AudioDeviceType {
OUT_TELEPHONY_TX = 144,
OUT_DOCK = 145,
OUT_BROADCAST = 146,
+ OUT_BUS = OUT_DEVICE /* 133 */,
}