Home | History | Annotate | Download | only in src

Lines Matching refs:device

250     uint32_t device = AUDIO_DEVICE_NONE;
256 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_SPEAKER;
261 device = getDeviceForStrategyInt(
265 // while media is playing on a remote device, use the the sonification behavior.
269 device = getDeviceForStrategyInt(
273 if ((device & AUDIO_DEVICE_OUT_SPEAKER) &&
275 device |= AUDIO_DEVICE_OUT_SPEAKER_SAFE;
276 device &= ~AUDIO_DEVICE_OUT_SPEAKER;
280 // while media is playing (or has recently played), use the same device
281 device = getDeviceForStrategyInt(
285 device = getDeviceForStrategyInt(
289 if ((device & AUDIO_DEVICE_OUT_SPEAKER) &&
291 device |= AUDIO_DEVICE_OUT_SPEAKER_SAFE;
292 device &= ~AUDIO_DEVICE_OUT_SPEAKER;
300 device = getDeviceForStrategyInt(
311 // - audio HAL version is < 3.0 and TX device is on the primary HW module
333 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
334 if (device) break;
336 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
337 if (device) break;
338 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_SCO;
339 if (device) break;
340 // if SCO device is requested but no SCO device is available, fall back to default case
348 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_A2DP;
349 if (device) break;
350 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES;
351 if (device) break;
353 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_WIRED_HEADPHONE;
354 if (device) break;
355 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_WIRED_HEADSET;
356 if (device) break;
357 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_LINE;
358 if (device) break;
359 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_DEVICE;
360 if (device) break;
362 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_ACCESSORY;
363 if (device) break;
364 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET;
365 if (device) break;
366 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_AUX_DIGITAL;
367 if (device) break;
368 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET;
369 if (device) break;
371 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_EARPIECE;
380 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER;
381 if (device) break;
384 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_ACCESSORY;
385 if (device) break;
386 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_DEVICE;
387 if (device) break;
388 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET;
389 if (device) break;
390 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_AUX_DIGITAL;
391 if (device) break;
392 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET;
393 if (device) break;
395 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_SPEAKER;
402 // If incall, just select the STRATEGY_PHONE device: The rest of the behavior is handled by
405 device = getDeviceForStrategyInt(
419 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_SPEAKER;
421 // The second device used for sonification is the same as the device used by media strategy
430 audio_devices_t devices = desc->device() &
464 device = getDeviceForStrategyInt(
521 // device is DEVICE_OUT_SPEAKER if we come from case STRATEGY_SONIFICATION or
523 device |= device2;
529 device &= ~AUDIO_DEVICE_OUT_SPEAKER;
538 if (device == AUDIO_DEVICE_NONE) {
539 ALOGV("getDeviceForStrategy() no device found for strategy %d", strategy);
540 device = mApmObserver->getDefaultOutputDevice()->type();
541 ALOGE_IF(device == AUDIO_DEVICE_NONE,
542 "getDeviceForStrategy() no default device defined");
544 ALOGVV("getDeviceForStrategy() strategy %d, device %x", strategy, device);
545 return device;
556 uint32_t device = AUDIO_DEVICE_NONE;
561 device = AUDIO_DEVICE_IN_VOICE_CALL;
569 device = AUDIO_DEVICE_IN_BLUETOOTH_A2DP;
572 device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET;
574 device = AUDIO_DEVICE_IN_WIRED_HEADSET;
576 device = AUDIO_DEVICE_IN_USB_DEVICE;
578 device = AUDIO_DEVICE_IN_BUILTIN_MIC;
595 // if SCO device is requested but no SCO device is available, fall back to default case
597 device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET;
604 device = AUDIO_DEVICE_IN_WIRED_HEADSET;
606 device = AUDIO_DEVICE_IN_USB_DEVICE;
608 device = AUDIO_DEVICE_IN_BUILTIN_MIC;
614 device = AUDIO_DEVICE_IN_BACK_MIC;
616 device = AUDIO_DEVICE_IN_BUILTIN_MIC;
627 device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET;
629 device = AUDIO_DEVICE_IN_WIRED_HEADSET;
631 device = AUDIO_DEVICE_IN_USB_DEVICE;
633 device = AUDIO_DEVICE_IN_BUILTIN_MIC;
638 device = AUDIO_DEVICE_IN_BACK_MIC;
640 device = AUDIO_DEVICE_IN_BUILTIN_MIC;
646 device = AUDIO_DEVICE_IN_VOICE_CALL;
651 device = AUDIO_DEVICE_IN_REMOTE_SUBMIX;
656 device = AUDIO_DEVICE_IN_FM_TUNER;
663 if (device == AUDIO_DEVICE_NONE) {
664 ALOGV("getDeviceForInputSource() no device found for source %d", inputSource);
666 device = AUDIO_DEVICE_IN_STUB;
668 ALOGE_IF(device == AUDIO_DEVICE_NONE,
669 "getDeviceForInputSource() no default device defined");
671 ALOGV("getDeviceForInputSource()input source %d, device %08x", inputSource, device);
672 return device;