Lines Matching refs:AudioSystem

202 static int callMode = AudioSystem::MODE_NORMAL;
296 if (handle->format == AudioSystem::AMR_NB in setHardwareParams()
297 || handle->format == AudioSystem::AMR_WB in setHardwareParams()
299 || handle->format == AudioSystem::EVRC in setHardwareParams()
300 || handle->format == AudioSystem::EVRCB in setHardwareParams()
301 || handle->format == AudioSystem::EVRCWB in setHardwareParams()
403 if ((mode == AudioSystem::MODE_IN_CALL) || (mode == AudioSystem::MODE_IN_COMMUNICATION)) { in switchDevice()
404 if ((devices & AudioSystem::DEVICE_OUT_WIRED_HEADSET) || in switchDevice()
405 (devices & AudioSystem::DEVICE_IN_WIRED_HEADSET)) { in switchDevice()
406 devices = devices | (AudioSystem::DEVICE_OUT_WIRED_HEADSET | in switchDevice()
407 AudioSystem::DEVICE_IN_WIRED_HEADSET); in switchDevice()
408 } else if (devices & AudioSystem::DEVICE_OUT_WIRED_HEADPHONE) { in switchDevice()
409 devices = devices | (AudioSystem::DEVICE_OUT_WIRED_HEADPHONE | in switchDevice()
410 AudioSystem::DEVICE_IN_BUILTIN_MIC); in switchDevice()
411 } else if (devices & AudioSystem::DEVICE_IN_BUILTIN_MIC) { in switchDevice()
412 if (mode == AudioSystem::MODE_IN_CALL) { in switchDevice()
413 devices |= AudioSystem::DEVICE_OUT_EARPIECE; in switchDevice()
414 } else if (mode == AudioSystem::MODE_IN_COMMUNICATION) { in switchDevice()
416 devices &= ~AudioSystem::DEVICE_IN_BUILTIN_MIC; in switchDevice()
417 devices |= AudioSystem::DEVICE_IN_BACK_MIC; in switchDevice()
420 } else if (devices & AudioSystem::DEVICE_OUT_EARPIECE) { in switchDevice()
421 devices = devices | AudioSystem::DEVICE_IN_BUILTIN_MIC; in switchDevice()
422 } else if (devices & AudioSystem::DEVICE_OUT_SPEAKER) { in switchDevice()
423 devices = devices | (AudioSystem::DEVICE_IN_BACK_MIC | in switchDevice()
424 AudioSystem::DEVICE_OUT_SPEAKER); in switchDevice()
425 } else if ((devices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO) || in switchDevice()
426 (devices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_HEADSET) || in switchDevice()
427 (devices & AudioSystem::DEVICE_IN_BLUETOOTH_SCO_HEADSET)) { in switchDevice()
428 devices = devices | (AudioSystem::DEVICE_IN_BLUETOOTH_SCO_HEADSET | in switchDevice()
429 AudioSystem::DEVICE_OUT_BLUETOOTH_SCO); in switchDevice()
431 } else if ((devices & AudioSystem::DEVICE_OUT_ANC_HEADSET) || in switchDevice()
432 (devices & AudioSystem::DEVICE_IN_ANC_HEADSET)) { in switchDevice()
433 devices = devices | (AudioSystem::DEVICE_OUT_ANC_HEADSET | in switchDevice()
434 AudioSystem::DEVICE_IN_ANC_HEADSET); in switchDevice()
435 } else if (devices & AudioSystem::DEVICE_OUT_ANC_HEADPHONE) { in switchDevice()
436 devices = devices | (AudioSystem::DEVICE_OUT_ANC_HEADPHONE | in switchDevice()
437 AudioSystem::DEVICE_IN_BUILTIN_MIC); in switchDevice()
439 } else if (devices & AudioSystem::DEVICE_OUT_AUX_DIGITAL) { in switchDevice()
440 if (mode == AudioSystem::MODE_IN_CALL) in switchDevice()
441 devices = devices | (AudioSystem::DEVICE_IN_BACK_MIC | in switchDevice()
442 AudioSystem::DEVICE_OUT_SPEAKER); in switchDevice()
444 devices = devices | (AudioSystem::DEVICE_OUT_AUX_DIGITAL | in switchDevice()
445 AudioSystem::DEVICE_IN_BACK_MIC); in switchDevice()
447 } else if ((devices & AudioSystem::DEVICE_OUT_PROXY) || in switchDevice()
448 (devices & AudioSystem::DEVICE_IN_PROXY)) { in switchDevice()
449 devices = devices | (AudioSystem::DEVICE_OUT_PROXY | in switchDevice()
450 AudioSystem::DEVICE_IN_PROXY); in switchDevice()
455 if ((devices & AudioSystem::DEVICE_IN_BUILTIN_MIC) && ( 6 == handle->channels)) { in switchDevice()
464 rxDevice = getUCMDevice(devices & AudioSystem::DEVICE_OUT_ALL, 0, NULL); in switchDevice()
465 txDevice = getUCMDevice(devices & AudioSystem::DEVICE_IN_ALL, 1, rxDevice); in switchDevice()
470 ((mode == AudioSystem::MODE_IN_CALL) || in switchDevice()
471 (mode == AudioSystem::MODE_IN_COMMUNICATION))) in switchDevice()
551 if (devices & AudioSystem::DEVICE_OUT_FM) in switchDevice()
635 if(handle->devices & AudioSystem::DEVICE_OUT_AUX_DIGITAL) { in s_open()
1316 (callMode == AudioSystem::MODE_IN_CALL) && in getUCMDevice()
1317 ((devices & AudioSystem::DEVICE_OUT_WIRED_HEADSET) || in getUCMDevice()
1318 (devices & AudioSystem::DEVICE_OUT_WIRED_HEADPHONE))) { in getUCMDevice()
1321 (devices & AudioSystem::DEVICE_OUT_ANC_HEADSET) || in getUCMDevice()
1322 (devices & AudioSystem::DEVICE_OUT_ANC_HEADPHONE))) { in getUCMDevice()
1331 }else if ((devices & AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET) || in getUCMDevice()
1332 (devices & AudioSystem::DEVICE_OUT_DGTL_DOCK_HEADSET)) { in getUCMDevice()
1334 } else if ((devices & AudioSystem::DEVICE_OUT_SPEAKER) && in getUCMDevice()
1335 ((devices & AudioSystem::DEVICE_OUT_WIRED_HEADSET) || in getUCMDevice()
1336 (devices & AudioSystem::DEVICE_OUT_WIRED_HEADPHONE))) { in getUCMDevice()
1342 } else if ((devices & AudioSystem::DEVICE_OUT_SPEAKER) && in getUCMDevice()
1343 ((devices & AudioSystem::DEVICE_OUT_AUX_DIGITAL))) { in getUCMDevice()
1346 } else if ((devices & AudioSystem::DEVICE_OUT_SPEAKER) && in getUCMDevice()
1347 ((devices & AudioSystem::DEVICE_OUT_ANC_HEADSET) || in getUCMDevice()
1348 (devices & AudioSystem::DEVICE_OUT_ANC_HEADPHONE))) { in getUCMDevice()
1350 } else if ((devices & AudioSystem::DEVICE_OUT_SPEAKER) && in getUCMDevice()
1351 (devices & AudioSystem::DEVICE_OUT_FM_TX)) { in getUCMDevice()
1354 } else if (devices & AudioSystem::DEVICE_OUT_EARPIECE) { in getUCMDevice()
1355 if (callMode == AudioSystem::MODE_IN_CALL) { in getUCMDevice()
1362 } else if (devices & AudioSystem::DEVICE_OUT_SPEAKER) { in getUCMDevice()
1363 if (callMode == AudioSystem::MODE_IN_CALL) { in getUCMDevice()
1367 } else if ((devices & AudioSystem::DEVICE_OUT_WIRED_HEADSET) || in getUCMDevice()
1368 (devices & AudioSystem::DEVICE_OUT_WIRED_HEADPHONE)) { in getUCMDevice()
1370 if (callMode == AudioSystem::MODE_IN_CALL) { in getUCMDevice()
1375 if (callMode == AudioSystem::MODE_IN_CALL) { in getUCMDevice()
1381 } else if ((devices & AudioSystem::DEVICE_OUT_ANC_HEADSET) || in getUCMDevice()
1382 (devices & AudioSystem::DEVICE_OUT_ANC_HEADPHONE)) { in getUCMDevice()
1383 if (callMode == AudioSystem::MODE_IN_CALL) { in getUCMDevice()
1388 } else if ((devices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO) || in getUCMDevice()
1389 (devices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_HEADSET) || in getUCMDevice()
1390 (devices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT)) { in getUCMDevice()
1395 } else if ((devices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP) || in getUCMDevice()
1396 (devices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES) || in getUCMDevice()
1398 (devices & AudioSystem::DEVICE_OUT_DIRECTOUTPUT) || in getUCMDevice()
1400 (devices & AudioSystem::DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER)) { in getUCMDevice()
1405 } else if (devices & AudioSystem::DEVICE_OUT_AUX_DIGITAL) { in getUCMDevice()
1408 } else if (devices & AudioSystem::DEVICE_OUT_PROXY) { in getUCMDevice()
1412 } else if (devices & AudioSystem::DEVICE_OUT_FM_TX) { in getUCMDevice()
1415 } else if (devices & AudioSystem::DEVICE_OUT_DEFAULT) { in getUCMDevice()
1416 if (callMode == AudioSystem::MODE_IN_CALL) { in getUCMDevice()
1425 (callMode == AudioSystem::MODE_IN_CALL) && in getUCMDevice()
1426 ((devices & AudioSystem::DEVICE_IN_WIRED_HEADSET) in getUCMDevice()
1428 || (devices & AudioSystem::DEVICE_IN_ANC_HEADSET) in getUCMDevice()
1442 } else if (devices & AudioSystem::DEVICE_IN_BUILTIN_MIC) { in getUCMDevice()
1447 if(callMode == AudioSystem::MODE_IN_CALL) { in getUCMDevice()
1514 } else if (devices & AudioSystem::DEVICE_IN_AUX_DIGITAL) { in getUCMDevice()
1517 } else if (devices & AudioSystem::DEVICE_IN_ANC_HEADSET) { in getUCMDevice()
1520 } else if (devices & AudioSystem::DEVICE_IN_WIRED_HEADSET) { in getUCMDevice()
1521 if (callMode == AudioSystem::MODE_IN_CALL) { in getUCMDevice()
1525 } else if (devices & AudioSystem::DEVICE_IN_BLUETOOTH_SCO_HEADSET) { in getUCMDevice()
1531 } else if ((devices & AudioSystem::DEVICE_IN_ANLG_DOCK_HEADSET) || in getUCMDevice()
1532 (devices & AudioSystem::DEVICE_IN_PROXY)) { in getUCMDevice()
1535 } else if ((devices & AudioSystem::DEVICE_IN_COMMUNICATION) || in getUCMDevice()
1536 (devices & AudioSystem::DEVICE_IN_VOICE_CALL)) { in getUCMDevice()
1542 } else if ((devices & AudioSystem::DEVICE_IN_FM_RX) || in getUCMDevice()
1543 (devices & AudioSystem::DEVICE_IN_FM_RX_A2DP)) { in getUCMDevice()
1551 } else if ((devices & AudioSystem::DEVICE_IN_AMBIENT) || in getUCMDevice()
1552 (devices & AudioSystem::DEVICE_IN_BACK_MIC)) { in getUCMDevice()
1557 if (callMode == AudioSystem::MODE_IN_CALL) { in getUCMDevice()