Lines Matching refs:device
145 uint32_t device = AUDIO_DEVICE_NONE; in getDeviceForStrategyInt() local
152 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_SPEAKER; in getDeviceForStrategyInt()
157 device = getDeviceForStrategyInt( in getDeviceForStrategyInt()
168 device = getDeviceForStrategyInt(STRATEGY_MEDIA, in getDeviceForStrategyInt()
175 && (device & AUDIO_DEVICE_OUT_SPEAKER) in getDeviceForStrategyInt()
177 device |= AUDIO_DEVICE_OUT_SPEAKER_SAFE; in getDeviceForStrategyInt()
178 device &= ~AUDIO_DEVICE_OUT_SPEAKER; in getDeviceForStrategyInt()
186 device = getDeviceForStrategyInt( in getDeviceForStrategyInt()
225 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT; in getDeviceForStrategyInt()
226 if (device) break; in getDeviceForStrategyInt()
228 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET; in getDeviceForStrategyInt()
229 if (device) break; in getDeviceForStrategyInt()
230 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_SCO; in getDeviceForStrategyInt()
231 if (device) break; in getDeviceForStrategyInt()
236 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_HEARING_AID; in getDeviceForStrategyInt()
237 if (device) break; in getDeviceForStrategyInt()
242 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_A2DP; in getDeviceForStrategyInt()
243 if (device) break; in getDeviceForStrategyInt()
244 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES; in getDeviceForStrategyInt()
245 if (device) break; in getDeviceForStrategyInt()
247 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_WIRED_HEADPHONE; in getDeviceForStrategyInt()
248 if (device) break; in getDeviceForStrategyInt()
249 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_WIRED_HEADSET; in getDeviceForStrategyInt()
250 if (device) break; in getDeviceForStrategyInt()
251 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_LINE; in getDeviceForStrategyInt()
252 if (device) break; in getDeviceForStrategyInt()
253 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_HEADSET; in getDeviceForStrategyInt()
254 if (device) break; in getDeviceForStrategyInt()
255 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_DEVICE; in getDeviceForStrategyInt()
256 if (device) break; in getDeviceForStrategyInt()
258 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_ACCESSORY; in getDeviceForStrategyInt()
259 if (device) break; in getDeviceForStrategyInt()
260 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET; in getDeviceForStrategyInt()
261 if (device) break; in getDeviceForStrategyInt()
262 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_AUX_DIGITAL; in getDeviceForStrategyInt()
263 if (device) break; in getDeviceForStrategyInt()
264 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET; in getDeviceForStrategyInt()
265 if (device) break; in getDeviceForStrategyInt()
267 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_EARPIECE; in getDeviceForStrategyInt()
276 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER; in getDeviceForStrategyInt()
277 if (device) break; in getDeviceForStrategyInt()
280 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_ACCESSORY; in getDeviceForStrategyInt()
281 if (device) break; in getDeviceForStrategyInt()
282 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_DEVICE; in getDeviceForStrategyInt()
283 if (device) break; in getDeviceForStrategyInt()
284 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET; in getDeviceForStrategyInt()
285 if (device) break; in getDeviceForStrategyInt()
286 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_AUX_DIGITAL; in getDeviceForStrategyInt()
287 if (device) break; in getDeviceForStrategyInt()
288 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET; in getDeviceForStrategyInt()
289 if (device) break; in getDeviceForStrategyInt()
291 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_SPEAKER; in getDeviceForStrategyInt()
301 device = getDeviceForStrategyInt( in getDeviceForStrategyInt()
316 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_SPEAKER; in getDeviceForStrategyInt()
336 device = device2; in getDeviceForStrategyInt()
344 (device & AUDIO_DEVICE_OUT_SPEAKER) && in getDeviceForStrategyInt()
346 device |= AUDIO_DEVICE_OUT_SPEAKER_SAFE; in getDeviceForStrategyInt()
347 device &= ~AUDIO_DEVICE_OUT_SPEAKER; in getDeviceForStrategyInt()
350 device |= device2; in getDeviceForStrategyInt()
400 device = getDeviceForStrategyInt( in getDeviceForStrategyInt()
468 device |= device2; in getDeviceForStrategyInt()
474 device &= ~AUDIO_DEVICE_OUT_SPEAKER; in getDeviceForStrategyInt()
480 (device & AUDIO_DEVICE_OUT_SPEAKER) && in getDeviceForStrategyInt()
482 device |= AUDIO_DEVICE_OUT_SPEAKER_SAFE; in getDeviceForStrategyInt()
483 device &= ~AUDIO_DEVICE_OUT_SPEAKER; in getDeviceForStrategyInt()
492 if (device == AUDIO_DEVICE_NONE) { in getDeviceForStrategyInt()
494 device = getApmObserver()->getDefaultOutputDevice()->type(); in getDeviceForStrategyInt()
495 ALOGE_IF(device == AUDIO_DEVICE_NONE, in getDeviceForStrategyInt()
498 ALOGVV("getDeviceForStrategy() strategy %d, device %x", strategy, device); in getDeviceForStrategyInt()
499 return device; in getDeviceForStrategyInt()
512 uint32_t device = AUDIO_DEVICE_NONE; in getDeviceForInputSource() local
536 device = AUDIO_DEVICE_IN_BLUETOOTH_A2DP; in getDeviceForInputSource()
539 device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; in getDeviceForInputSource()
541 device = AUDIO_DEVICE_IN_WIRED_HEADSET; in getDeviceForInputSource()
543 device = AUDIO_DEVICE_IN_USB_HEADSET; in getDeviceForInputSource()
545 device = AUDIO_DEVICE_IN_USB_DEVICE; in getDeviceForInputSource()
547 device = AUDIO_DEVICE_IN_BUILTIN_MIC; in getDeviceForInputSource()
563 device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; in getDeviceForInputSource()
570 device = AUDIO_DEVICE_IN_WIRED_HEADSET; in getDeviceForInputSource()
572 device = AUDIO_DEVICE_IN_USB_HEADSET; in getDeviceForInputSource()
574 device = AUDIO_DEVICE_IN_USB_DEVICE; in getDeviceForInputSource()
576 device = AUDIO_DEVICE_IN_BUILTIN_MIC; in getDeviceForInputSource()
582 device = AUDIO_DEVICE_IN_BACK_MIC; in getDeviceForInputSource()
584 device = AUDIO_DEVICE_IN_BUILTIN_MIC; in getDeviceForInputSource()
598 device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; in getDeviceForInputSource()
600 device = AUDIO_DEVICE_IN_WIRED_HEADSET; in getDeviceForInputSource()
602 device = AUDIO_DEVICE_IN_USB_HEADSET; in getDeviceForInputSource()
604 device = AUDIO_DEVICE_IN_USB_DEVICE; in getDeviceForInputSource()
606 device = AUDIO_DEVICE_IN_BUILTIN_MIC; in getDeviceForInputSource()
611 device = AUDIO_DEVICE_IN_BACK_MIC; in getDeviceForInputSource()
613 device = AUDIO_DEVICE_IN_BUILTIN_MIC; in getDeviceForInputSource()
616 device = AUDIO_DEVICE_IN_USB_DEVICE; in getDeviceForInputSource()
623 device = AUDIO_DEVICE_IN_VOICE_CALL; in getDeviceForInputSource()
628 device = AUDIO_DEVICE_IN_WIRED_HEADSET; in getDeviceForInputSource()
630 device = AUDIO_DEVICE_IN_USB_HEADSET; in getDeviceForInputSource()
632 device = AUDIO_DEVICE_IN_USB_DEVICE; in getDeviceForInputSource()
634 device = AUDIO_DEVICE_IN_BUILTIN_MIC; in getDeviceForInputSource()
639 device = AUDIO_DEVICE_IN_REMOTE_SUBMIX; in getDeviceForInputSource()
644 device = AUDIO_DEVICE_IN_FM_TUNER; in getDeviceForInputSource()
649 device = AUDIO_DEVICE_IN_ECHO_REFERENCE; in getDeviceForInputSource()
656 if (device == AUDIO_DEVICE_NONE) { in getDeviceForInputSource()
659 device = AUDIO_DEVICE_IN_STUB; in getDeviceForInputSource()
661 ALOGE_IF(device == AUDIO_DEVICE_NONE, in getDeviceForInputSource()
664 ALOGV("getDeviceForInputSource()input source %d, device %08x", inputSource, device); in getDeviceForInputSource()
665 return device; in getDeviceForInputSource()
712 sp<DeviceDescriptor> device = findPreferredDevice(outputs, strategy, availableOutputDevices); in getOutputDevicesForAttributes() local
713 if (device != nullptr) { in getOutputDevicesForAttributes()
714 return DeviceVector(device); in getOutputDevicesForAttributes()
740 sp<DeviceDescriptor> device = in getInputDeviceForAttributes() local
742 if (device != nullptr) { in getInputDeviceForAttributes()
743 return device; in getInputDeviceForAttributes()
746 device = policyMixes.getDeviceAndMixForInputSource(attr.source, availableInputDevices, mix); in getInputDeviceForAttributes()
747 if (device != nullptr) { in getInputDeviceForAttributes()
748 return device; in getInputDeviceForAttributes()