Skip to content
Snippets Groups Projects
Commit 8cebf069 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

Updates to AudioDevice

1. Align the syntax for vendor extensions with HAL V7.
2. Remove "analog/digital dock" connection types, instead
   use a "dock" in/out device.

Bug: 198812639
Test: m
Change-Id: I288999896ba7ab352510167c5d0b0a53723689c9
parent 12f6d7d9
No related branches found
No related tags found
No related merge requests found
......@@ -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";
}
......@@ -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,
}
......@@ -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";
......
......@@ -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,
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment