Merge "Updates to AudioDevice"

This commit is contained in:
TreeHugger Robot
2021-09-22 17:21:43 +00:00
committed by Android (Google) Code Review
4 changed files with 17 additions and 13 deletions

View File

@@ -39,7 +39,8 @@ parcelable AudioDeviceDescription {
* Usually it's some kind of a communication protocol, e.g. Bluetooth SCO or
* USB. There is a list of connection types recognized by the framework,
* defined using 'CONNECTION_' constants. Vendors can add their own
* connection types with "vx.<vendor>." prefix.
* connection types with "VX_<vendor>_" prefix, where the "vendor" part
* must consist of at least 3 letters or numbers.
*
* When the 'connection' field is left empty and 'type != NONE | DEFAULT',
* it is assumed that the device is permanently attached to the audio
@@ -50,13 +51,10 @@ parcelable AudioDeviceDescription {
*/
@utf8InCpp String connection;
/**
* Analog connection, for example, via 3.5 mm analog jack.
* Analog connection, for example, via 3.5 mm analog jack,
* or a low-end (analog) desk dock.
*/
const @utf8InCpp String CONNECTION_ANALOG = "analog";
/**
* Low-End (Analog) Desk Dock.
*/
const @utf8InCpp String CONNECTION_ANALOG_DOCK = "analog-dock";
/**
* Bluetooth A2DP connection.
*/
@@ -73,10 +71,6 @@ parcelable AudioDeviceDescription {
* Bus connection. Mostly used in automotive scenarios.
*/
const @utf8InCpp String CONNECTION_BUS = "bus";
/**
* High-End (Digital) Desk Dock.
*/
const @utf8InCpp String CONNECTION_DIGITAL_DOCK = "digital-dock";
/**
* HDMI connection.
*/
@@ -102,7 +96,7 @@ parcelable AudioDeviceDescription {
*/
const @utf8InCpp String CONNECTION_WIRELESS = "wireless";
/**
* USB connection.
* USB connection. The Android device is the USB Host.
*/
const @utf8InCpp String CONNECTION_USB = "usb";
}

View File

@@ -47,6 +47,7 @@ enum AudioDeviceType {
IN_DEFAULT = 1,
/**
* A device implementing Android Open Accessory protocol.
* Note: AOAv2 audio support has been deprecated in Android 8.0.
*/
IN_ACCESSORY = 2,
/**
@@ -93,6 +94,10 @@ enum AudioDeviceType {
* TV Tuner audio input.
*/
IN_TV_TUNER = 13,
/**
* Input from a phone / table dock.
*/
IN_DOCK = 14,
/**
* The "default" device is used when the client does not have any
* preference for a particular device.
@@ -100,6 +105,7 @@ enum AudioDeviceType {
OUT_DEFAULT = 129,
/**
* A device implementing Android Open Accessory protocol.
* Note: AOAv2 audio support has been deprecated in Android 8.0.
*/
OUT_ACCESSORY = 130,
/**
@@ -158,4 +164,8 @@ enum AudioDeviceType {
* Output into a telephone line.
*/
OUT_TELEPHONY_TX = 144,
/**
* Output into a speaker of a phone / table dock.
*/
OUT_DOCK = 145,
}

View File

@@ -38,12 +38,10 @@ parcelable AudioDeviceDescription {
android.media.audio.common.AudioDeviceType type = android.media.audio.common.AudioDeviceType.NONE;
@utf8InCpp String connection;
const @utf8InCpp String CONNECTION_ANALOG = "analog";
const @utf8InCpp String CONNECTION_ANALOG_DOCK = "analog-dock";
const @utf8InCpp String CONNECTION_BT_A2DP = "bt-a2dp";
const @utf8InCpp String CONNECTION_BT_LE = "bt-le";
const @utf8InCpp String CONNECTION_BT_SCO = "bt-sco";
const @utf8InCpp String CONNECTION_BUS = "bus";
const @utf8InCpp String CONNECTION_DIGITAL_DOCK = "digital-dock";
const @utf8InCpp String CONNECTION_HDMI = "hdmi";
const @utf8InCpp String CONNECTION_HDMI_ARC = "hdmi-arc";
const @utf8InCpp String CONNECTION_HDMI_EARC = "hdmi-earc";

View File

@@ -49,6 +49,7 @@ enum AudioDeviceType {
IN_SUBMIX = 11,
IN_TELEPHONY_RX = 12,
IN_TV_TUNER = 13,
IN_DOCK = 14,
OUT_DEFAULT = 129,
OUT_ACCESSORY = 130,
OUT_AFE_PROXY = 131,
@@ -65,4 +66,5 @@ enum AudioDeviceType {
OUT_SPEAKER_SAFE = 142,
OUT_SUBMIX = 143,
OUT_TELEPHONY_TX = 144,
OUT_DOCK = 145,
}