Merge "New constant for BUS audio devices" into nyc-dev
am: 7e2127a970
* commit '7e2127a9700727660794b949f3daaf039501fa1b':
New constant for BUS audio devices
This commit is contained in:
@@ -19693,6 +19693,7 @@ package android.media {
|
||||
field public static final int TYPE_BUILTIN_EARPIECE = 1; // 0x1
|
||||
field public static final int TYPE_BUILTIN_MIC = 15; // 0xf
|
||||
field public static final int TYPE_BUILTIN_SPEAKER = 2; // 0x2
|
||||
field public static final int TYPE_BUS = 21; // 0x15
|
||||
field public static final int TYPE_DOCK = 13; // 0xd
|
||||
field public static final int TYPE_FM = 14; // 0xe
|
||||
field public static final int TYPE_FM_TUNER = 16; // 0x10
|
||||
|
||||
@@ -21177,6 +21177,7 @@ package android.media {
|
||||
field public static final int TYPE_BUILTIN_EARPIECE = 1; // 0x1
|
||||
field public static final int TYPE_BUILTIN_MIC = 15; // 0xf
|
||||
field public static final int TYPE_BUILTIN_SPEAKER = 2; // 0x2
|
||||
field public static final int TYPE_BUS = 21; // 0x15
|
||||
field public static final int TYPE_DOCK = 13; // 0xd
|
||||
field public static final int TYPE_FM = 14; // 0xe
|
||||
field public static final int TYPE_FM_TUNER = 16; // 0x10
|
||||
|
||||
@@ -19702,6 +19702,7 @@ package android.media {
|
||||
field public static final int TYPE_BUILTIN_EARPIECE = 1; // 0x1
|
||||
field public static final int TYPE_BUILTIN_MIC = 15; // 0xf
|
||||
field public static final int TYPE_BUILTIN_SPEAKER = 2; // 0x2
|
||||
field public static final int TYPE_BUS = 21; // 0x15
|
||||
field public static final int TYPE_DOCK = 13; // 0xd
|
||||
field public static final int TYPE_FM = 14; // 0xe
|
||||
field public static final int TYPE_FM_TUNER = 16; // 0x10
|
||||
|
||||
@@ -111,6 +111,10 @@ public final class AudioDeviceInfo {
|
||||
* A device type connected over IP.
|
||||
*/
|
||||
public static final int TYPE_IP = 20;
|
||||
/**
|
||||
* A type-agnostic device used for communication with external audio systems
|
||||
*/
|
||||
public static final int TYPE_BUS = 21;
|
||||
|
||||
private final AudioDevicePort mPort;
|
||||
|
||||
@@ -279,6 +283,7 @@ public final class AudioDeviceInfo {
|
||||
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_OUT_BUS, TYPE_BUS);
|
||||
|
||||
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);
|
||||
@@ -296,6 +301,7 @@ public final class AudioDeviceInfo {
|
||||
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);
|
||||
INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BUS, TYPE_BUS);
|
||||
|
||||
// not covered here, legacy
|
||||
//AudioSystem.DEVICE_OUT_REMOTE_SUBMIX
|
||||
@@ -323,6 +329,7 @@ public final class AudioDeviceInfo {
|
||||
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);
|
||||
EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUS, AudioSystem.DEVICE_OUT_BUS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -346,6 +346,7 @@ public class AudioSystem
|
||||
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_BUS = 0x1000000;
|
||||
|
||||
public static final int DEVICE_OUT_DEFAULT = DEVICE_BIT_DEFAULT;
|
||||
|
||||
@@ -373,6 +374,7 @@ public class AudioSystem
|
||||
DEVICE_OUT_AUX_LINE |
|
||||
DEVICE_OUT_SPEAKER_SAFE |
|
||||
DEVICE_OUT_IP |
|
||||
DEVICE_OUT_BUS |
|
||||
DEVICE_OUT_DEFAULT);
|
||||
public static final int DEVICE_OUT_ALL_A2DP = (DEVICE_OUT_BLUETOOTH_A2DP |
|
||||
DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES |
|
||||
@@ -412,6 +414,7 @@ public class AudioSystem
|
||||
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_BUS = DEVICE_BIT_IN | 0x100000;
|
||||
public static final int DEVICE_IN_DEFAULT = DEVICE_BIT_IN | DEVICE_BIT_DEFAULT;
|
||||
|
||||
public static final int DEVICE_IN_ALL = (DEVICE_IN_COMMUNICATION |
|
||||
@@ -434,6 +437,7 @@ public class AudioSystem
|
||||
DEVICE_IN_BLUETOOTH_A2DP |
|
||||
DEVICE_IN_LOOPBACK |
|
||||
DEVICE_IN_IP |
|
||||
DEVICE_IN_BUS |
|
||||
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 |
|
||||
@@ -469,6 +473,7 @@ public class AudioSystem
|
||||
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_OUT_BUS_NAME = "bus";
|
||||
|
||||
public static final String DEVICE_IN_COMMUNICATION_NAME = "communication";
|
||||
public static final String DEVICE_IN_AMBIENT_NAME = "ambient";
|
||||
@@ -490,6 +495,7 @@ public class AudioSystem
|
||||
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 final String DEVICE_IN_BUS_NAME = "bus";
|
||||
|
||||
public static String getOutputDeviceName(int device)
|
||||
{
|
||||
@@ -542,6 +548,8 @@ public class AudioSystem
|
||||
return DEVICE_OUT_SPEAKER_SAFE_NAME;
|
||||
case DEVICE_OUT_IP:
|
||||
return DEVICE_OUT_IP_NAME;
|
||||
case DEVICE_OUT_BUS:
|
||||
return DEVICE_OUT_BUS_NAME;
|
||||
case DEVICE_OUT_DEFAULT:
|
||||
default:
|
||||
return Integer.toString(device);
|
||||
@@ -591,6 +599,8 @@ public class AudioSystem
|
||||
return DEVICE_IN_LOOPBACK_NAME;
|
||||
case DEVICE_IN_IP:
|
||||
return DEVICE_IN_IP_NAME;
|
||||
case DEVICE_IN_BUS:
|
||||
return DEVICE_IN_BUS_NAME;
|
||||
case DEVICE_IN_DEFAULT:
|
||||
default:
|
||||
return Integer.toString(device);
|
||||
|
||||
Reference in New Issue
Block a user