Loading media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1345,6 +1345,7 @@ int VirtualizerIsDeviceSupported(audio_devices_t deviceType) { case AUDIO_DEVICE_OUT_WIRED_HEADSET: case AUDIO_DEVICE_OUT_WIRED_HEADSET: case AUDIO_DEVICE_OUT_WIRED_HEADPHONE: case AUDIO_DEVICE_OUT_WIRED_HEADPHONE: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES: case AUDIO_DEVICE_OUT_USB_HEADSET: return 0; return 0; default : default : return -EINVAL; return -EINVAL; Loading media/libeffects/preprocessing/PreProcessing.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -531,6 +531,7 @@ int AecSetDevice(preproc_effect_t *effect, uint32_t device) break; break; case AUDIO_DEVICE_OUT_WIRED_HEADSET: case AUDIO_DEVICE_OUT_WIRED_HEADSET: case AUDIO_DEVICE_OUT_WIRED_HEADPHONE: case AUDIO_DEVICE_OUT_WIRED_HEADPHONE: case AUDIO_DEVICE_OUT_USB_HEADSET: default: default: break; break; } } Loading services/audiopolicy/common/include/Volume.h +2 −2 Original line number Original line Diff line number Diff line Loading @@ -124,16 +124,16 @@ public: case AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET: case AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES: case AUDIO_DEVICE_OUT_USB_HEADSET: return DEVICE_CATEGORY_HEADSET; return DEVICE_CATEGORY_HEADSET; case AUDIO_DEVICE_OUT_LINE: case AUDIO_DEVICE_OUT_LINE: case AUDIO_DEVICE_OUT_AUX_DIGITAL: case AUDIO_DEVICE_OUT_AUX_DIGITAL: /*USB? Remote submix?*/ case AUDIO_DEVICE_OUT_USB_DEVICE: return DEVICE_CATEGORY_EXT_MEDIA; return DEVICE_CATEGORY_EXT_MEDIA; case AUDIO_DEVICE_OUT_SPEAKER: case AUDIO_DEVICE_OUT_SPEAKER: case AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT: case AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER: case AUDIO_DEVICE_OUT_USB_ACCESSORY: case AUDIO_DEVICE_OUT_USB_ACCESSORY: case AUDIO_DEVICE_OUT_USB_DEVICE: case AUDIO_DEVICE_OUT_REMOTE_SUBMIX: case AUDIO_DEVICE_OUT_REMOTE_SUBMIX: default: default: return DEVICE_CATEGORY_SPEAKER; return DEVICE_CATEGORY_SPEAKER; Loading services/audiopolicy/enginedefault/src/Engine.cpp +11 −0 Original line number Original line Diff line number Diff line Loading @@ -356,6 +356,8 @@ audio_devices_t Engine::getDeviceForStrategyInt(routing_strategy strategy, if (device) break; if (device) break; device = availableOutputDevicesType & AUDIO_DEVICE_OUT_LINE; device = availableOutputDevicesType & AUDIO_DEVICE_OUT_LINE; if (device) break; if (device) break; device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_HEADSET; if (device) break; device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_DEVICE; device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_DEVICE; if (device) break; if (device) break; if (!isInCall()) { if (!isInCall()) { Loading Loading @@ -508,6 +510,9 @@ audio_devices_t Engine::getDeviceForStrategyInt(routing_strategy strategy, if (device2 == AUDIO_DEVICE_NONE) { if (device2 == AUDIO_DEVICE_NONE) { device2 = availableOutputDevicesType & AUDIO_DEVICE_OUT_WIRED_HEADSET; device2 = availableOutputDevicesType & AUDIO_DEVICE_OUT_WIRED_HEADSET; } } if (device2 == AUDIO_DEVICE_NONE) { device2 = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_HEADSET; } if (device2 == AUDIO_DEVICE_NONE) { if (device2 == AUDIO_DEVICE_NONE) { device2 = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_ACCESSORY; device2 = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_ACCESSORY; } } Loading Loading @@ -591,6 +596,8 @@ audio_devices_t Engine::getDeviceForInputSource(audio_source_t inputSource) cons device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { device = AUDIO_DEVICE_IN_WIRED_HEADSET; device = AUDIO_DEVICE_IN_WIRED_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_HEADSET) { device = AUDIO_DEVICE_IN_USB_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { device = AUDIO_DEVICE_IN_USB_DEVICE; device = AUDIO_DEVICE_IN_USB_DEVICE; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { Loading Loading @@ -621,6 +628,8 @@ audio_devices_t Engine::getDeviceForInputSource(audio_source_t inputSource) cons default: // FORCE_NONE default: // FORCE_NONE if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { device = AUDIO_DEVICE_IN_WIRED_HEADSET; device = AUDIO_DEVICE_IN_WIRED_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_HEADSET) { device = AUDIO_DEVICE_IN_USB_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { device = AUDIO_DEVICE_IN_USB_DEVICE; device = AUDIO_DEVICE_IN_USB_DEVICE; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { Loading @@ -646,6 +655,8 @@ audio_devices_t Engine::getDeviceForInputSource(audio_source_t inputSource) cons device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { device = AUDIO_DEVICE_IN_WIRED_HEADSET; device = AUDIO_DEVICE_IN_WIRED_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_HEADSET) { device = AUDIO_DEVICE_IN_USB_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { device = AUDIO_DEVICE_IN_USB_DEVICE; device = AUDIO_DEVICE_IN_USB_DEVICE; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { Loading services/audiopolicy/managerdefault/AudioPolicyManager.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -5160,7 +5160,8 @@ float AudioPolicyManager::computeVolume(audio_stream_type_t stream, if ((device & (AUDIO_DEVICE_OUT_BLUETOOTH_A2DP | if ((device & (AUDIO_DEVICE_OUT_BLUETOOTH_A2DP | AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | AUDIO_DEVICE_OUT_WIRED_HEADSET | AUDIO_DEVICE_OUT_WIRED_HEADSET | AUDIO_DEVICE_OUT_WIRED_HEADPHONE)) && AUDIO_DEVICE_OUT_WIRED_HEADPHONE | AUDIO_DEVICE_OUT_USB_HEADSET)) && ((stream_strategy == STRATEGY_SONIFICATION) ((stream_strategy == STRATEGY_SONIFICATION) || (stream_strategy == STRATEGY_SONIFICATION_RESPECTFUL) || (stream_strategy == STRATEGY_SONIFICATION_RESPECTFUL) || (stream == AUDIO_STREAM_SYSTEM) || (stream == AUDIO_STREAM_SYSTEM) Loading Loading
media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1345,6 +1345,7 @@ int VirtualizerIsDeviceSupported(audio_devices_t deviceType) { case AUDIO_DEVICE_OUT_WIRED_HEADSET: case AUDIO_DEVICE_OUT_WIRED_HEADSET: case AUDIO_DEVICE_OUT_WIRED_HEADPHONE: case AUDIO_DEVICE_OUT_WIRED_HEADPHONE: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES: case AUDIO_DEVICE_OUT_USB_HEADSET: return 0; return 0; default : default : return -EINVAL; return -EINVAL; Loading
media/libeffects/preprocessing/PreProcessing.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -531,6 +531,7 @@ int AecSetDevice(preproc_effect_t *effect, uint32_t device) break; break; case AUDIO_DEVICE_OUT_WIRED_HEADSET: case AUDIO_DEVICE_OUT_WIRED_HEADSET: case AUDIO_DEVICE_OUT_WIRED_HEADPHONE: case AUDIO_DEVICE_OUT_WIRED_HEADPHONE: case AUDIO_DEVICE_OUT_USB_HEADSET: default: default: break; break; } } Loading
services/audiopolicy/common/include/Volume.h +2 −2 Original line number Original line Diff line number Diff line Loading @@ -124,16 +124,16 @@ public: case AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET: case AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES: case AUDIO_DEVICE_OUT_USB_HEADSET: return DEVICE_CATEGORY_HEADSET; return DEVICE_CATEGORY_HEADSET; case AUDIO_DEVICE_OUT_LINE: case AUDIO_DEVICE_OUT_LINE: case AUDIO_DEVICE_OUT_AUX_DIGITAL: case AUDIO_DEVICE_OUT_AUX_DIGITAL: /*USB? Remote submix?*/ case AUDIO_DEVICE_OUT_USB_DEVICE: return DEVICE_CATEGORY_EXT_MEDIA; return DEVICE_CATEGORY_EXT_MEDIA; case AUDIO_DEVICE_OUT_SPEAKER: case AUDIO_DEVICE_OUT_SPEAKER: case AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT: case AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER: case AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER: case AUDIO_DEVICE_OUT_USB_ACCESSORY: case AUDIO_DEVICE_OUT_USB_ACCESSORY: case AUDIO_DEVICE_OUT_USB_DEVICE: case AUDIO_DEVICE_OUT_REMOTE_SUBMIX: case AUDIO_DEVICE_OUT_REMOTE_SUBMIX: default: default: return DEVICE_CATEGORY_SPEAKER; return DEVICE_CATEGORY_SPEAKER; Loading
services/audiopolicy/enginedefault/src/Engine.cpp +11 −0 Original line number Original line Diff line number Diff line Loading @@ -356,6 +356,8 @@ audio_devices_t Engine::getDeviceForStrategyInt(routing_strategy strategy, if (device) break; if (device) break; device = availableOutputDevicesType & AUDIO_DEVICE_OUT_LINE; device = availableOutputDevicesType & AUDIO_DEVICE_OUT_LINE; if (device) break; if (device) break; device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_HEADSET; if (device) break; device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_DEVICE; device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_DEVICE; if (device) break; if (device) break; if (!isInCall()) { if (!isInCall()) { Loading Loading @@ -508,6 +510,9 @@ audio_devices_t Engine::getDeviceForStrategyInt(routing_strategy strategy, if (device2 == AUDIO_DEVICE_NONE) { if (device2 == AUDIO_DEVICE_NONE) { device2 = availableOutputDevicesType & AUDIO_DEVICE_OUT_WIRED_HEADSET; device2 = availableOutputDevicesType & AUDIO_DEVICE_OUT_WIRED_HEADSET; } } if (device2 == AUDIO_DEVICE_NONE) { device2 = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_HEADSET; } if (device2 == AUDIO_DEVICE_NONE) { if (device2 == AUDIO_DEVICE_NONE) { device2 = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_ACCESSORY; device2 = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_ACCESSORY; } } Loading Loading @@ -591,6 +596,8 @@ audio_devices_t Engine::getDeviceForInputSource(audio_source_t inputSource) cons device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { device = AUDIO_DEVICE_IN_WIRED_HEADSET; device = AUDIO_DEVICE_IN_WIRED_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_HEADSET) { device = AUDIO_DEVICE_IN_USB_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { device = AUDIO_DEVICE_IN_USB_DEVICE; device = AUDIO_DEVICE_IN_USB_DEVICE; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { Loading Loading @@ -621,6 +628,8 @@ audio_devices_t Engine::getDeviceForInputSource(audio_source_t inputSource) cons default: // FORCE_NONE default: // FORCE_NONE if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { device = AUDIO_DEVICE_IN_WIRED_HEADSET; device = AUDIO_DEVICE_IN_WIRED_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_HEADSET) { device = AUDIO_DEVICE_IN_USB_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { device = AUDIO_DEVICE_IN_USB_DEVICE; device = AUDIO_DEVICE_IN_USB_DEVICE; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { Loading @@ -646,6 +655,8 @@ audio_devices_t Engine::getDeviceForInputSource(audio_source_t inputSource) cons device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_WIRED_HEADSET) { device = AUDIO_DEVICE_IN_WIRED_HEADSET; device = AUDIO_DEVICE_IN_WIRED_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_HEADSET) { device = AUDIO_DEVICE_IN_USB_HEADSET; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) { device = AUDIO_DEVICE_IN_USB_DEVICE; device = AUDIO_DEVICE_IN_USB_DEVICE; } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) { Loading
services/audiopolicy/managerdefault/AudioPolicyManager.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -5160,7 +5160,8 @@ float AudioPolicyManager::computeVolume(audio_stream_type_t stream, if ((device & (AUDIO_DEVICE_OUT_BLUETOOTH_A2DP | if ((device & (AUDIO_DEVICE_OUT_BLUETOOTH_A2DP | AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | AUDIO_DEVICE_OUT_WIRED_HEADSET | AUDIO_DEVICE_OUT_WIRED_HEADSET | AUDIO_DEVICE_OUT_WIRED_HEADPHONE)) && AUDIO_DEVICE_OUT_WIRED_HEADPHONE | AUDIO_DEVICE_OUT_USB_HEADSET)) && ((stream_strategy == STRATEGY_SONIFICATION) ((stream_strategy == STRATEGY_SONIFICATION) || (stream_strategy == STRATEGY_SONIFICATION_RESPECTFUL) || (stream_strategy == STRATEGY_SONIFICATION_RESPECTFUL) || (stream == AUDIO_STREAM_SYSTEM) || (stream == AUDIO_STREAM_SYSTEM) Loading