am 373a0b5c: am dfea212b: am 070df444: am c0344a80: Merge "audio: add definitions for devices connected over IP" into mnc-dev
* commit '373a0b5c602c5826cc0ab6642446981ccb52883c': audio: add definitions for devices connected over IP
This commit is contained in:
@@ -14722,6 +14722,7 @@ package android.media {
|
||||
field public static final int TYPE_FM_TUNER = 16; // 0x10
|
||||
field public static final int TYPE_HDMI = 9; // 0x9
|
||||
field public static final int TYPE_HDMI_ARC = 10; // 0xa
|
||||
field public static final int TYPE_IP = 20; // 0x14
|
||||
field public static final int TYPE_LINE_ANALOG = 5; // 0x5
|
||||
field public static final int TYPE_LINE_DIGITAL = 6; // 0x6
|
||||
field public static final int TYPE_TELEPHONY = 18; // 0x12
|
||||
|
||||
@@ -15961,6 +15961,7 @@ package android.media {
|
||||
field public static final int TYPE_FM_TUNER = 16; // 0x10
|
||||
field public static final int TYPE_HDMI = 9; // 0x9
|
||||
field public static final int TYPE_HDMI_ARC = 10; // 0xa
|
||||
field public static final int TYPE_IP = 20; // 0x14
|
||||
field public static final int TYPE_LINE_ANALOG = 5; // 0x5
|
||||
field public static final int TYPE_LINE_DIGITAL = 6; // 0x6
|
||||
field public static final int TYPE_TELEPHONY = 18; // 0x12
|
||||
|
||||
@@ -105,6 +105,10 @@ public final class AudioDeviceInfo {
|
||||
* A device type describing the auxiliary line-level connectors.
|
||||
*/
|
||||
public static final int TYPE_AUX_LINE = 19;
|
||||
/**
|
||||
* A device type connected over IP.
|
||||
*/
|
||||
public static final int TYPE_IP = 20;
|
||||
|
||||
private final AudioDevicePort mPort;
|
||||
|
||||
@@ -250,6 +254,7 @@ public final class AudioDeviceInfo {
|
||||
INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPDIF, TYPE_LINE_DIGITAL);
|
||||
INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_FM, TYPE_FM);
|
||||
INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_AUX_LINE, TYPE_AUX_LINE);
|
||||
INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_IP, TYPE_IP);
|
||||
|
||||
INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BUILTIN_MIC, TYPE_BUILTIN_MIC);
|
||||
INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET, TYPE_BLUETOOTH_SCO);
|
||||
@@ -266,6 +271,7 @@ public final class AudioDeviceInfo {
|
||||
INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_LINE, TYPE_LINE_ANALOG);
|
||||
INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_SPDIF, TYPE_LINE_DIGITAL);
|
||||
INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLUETOOTH_A2DP, TYPE_BLUETOOTH_A2DP);
|
||||
INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_IP, TYPE_IP);
|
||||
|
||||
// not covered here, legacy
|
||||
//AudioSystem.DEVICE_OUT_REMOTE_SUBMIX
|
||||
@@ -292,6 +298,7 @@ public final class AudioDeviceInfo {
|
||||
EXT_TO_INT_DEVICE_MAPPING.put(TYPE_TV_TUNER, AudioSystem.DEVICE_IN_TV_TUNER);
|
||||
EXT_TO_INT_DEVICE_MAPPING.put(TYPE_TELEPHONY, AudioSystem.DEVICE_OUT_TELEPHONY_TX);
|
||||
EXT_TO_INT_DEVICE_MAPPING.put(TYPE_AUX_LINE, AudioSystem.DEVICE_OUT_AUX_LINE);
|
||||
EXT_TO_INT_DEVICE_MAPPING.put(TYPE_IP, AudioSystem.DEVICE_OUT_IP);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -317,6 +317,7 @@ public class AudioSystem
|
||||
public static final int DEVICE_OUT_FM = 0x100000;
|
||||
public static final int DEVICE_OUT_AUX_LINE = 0x200000;
|
||||
public static final int DEVICE_OUT_SPEAKER_SAFE = 0x400000;
|
||||
public static final int DEVICE_OUT_IP = 0x800000;
|
||||
|
||||
public static final int DEVICE_OUT_DEFAULT = DEVICE_BIT_DEFAULT;
|
||||
|
||||
@@ -343,6 +344,7 @@ public class AudioSystem
|
||||
DEVICE_OUT_FM |
|
||||
DEVICE_OUT_AUX_LINE |
|
||||
DEVICE_OUT_SPEAKER_SAFE |
|
||||
DEVICE_OUT_IP |
|
||||
DEVICE_OUT_DEFAULT);
|
||||
public static final int DEVICE_OUT_ALL_A2DP = (DEVICE_OUT_BLUETOOTH_A2DP |
|
||||
DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES |
|
||||
@@ -381,6 +383,7 @@ public class AudioSystem
|
||||
public static final int DEVICE_IN_SPDIF = DEVICE_BIT_IN | 0x10000;
|
||||
public static final int DEVICE_IN_BLUETOOTH_A2DP = DEVICE_BIT_IN | 0x20000;
|
||||
public static final int DEVICE_IN_LOOPBACK = DEVICE_BIT_IN | 0x40000;
|
||||
public static final int DEVICE_IN_IP = DEVICE_BIT_IN | 0x80000;
|
||||
public static final int DEVICE_IN_DEFAULT = DEVICE_BIT_IN | DEVICE_BIT_DEFAULT;
|
||||
|
||||
public static final int DEVICE_IN_ALL = (DEVICE_IN_COMMUNICATION |
|
||||
@@ -402,6 +405,7 @@ public class AudioSystem
|
||||
DEVICE_IN_SPDIF |
|
||||
DEVICE_IN_BLUETOOTH_A2DP |
|
||||
DEVICE_IN_LOOPBACK |
|
||||
DEVICE_IN_IP |
|
||||
DEVICE_IN_DEFAULT);
|
||||
public static final int DEVICE_IN_ALL_SCO = DEVICE_IN_BLUETOOTH_SCO_HEADSET;
|
||||
public static final int DEVICE_IN_ALL_USB = (DEVICE_IN_USB_ACCESSORY |
|
||||
@@ -436,6 +440,7 @@ public class AudioSystem
|
||||
public static final String DEVICE_OUT_FM_NAME = "fm_transmitter";
|
||||
public static final String DEVICE_OUT_AUX_LINE_NAME = "aux_line";
|
||||
public static final String DEVICE_OUT_SPEAKER_SAFE_NAME = "speaker_safe";
|
||||
public static final String DEVICE_OUT_IP_NAME = "ip";
|
||||
|
||||
public static final String DEVICE_IN_COMMUNICATION_NAME = "communication";
|
||||
public static final String DEVICE_IN_AMBIENT_NAME = "ambient";
|
||||
@@ -456,6 +461,7 @@ public class AudioSystem
|
||||
public static final String DEVICE_IN_SPDIF_NAME = "spdif";
|
||||
public static final String DEVICE_IN_BLUETOOTH_A2DP_NAME = "bt_a2dp";
|
||||
public static final String DEVICE_IN_LOOPBACK_NAME = "loopback";
|
||||
public static final String DEVICE_IN_IP_NAME = "ip";
|
||||
|
||||
public static String getOutputDeviceName(int device)
|
||||
{
|
||||
@@ -506,6 +512,8 @@ public class AudioSystem
|
||||
return DEVICE_OUT_AUX_LINE_NAME;
|
||||
case DEVICE_OUT_SPEAKER_SAFE:
|
||||
return DEVICE_OUT_SPEAKER_SAFE_NAME;
|
||||
case DEVICE_OUT_IP:
|
||||
return DEVICE_OUT_IP_NAME;
|
||||
case DEVICE_OUT_DEFAULT:
|
||||
default:
|
||||
return Integer.toString(device);
|
||||
@@ -553,6 +561,8 @@ public class AudioSystem
|
||||
return DEVICE_IN_BLUETOOTH_A2DP_NAME;
|
||||
case DEVICE_IN_LOOPBACK:
|
||||
return DEVICE_IN_LOOPBACK_NAME;
|
||||
case DEVICE_IN_IP:
|
||||
return DEVICE_IN_IP_NAME;
|
||||
case DEVICE_IN_DEFAULT:
|
||||
default:
|
||||
return Integer.toString(device);
|
||||
|
||||
Reference in New Issue
Block a user