1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.media; 18 19 import android.Manifest; 20 import android.annotation.IntDef; 21 import android.annotation.NonNull; 22 import android.annotation.RequiresPermission; 23 import android.annotation.TestApi; 24 import android.util.SparseIntArray; 25 26 import java.lang.annotation.Retention; 27 import java.lang.annotation.RetentionPolicy; 28 import java.util.List; 29 import java.util.Objects; 30 import java.util.TreeSet; 31 32 /** 33 * Provides information about an audio device. 34 */ 35 public final class AudioDeviceInfo { 36 37 /** 38 * A device type associated with an unknown or uninitialized device. 39 */ 40 public static final int TYPE_UNKNOWN = 0; 41 /** 42 * A device type describing the attached earphone speaker. 43 */ 44 public static final int TYPE_BUILTIN_EARPIECE = 1; 45 /** 46 * A device type describing the speaker system (i.e. a mono speaker or stereo speakers) built 47 * in a device. 48 */ 49 public static final int TYPE_BUILTIN_SPEAKER = 2; 50 /** 51 * A device type describing a headset, which is the combination of a headphones and microphone. 52 */ 53 public static final int TYPE_WIRED_HEADSET = 3; 54 /** 55 * A device type describing a pair of wired headphones. 56 */ 57 public static final int TYPE_WIRED_HEADPHONES = 4; 58 /** 59 * A device type describing an analog line-level connection. 60 */ 61 public static final int TYPE_LINE_ANALOG = 5; 62 /** 63 * A device type describing a digital line connection (e.g. SPDIF). 64 */ 65 public static final int TYPE_LINE_DIGITAL = 6; 66 /** 67 * A device type describing a Bluetooth device typically used for telephony. 68 */ 69 public static final int TYPE_BLUETOOTH_SCO = 7; 70 /** 71 * A device type describing a Bluetooth device supporting the A2DP profile. 72 */ 73 public static final int TYPE_BLUETOOTH_A2DP = 8; 74 /** 75 * A device type describing an HDMI connection . 76 */ 77 public static final int TYPE_HDMI = 9; 78 /** 79 * A device type describing the Audio Return Channel of an HDMI connection. 80 */ 81 public static final int TYPE_HDMI_ARC = 10; 82 /** 83 * A device type describing a USB audio device. 84 */ 85 public static final int TYPE_USB_DEVICE = 11; 86 /** 87 * A device type describing a USB audio device in accessory mode. 88 */ 89 public static final int TYPE_USB_ACCESSORY = 12; 90 /** 91 * A device type describing the audio device associated with a dock. 92 */ 93 public static final int TYPE_DOCK = 13; 94 /** 95 * A device type associated with the transmission of audio signals over FM. 96 */ 97 public static final int TYPE_FM = 14; 98 /** 99 * A device type describing the microphone(s) built in a device. 100 */ 101 public static final int TYPE_BUILTIN_MIC = 15; 102 /** 103 * A device type for accessing the audio content transmitted over FM. 104 */ 105 public static final int TYPE_FM_TUNER = 16; 106 /** 107 * A device type for accessing the audio content transmitted over the TV tuner system. 108 */ 109 public static final int TYPE_TV_TUNER = 17; 110 /** 111 * A device type describing the transmission of audio signals over the telephony network. 112 */ 113 public static final int TYPE_TELEPHONY = 18; 114 /** 115 * A device type describing the auxiliary line-level connectors. 116 */ 117 public static final int TYPE_AUX_LINE = 19; 118 /** 119 * A device type connected over IP. 120 */ 121 public static final int TYPE_IP = 20; 122 /** 123 * A type-agnostic device used for communication with external audio systems 124 */ 125 public static final int TYPE_BUS = 21; 126 /** 127 * A device type describing a USB audio headset. 128 */ 129 public static final int TYPE_USB_HEADSET = 22; 130 /** 131 * A device type describing a Hearing Aid. 132 */ 133 public static final int TYPE_HEARING_AID = 23; 134 /** 135 * A device type describing the speaker system (i.e. a mono speaker or stereo speakers) built 136 * in a device, that is specifically tuned for outputting sounds like notifications and alarms 137 * (i.e. sounds the user couldn't necessarily anticipate). 138 * <p>Note that this physical audio device may be the same as {@link #TYPE_BUILTIN_SPEAKER} 139 * but is driven differently to safely accommodate the different use case.</p> 140 */ 141 public static final int TYPE_BUILTIN_SPEAKER_SAFE = 24; 142 /** 143 * A device type for rerouting audio within the Android framework between mixes and 144 * system applications. 145 * This type is for instance encountered when querying the output device of a track 146 * (with {@link AudioTrack#getRoutedDevice()} playing from a device in screen mirroring mode, 147 * where the audio is not heard on the device, but on the remote device. 148 */ 149 // Typically created when using 150 // {@link android.media.audiopolicy.AudioPolicy} for mixes created with the 151 // {@link android.media.audiopolicy.AudioMix#ROUTE_FLAG_LOOP_BACK} flag. 152 public static final int TYPE_REMOTE_SUBMIX = 25; 153 154 /** 155 * A device type describing a Bluetooth Low Energy (BLE) audio headset or headphones. 156 * Headphones are grouped with headsets when the device is a sink: 157 * the features of headsets and headphones with regard to playback are the same. 158 */ 159 public static final int TYPE_BLE_HEADSET = 26; 160 161 /** 162 * A device type describing a Bluetooth Low Energy (BLE) audio speaker. 163 */ 164 public static final int TYPE_BLE_SPEAKER = 27; 165 166 /** 167 * A device type describing an Echo Canceller loopback Reference. 168 * This device is only used when capturing with MediaRecorder.AudioSource.ECHO_REFERENCE, 169 * which requires privileged permission 170 * {@link android.Manifest.permission#CAPTURE_AUDIO_OUTPUT}. 171 * @hide */ 172 @RequiresPermission(Manifest.permission.CAPTURE_AUDIO_OUTPUT) 173 public static final int TYPE_ECHO_REFERENCE = 28; 174 175 /** 176 * A device type describing the Enhanced Audio Return Channel of an HDMI connection. 177 */ 178 public static final int TYPE_HDMI_EARC = 29; 179 180 /** @hide */ 181 @IntDef(flag = false, prefix = "TYPE", value = { 182 TYPE_BUILTIN_EARPIECE, 183 TYPE_BUILTIN_SPEAKER, 184 TYPE_WIRED_HEADSET, 185 TYPE_WIRED_HEADPHONES, 186 TYPE_BLUETOOTH_SCO, 187 TYPE_BLUETOOTH_A2DP, 188 TYPE_HDMI, 189 TYPE_DOCK, 190 TYPE_USB_ACCESSORY, 191 TYPE_USB_DEVICE, 192 TYPE_USB_HEADSET, 193 TYPE_TELEPHONY, 194 TYPE_LINE_ANALOG, 195 TYPE_HDMI_ARC, 196 TYPE_HDMI_EARC, 197 TYPE_LINE_DIGITAL, 198 TYPE_FM, 199 TYPE_AUX_LINE, 200 TYPE_IP, 201 TYPE_BUS, 202 TYPE_HEARING_AID, 203 TYPE_BUILTIN_MIC, 204 TYPE_FM_TUNER, 205 TYPE_TV_TUNER, 206 TYPE_BUILTIN_SPEAKER_SAFE, 207 TYPE_REMOTE_SUBMIX, 208 TYPE_BLE_HEADSET, 209 TYPE_BLE_SPEAKER, 210 TYPE_ECHO_REFERENCE} 211 ) 212 @Retention(RetentionPolicy.SOURCE) 213 public @interface AudioDeviceType {} 214 215 /** @hide */ 216 @IntDef(flag = false, prefix = "TYPE", value = { 217 TYPE_BUILTIN_MIC, 218 TYPE_BLUETOOTH_SCO, 219 TYPE_BLUETOOTH_A2DP, 220 TYPE_WIRED_HEADSET, 221 TYPE_HDMI, 222 TYPE_TELEPHONY, 223 TYPE_DOCK, 224 TYPE_USB_ACCESSORY, 225 TYPE_USB_DEVICE, 226 TYPE_USB_HEADSET, 227 TYPE_FM_TUNER, 228 TYPE_TV_TUNER, 229 TYPE_LINE_ANALOG, 230 TYPE_LINE_DIGITAL, 231 TYPE_IP, 232 TYPE_BUS, 233 TYPE_REMOTE_SUBMIX, 234 TYPE_BLE_HEADSET, 235 TYPE_HDMI_ARC, 236 TYPE_HDMI_EARC, 237 TYPE_ECHO_REFERENCE} 238 ) 239 @Retention(RetentionPolicy.SOURCE) 240 public @interface AudioDeviceTypeIn {} 241 242 /** @hide */ 243 @IntDef(flag = false, prefix = "TYPE", value = { 244 TYPE_BUILTIN_EARPIECE, 245 TYPE_BUILTIN_SPEAKER, 246 TYPE_WIRED_HEADSET, 247 TYPE_WIRED_HEADPHONES, 248 TYPE_BLUETOOTH_SCO, 249 TYPE_BLUETOOTH_A2DP, 250 TYPE_HDMI, 251 TYPE_DOCK, 252 TYPE_USB_ACCESSORY, 253 TYPE_USB_DEVICE, 254 TYPE_USB_HEADSET, 255 TYPE_TELEPHONY, 256 TYPE_LINE_ANALOG, 257 TYPE_HDMI_ARC, 258 TYPE_HDMI_EARC, 259 TYPE_LINE_DIGITAL, 260 TYPE_FM, 261 TYPE_AUX_LINE, 262 TYPE_IP, 263 TYPE_BUS, 264 TYPE_HEARING_AID, 265 TYPE_BUILTIN_SPEAKER_SAFE, 266 TYPE_BLE_HEADSET, 267 TYPE_BLE_SPEAKER} 268 ) 269 @Retention(RetentionPolicy.SOURCE) 270 public @interface AudioDeviceTypeOut {} 271 272 /** @hide */ isValidAudioDeviceTypeOut(int type)273 /*package*/ static boolean isValidAudioDeviceTypeOut(int type) { 274 switch (type) { 275 case TYPE_BUILTIN_EARPIECE: 276 case TYPE_BUILTIN_SPEAKER: 277 case TYPE_WIRED_HEADSET: 278 case TYPE_WIRED_HEADPHONES: 279 case TYPE_BLUETOOTH_SCO: 280 case TYPE_BLUETOOTH_A2DP: 281 case TYPE_HDMI: 282 case TYPE_DOCK: 283 case TYPE_USB_ACCESSORY: 284 case TYPE_USB_DEVICE: 285 case TYPE_USB_HEADSET: 286 case TYPE_TELEPHONY: 287 case TYPE_LINE_ANALOG: 288 case TYPE_HDMI_ARC: 289 case TYPE_HDMI_EARC: 290 case TYPE_LINE_DIGITAL: 291 case TYPE_FM: 292 case TYPE_AUX_LINE: 293 case TYPE_IP: 294 case TYPE_BUS: 295 case TYPE_HEARING_AID: 296 case TYPE_BUILTIN_SPEAKER_SAFE: 297 case TYPE_BLE_HEADSET: 298 case TYPE_BLE_SPEAKER: 299 return true; 300 default: 301 return false; 302 } 303 } 304 305 /** @hide */ isValidAudioDeviceTypeIn(int type)306 /*package*/ static boolean isValidAudioDeviceTypeIn(int type) { 307 switch (type) { 308 case TYPE_BUILTIN_MIC: 309 case TYPE_BLUETOOTH_SCO: 310 case TYPE_BLUETOOTH_A2DP: 311 case TYPE_WIRED_HEADSET: 312 case TYPE_HDMI: 313 case TYPE_TELEPHONY: 314 case TYPE_DOCK: 315 case TYPE_USB_ACCESSORY: 316 case TYPE_USB_DEVICE: 317 case TYPE_USB_HEADSET: 318 case TYPE_FM_TUNER: 319 case TYPE_TV_TUNER: 320 case TYPE_LINE_ANALOG: 321 case TYPE_LINE_DIGITAL: 322 case TYPE_IP: 323 case TYPE_BUS: 324 case TYPE_REMOTE_SUBMIX: 325 case TYPE_BLE_HEADSET: 326 case TYPE_HDMI_ARC: 327 case TYPE_HDMI_EARC: 328 case TYPE_ECHO_REFERENCE: 329 return true; 330 default: 331 return false; 332 } 333 } 334 335 /** 336 * @hide 337 * Enforces whether the audio device type is acceptable for output. 338 * 339 * A vendor implemented output type should modify isValidAudioDeviceTypeOut() 340 * appropriately to accept the new type. Do not remove already acceptable types. 341 * 342 * @throws IllegalArgumentException on an invalid output device type. 343 * @param type 344 */ 345 @TestApi enforceValidAudioDeviceTypeOut(int type)346 public static void enforceValidAudioDeviceTypeOut(int type) { 347 if (!isValidAudioDeviceTypeOut(type)) { 348 throw new IllegalArgumentException("Illegal output device type " + type); 349 } 350 } 351 352 /** 353 * @hide 354 * Enforces whether the audio device type is acceptable for input. 355 * 356 * A vendor implemented input type should modify isValidAudioDeviceTypeIn() 357 * appropriately to accept the new type. Do not remove already acceptable types. 358 * 359 * @throws IllegalArgumentException on an invalid input device type. 360 * @param type 361 */ 362 @TestApi enforceValidAudioDeviceTypeIn(int type)363 public static void enforceValidAudioDeviceTypeIn(int type) { 364 if (!isValidAudioDeviceTypeIn(type)) { 365 throw new IllegalArgumentException("Illegal input device type " + type); 366 } 367 } 368 369 @Override equals(Object o)370 public boolean equals(Object o) { 371 if (this == o) return true; 372 if (o == null || getClass() != o.getClass()) return false; 373 AudioDeviceInfo that = (AudioDeviceInfo) o; 374 return Objects.equals(getPort(), that.getPort()); 375 } 376 377 @Override hashCode()378 public int hashCode() { 379 return Objects.hash(getPort()); 380 } 381 382 private final AudioDevicePort mPort; 383 AudioDeviceInfo(AudioDevicePort port)384 AudioDeviceInfo(AudioDevicePort port) { 385 mPort = port; 386 } 387 388 /** 389 * @hide 390 * @return The underlying {@link AudioDevicePort} instance. 391 */ getPort()392 public AudioDevicePort getPort() { 393 return mPort; 394 } 395 396 /** 397 * @hide 398 * @return the internal device type 399 */ getInternalType()400 public int getInternalType() { 401 return mPort.type(); 402 } 403 404 /** 405 * @return The internal device ID. 406 */ getId()407 public int getId() { 408 return mPort.handle().id(); 409 } 410 411 /** 412 * @return The human-readable name of the audio device. 413 */ getProductName()414 public CharSequence getProductName() { 415 String portName = mPort.name(); 416 return portName.length() != 0 ? portName : android.os.Build.MODEL; 417 } 418 419 /** 420 * @return The "address" string of the device. This generally contains device-specific 421 * parameters. 422 */ getAddress()423 public @NonNull String getAddress() { 424 return mPort.address(); 425 } 426 427 /** 428 * @return true if the audio device is a source for audio data (e.e an input). 429 */ isSource()430 public boolean isSource() { 431 return mPort.role() == AudioPort.ROLE_SOURCE; 432 } 433 434 /** 435 * @return true if the audio device is a sink for audio data (i.e. an output). 436 */ isSink()437 public boolean isSink() { 438 return mPort.role() == AudioPort.ROLE_SINK; 439 } 440 441 /** 442 * @return An array of sample rates supported by the audio device. 443 * 444 * Note: an empty array indicates that the device supports arbitrary rates. 445 */ getSampleRates()446 public @NonNull int[] getSampleRates() { 447 return mPort.samplingRates(); 448 } 449 450 /** 451 * @return An array of channel position masks (e.g. {@link AudioFormat#CHANNEL_IN_STEREO}, 452 * {@link AudioFormat#CHANNEL_OUT_7POINT1}) for which this audio device can be configured. 453 * 454 * @see AudioFormat 455 * 456 * Note: an empty array indicates that the device supports arbitrary channel masks. 457 */ getChannelMasks()458 public @NonNull int[] getChannelMasks() { 459 return mPort.channelMasks(); 460 } 461 462 /** 463 * @return An array of channel index masks for which this audio device can be configured. 464 * 465 * @see AudioFormat 466 * 467 * Note: an empty array indicates that the device supports arbitrary channel index masks. 468 */ getChannelIndexMasks()469 public @NonNull int[] getChannelIndexMasks() { 470 return mPort.channelIndexMasks(); 471 } 472 473 /** 474 * @return An array of channel counts (1, 2, 4, ...) for which this audio device 475 * can be configured. 476 * 477 * Note: an empty array indicates that the device supports arbitrary channel counts. 478 */ getChannelCounts()479 public @NonNull int[] getChannelCounts() { 480 TreeSet<Integer> countSet = new TreeSet<Integer>(); 481 482 // Channel Masks 483 for (int mask : getChannelMasks()) { 484 countSet.add(isSink() ? 485 AudioFormat.channelCountFromOutChannelMask(mask) 486 : AudioFormat.channelCountFromInChannelMask(mask)); 487 } 488 489 // Index Masks 490 for (int index_mask : getChannelIndexMasks()) { 491 countSet.add(Integer.bitCount(index_mask)); 492 } 493 494 int[] counts = new int[countSet.size()]; 495 int index = 0; 496 for (int count : countSet) { 497 counts[index++] = count; 498 } 499 return counts; 500 } 501 502 /** 503 * @return An array of audio encodings (e.g. {@link AudioFormat#ENCODING_PCM_16BIT}, 504 * {@link AudioFormat#ENCODING_PCM_FLOAT}) supported by the audio device. 505 * <code>ENCODING_PCM_FLOAT</code> indicates the device supports more 506 * than 16 bits of integer precision. As there is no AudioFormat constant 507 * specifically defined for 24-bit PCM, the value <code>ENCODING_PCM_FLOAT</code> 508 * indicates that {@link AudioTrack} or {@link AudioRecord} can preserve at least 24 bits of 509 * integer precision to that device. 510 * 511 * @see AudioFormat 512 * 513 * Note: an empty array indicates that the device supports arbitrary encodings. 514 * For forward compatibility, applications should ignore entries it does not recognize. 515 */ getEncodings()516 public @NonNull int[] getEncodings() { 517 return AudioFormat.filterPublicFormats(mPort.formats()); 518 } 519 520 /** 521 * @return A list of {@link AudioProfile} supported by the audio devices. 522 */ getAudioProfiles()523 public @NonNull List<AudioProfile> getAudioProfiles() { 524 return mPort.profiles(); 525 } 526 527 /** 528 * @return A list of {@link AudioDescriptor} supported by the audio devices. 529 */ getAudioDescriptors()530 public @NonNull List<AudioDescriptor> getAudioDescriptors() { 531 return mPort.audioDescriptors(); 532 } 533 534 /** 535 * Returns an array of supported encapsulation modes for the device. 536 * 537 * The array can include any of the {@code AudioTrack} encapsulation modes, 538 * e.g. {@link AudioTrack#ENCAPSULATION_MODE_ELEMENTARY_STREAM}. 539 * 540 * @return An array of supported encapsulation modes for the device. This 541 * may be an empty array if no encapsulation modes are supported. 542 */ getEncapsulationModes()543 public @NonNull @AudioTrack.EncapsulationMode int[] getEncapsulationModes() { 544 return mPort.encapsulationModes(); 545 } 546 547 /** 548 * Returns an array of supported encapsulation metadata types for the device. 549 * 550 * The metadata type returned should be allowed for all encapsulation modes supported 551 * by the device. Some metadata types may apply only to certain 552 * compressed stream formats, the returned list is the union of subsets. 553 * 554 * The array can include any of 555 * {@link AudioTrack#ENCAPSULATION_METADATA_TYPE_FRAMEWORK_TUNER}, 556 * {@link AudioTrack#ENCAPSULATION_METADATA_TYPE_DVB_AD_DESCRIPTOR}. 557 * 558 * @return An array of supported encapsulation metadata types for the device. This 559 * may be an empty array if no metadata types are supported. 560 */ getEncapsulationMetadataTypes()561 public @NonNull @AudioTrack.EncapsulationMetadataType int[] getEncapsulationMetadataTypes() { 562 return mPort.encapsulationMetadataTypes(); 563 } 564 565 /** 566 * @return The device type identifier of the audio device (i.e. TYPE_BUILTIN_SPEAKER). 567 */ getType()568 public int getType() { 569 return INT_TO_EXT_DEVICE_MAPPING.get(mPort.type(), TYPE_UNKNOWN); 570 } 571 572 /** @hide */ convertDeviceTypeToInternalDevice(int deviceType)573 public static int convertDeviceTypeToInternalDevice(int deviceType) { 574 return EXT_TO_INT_DEVICE_MAPPING.get(deviceType, AudioSystem.DEVICE_NONE); 575 } 576 577 /** @hide */ convertInternalDeviceToDeviceType(int intDevice)578 public static int convertInternalDeviceToDeviceType(int intDevice) { 579 return INT_TO_EXT_DEVICE_MAPPING.get(intDevice, TYPE_UNKNOWN); 580 } 581 582 /** @hide */ convertDeviceTypeToInternalInputDevice(int deviceType)583 public static int convertDeviceTypeToInternalInputDevice(int deviceType) { 584 return EXT_TO_INT_INPUT_DEVICE_MAPPING.get(deviceType, AudioSystem.DEVICE_NONE); 585 } 586 587 private static final SparseIntArray INT_TO_EXT_DEVICE_MAPPING; 588 589 private static final SparseIntArray EXT_TO_INT_DEVICE_MAPPING; 590 591 /** 592 * EXT_TO_INT_INPUT_DEVICE_MAPPING aims at mapping external device type to internal input device 593 * type. 594 */ 595 private static final SparseIntArray EXT_TO_INT_INPUT_DEVICE_MAPPING; 596 597 static { 598 INT_TO_EXT_DEVICE_MAPPING = new SparseIntArray(); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_EARPIECE, TYPE_BUILTIN_EARPIECE)599 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_EARPIECE, TYPE_BUILTIN_EARPIECE); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPEAKER, TYPE_BUILTIN_SPEAKER)600 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPEAKER, TYPE_BUILTIN_SPEAKER); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADSET, TYPE_WIRED_HEADSET)601 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADSET, TYPE_WIRED_HEADSET); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE, TYPE_WIRED_HEADPHONES)602 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE, TYPE_WIRED_HEADPHONES); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO, TYPE_BLUETOOTH_SCO)603 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO, TYPE_BLUETOOTH_SCO); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET, TYPE_BLUETOOTH_SCO)604 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET, TYPE_BLUETOOTH_SCO); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT, TYPE_BLUETOOTH_SCO)605 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT, TYPE_BLUETOOTH_SCO); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, TYPE_BLUETOOTH_A2DP)606 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, TYPE_BLUETOOTH_A2DP); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, TYPE_BLUETOOTH_A2DP)607 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, TYPE_BLUETOOTH_A2DP); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, TYPE_BLUETOOTH_A2DP)608 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, TYPE_BLUETOOTH_A2DP); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI, TYPE_HDMI)609 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI, TYPE_HDMI); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET, TYPE_DOCK)610 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET, TYPE_DOCK); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET, TYPE_DOCK)611 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET, TYPE_DOCK); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_ACCESSORY, TYPE_USB_ACCESSORY)612 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_ACCESSORY, TYPE_USB_ACCESSORY); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_DEVICE, TYPE_USB_DEVICE)613 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_DEVICE, TYPE_USB_DEVICE); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_HEADSET, TYPE_USB_HEADSET)614 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_HEADSET, TYPE_USB_HEADSET); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_TELEPHONY_TX, TYPE_TELEPHONY)615 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_TELEPHONY_TX, TYPE_TELEPHONY); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_LINE, TYPE_LINE_ANALOG)616 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_LINE, TYPE_LINE_ANALOG); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI_ARC, TYPE_HDMI_ARC)617 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI_ARC, TYPE_HDMI_ARC); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI_EARC, TYPE_HDMI_EARC)618 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI_EARC, TYPE_HDMI_EARC); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPDIF, TYPE_LINE_DIGITAL)619 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)620 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)621 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)622 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_IP, TYPE_IP); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BUS, TYPE_BUS)623 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BUS, TYPE_BUS); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HEARING_AID, TYPE_HEARING_AID)624 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HEARING_AID, TYPE_HEARING_AID); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPEAKER_SAFE, TYPE_BUILTIN_SPEAKER_SAFE)625 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPEAKER_SAFE, 626 TYPE_BUILTIN_SPEAKER_SAFE); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_REMOTE_SUBMIX, TYPE_REMOTE_SUBMIX)627 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_REMOTE_SUBMIX, TYPE_REMOTE_SUBMIX); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLE_HEADSET, TYPE_BLE_HEADSET)628 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLE_HEADSET, TYPE_BLE_HEADSET); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLE_SPEAKER, TYPE_BLE_SPEAKER)629 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLE_SPEAKER, TYPE_BLE_SPEAKER); 630 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BUILTIN_MIC, TYPE_BUILTIN_MIC)631 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)632 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET, TYPE_BLUETOOTH_SCO); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_WIRED_HEADSET, TYPE_WIRED_HEADSET)633 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_WIRED_HEADSET, TYPE_WIRED_HEADSET); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_HDMI, TYPE_HDMI)634 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_HDMI, TYPE_HDMI); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TELEPHONY_RX, TYPE_TELEPHONY)635 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TELEPHONY_RX, TYPE_TELEPHONY); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BACK_MIC, TYPE_BUILTIN_MIC)636 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BACK_MIC, TYPE_BUILTIN_MIC); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_ANLG_DOCK_HEADSET, TYPE_DOCK)637 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_ANLG_DOCK_HEADSET, TYPE_DOCK); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_DGTL_DOCK_HEADSET, TYPE_DOCK)638 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_DGTL_DOCK_HEADSET, TYPE_DOCK); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_ACCESSORY, TYPE_USB_ACCESSORY)639 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_ACCESSORY, TYPE_USB_ACCESSORY); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_DEVICE, TYPE_USB_DEVICE)640 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_DEVICE, TYPE_USB_DEVICE); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_HEADSET, TYPE_USB_HEADSET)641 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_HEADSET, TYPE_USB_HEADSET); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_FM_TUNER, TYPE_FM_TUNER)642 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_FM_TUNER, TYPE_FM_TUNER); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TV_TUNER, TYPE_TV_TUNER)643 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TV_TUNER, TYPE_TV_TUNER); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_LINE, TYPE_LINE_ANALOG)644 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)645 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)646 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)647 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_IP, TYPE_IP); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BUS, TYPE_BUS)648 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BUS, TYPE_BUS); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_REMOTE_SUBMIX, TYPE_REMOTE_SUBMIX)649 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_REMOTE_SUBMIX, TYPE_REMOTE_SUBMIX); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLE_HEADSET, TYPE_BLE_HEADSET)650 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLE_HEADSET, TYPE_BLE_HEADSET); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_HDMI_ARC, TYPE_HDMI_ARC)651 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_HDMI_ARC, TYPE_HDMI_ARC); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_HDMI_EARC, TYPE_HDMI_EARC)652 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_HDMI_EARC, TYPE_HDMI_EARC); INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_ECHO_REFERENCE, TYPE_ECHO_REFERENCE)653 INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_ECHO_REFERENCE, TYPE_ECHO_REFERENCE); 654 655 656 // privileges mapping to output device 657 EXT_TO_INT_DEVICE_MAPPING = new SparseIntArray(); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_EARPIECE, AudioSystem.DEVICE_OUT_EARPIECE)658 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_EARPIECE, AudioSystem.DEVICE_OUT_EARPIECE); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_SPEAKER, AudioSystem.DEVICE_OUT_SPEAKER)659 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_SPEAKER, AudioSystem.DEVICE_OUT_SPEAKER); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_WIRED_HEADSET, AudioSystem.DEVICE_OUT_WIRED_HEADSET)660 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_WIRED_HEADSET, AudioSystem.DEVICE_OUT_WIRED_HEADSET); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_WIRED_HEADPHONES, AudioSystem.DEVICE_OUT_WIRED_HEADPHONE)661 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_WIRED_HEADPHONES, AudioSystem.DEVICE_OUT_WIRED_HEADPHONE); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_LINE_ANALOG, AudioSystem.DEVICE_OUT_LINE)662 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_LINE_ANALOG, AudioSystem.DEVICE_OUT_LINE); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_LINE_DIGITAL, AudioSystem.DEVICE_OUT_SPDIF)663 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_LINE_DIGITAL, AudioSystem.DEVICE_OUT_SPDIF); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLUETOOTH_SCO, AudioSystem.DEVICE_OUT_BLUETOOTH_SCO)664 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLUETOOTH_SCO, AudioSystem.DEVICE_OUT_BLUETOOTH_SCO); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLUETOOTH_A2DP, AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP)665 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLUETOOTH_A2DP, AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HDMI, AudioSystem.DEVICE_OUT_HDMI)666 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HDMI, AudioSystem.DEVICE_OUT_HDMI); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HDMI_ARC, AudioSystem.DEVICE_OUT_HDMI_ARC)667 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HDMI_ARC, AudioSystem.DEVICE_OUT_HDMI_ARC); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HDMI_EARC, AudioSystem.DEVICE_OUT_HDMI_EARC)668 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HDMI_EARC, AudioSystem.DEVICE_OUT_HDMI_EARC); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_USB_DEVICE, AudioSystem.DEVICE_OUT_USB_DEVICE)669 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_USB_DEVICE, AudioSystem.DEVICE_OUT_USB_DEVICE); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_USB_HEADSET, AudioSystem.DEVICE_OUT_USB_HEADSET)670 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_USB_HEADSET, AudioSystem.DEVICE_OUT_USB_HEADSET); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_USB_ACCESSORY, AudioSystem.DEVICE_OUT_USB_ACCESSORY)671 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_USB_ACCESSORY, AudioSystem.DEVICE_OUT_USB_ACCESSORY); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_DOCK, AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET)672 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_DOCK, AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_FM, AudioSystem.DEVICE_OUT_FM)673 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_FM, AudioSystem.DEVICE_OUT_FM); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_MIC, AudioSystem.DEVICE_IN_BUILTIN_MIC)674 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_MIC, AudioSystem.DEVICE_IN_BUILTIN_MIC); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_FM_TUNER, AudioSystem.DEVICE_IN_FM_TUNER)675 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_FM_TUNER, AudioSystem.DEVICE_IN_FM_TUNER); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_TV_TUNER, AudioSystem.DEVICE_IN_TV_TUNER)676 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)677 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)678 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)679 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_IP, AudioSystem.DEVICE_OUT_IP); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUS, AudioSystem.DEVICE_OUT_BUS)680 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUS, AudioSystem.DEVICE_OUT_BUS); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HEARING_AID, AudioSystem.DEVICE_OUT_HEARING_AID)681 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HEARING_AID, AudioSystem.DEVICE_OUT_HEARING_AID); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_SPEAKER_SAFE, AudioSystem.DEVICE_OUT_SPEAKER_SAFE)682 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_SPEAKER_SAFE, 683 AudioSystem.DEVICE_OUT_SPEAKER_SAFE); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_REMOTE_SUBMIX, AudioSystem.DEVICE_OUT_REMOTE_SUBMIX)684 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_REMOTE_SUBMIX, AudioSystem.DEVICE_OUT_REMOTE_SUBMIX); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLE_HEADSET, AudioSystem.DEVICE_OUT_BLE_HEADSET)685 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLE_HEADSET, AudioSystem.DEVICE_OUT_BLE_HEADSET); EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLE_SPEAKER, AudioSystem.DEVICE_OUT_BLE_SPEAKER)686 EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLE_SPEAKER, AudioSystem.DEVICE_OUT_BLE_SPEAKER); 687 688 // privileges mapping to input device 689 EXT_TO_INT_INPUT_DEVICE_MAPPING = new SparseIntArray(); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_BUILTIN_MIC, AudioSystem.DEVICE_IN_BUILTIN_MIC)690 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_BUILTIN_MIC, AudioSystem.DEVICE_IN_BUILTIN_MIC); EXT_TO_INT_INPUT_DEVICE_MAPPING.put( TYPE_BLUETOOTH_SCO, AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET)691 EXT_TO_INT_INPUT_DEVICE_MAPPING.put( 692 TYPE_BLUETOOTH_SCO, AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET); EXT_TO_INT_INPUT_DEVICE_MAPPING.put( TYPE_WIRED_HEADSET, AudioSystem.DEVICE_IN_WIRED_HEADSET)693 EXT_TO_INT_INPUT_DEVICE_MAPPING.put( 694 TYPE_WIRED_HEADSET, AudioSystem.DEVICE_IN_WIRED_HEADSET); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_HDMI, AudioSystem.DEVICE_IN_HDMI)695 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_HDMI, AudioSystem.DEVICE_IN_HDMI); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_TELEPHONY, AudioSystem.DEVICE_IN_TELEPHONY_RX)696 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_TELEPHONY, AudioSystem.DEVICE_IN_TELEPHONY_RX); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_DOCK, AudioSystem.DEVICE_IN_ANLG_DOCK_HEADSET)697 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_DOCK, AudioSystem.DEVICE_IN_ANLG_DOCK_HEADSET); EXT_TO_INT_INPUT_DEVICE_MAPPING.put( TYPE_USB_ACCESSORY, AudioSystem.DEVICE_IN_USB_ACCESSORY)698 EXT_TO_INT_INPUT_DEVICE_MAPPING.put( 699 TYPE_USB_ACCESSORY, AudioSystem.DEVICE_IN_USB_ACCESSORY); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_USB_DEVICE, AudioSystem.DEVICE_IN_USB_DEVICE)700 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_USB_DEVICE, AudioSystem.DEVICE_IN_USB_DEVICE); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_USB_HEADSET, AudioSystem.DEVICE_IN_USB_HEADSET)701 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_USB_HEADSET, AudioSystem.DEVICE_IN_USB_HEADSET); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_FM_TUNER, AudioSystem.DEVICE_IN_FM_TUNER)702 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_FM_TUNER, AudioSystem.DEVICE_IN_FM_TUNER); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_TV_TUNER, AudioSystem.DEVICE_IN_TV_TUNER)703 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_TV_TUNER, AudioSystem.DEVICE_IN_TV_TUNER); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_LINE_ANALOG, AudioSystem.DEVICE_IN_LINE)704 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_LINE_ANALOG, AudioSystem.DEVICE_IN_LINE); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_LINE_DIGITAL, AudioSystem.DEVICE_IN_SPDIF)705 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_LINE_DIGITAL, AudioSystem.DEVICE_IN_SPDIF); EXT_TO_INT_INPUT_DEVICE_MAPPING.put( TYPE_BLUETOOTH_A2DP, AudioSystem.DEVICE_IN_BLUETOOTH_A2DP)706 EXT_TO_INT_INPUT_DEVICE_MAPPING.put( 707 TYPE_BLUETOOTH_A2DP, AudioSystem.DEVICE_IN_BLUETOOTH_A2DP); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_IP, AudioSystem.DEVICE_IN_IP)708 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_IP, AudioSystem.DEVICE_IN_IP); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_BUS, AudioSystem.DEVICE_IN_BUS)709 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_BUS, AudioSystem.DEVICE_IN_BUS); EXT_TO_INT_INPUT_DEVICE_MAPPING.put( TYPE_REMOTE_SUBMIX, AudioSystem.DEVICE_IN_REMOTE_SUBMIX)710 EXT_TO_INT_INPUT_DEVICE_MAPPING.put( 711 TYPE_REMOTE_SUBMIX, AudioSystem.DEVICE_IN_REMOTE_SUBMIX); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_BLE_HEADSET, AudioSystem.DEVICE_IN_BLE_HEADSET)712 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_BLE_HEADSET, AudioSystem.DEVICE_IN_BLE_HEADSET); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_HDMI_ARC, AudioSystem.DEVICE_IN_HDMI_ARC)713 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_HDMI_ARC, AudioSystem.DEVICE_IN_HDMI_ARC); EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_HDMI_EARC, AudioSystem.DEVICE_IN_HDMI_EARC)714 EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_HDMI_EARC, AudioSystem.DEVICE_IN_HDMI_EARC); EXT_TO_INT_INPUT_DEVICE_MAPPING.put( TYPE_ECHO_REFERENCE, AudioSystem.DEVICE_IN_ECHO_REFERENCE)715 EXT_TO_INT_INPUT_DEVICE_MAPPING.put( 716 TYPE_ECHO_REFERENCE, AudioSystem.DEVICE_IN_ECHO_REFERENCE); 717 718 } 719 } 720 721