diff options
author | Eric Laurent <elaurent@google.com> | 2011-01-09 15:33:01 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2011-01-09 16:05:30 -0800 |
commit | 58bf1d91654b47cc08a22cd63d0c5681539dc5b3 (patch) | |
tree | 0eff4c46a231c30ed9f96b43e375f100591bbe0d /services/audioflinger | |
parent | c211ce2439b26cfce10b694913ef56272c7f59e9 (diff) | |
download | frameworks_base-58bf1d91654b47cc08a22cd63d0c5681539dc5b3.zip frameworks_base-58bf1d91654b47cc08a22cd63d0c5681539dc5b3.tar.gz frameworks_base-58bf1d91654b47cc08a22cd63d0c5681539dc5b3.tar.bz2 |
Fix issue 3317627.
The fix consists in selecting the digital audio device (SPDIF/HDMI)
when available if the routing strategy is STRATEGY_PHONE.
Change-Id: Ie500ae92f5c01f2511988543852ba559c6e5994b
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/AudioPolicyManagerBase.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/audioflinger/AudioPolicyManagerBase.cpp b/services/audioflinger/AudioPolicyManagerBase.cpp index 855af9f..eeca7ab 100644 --- a/services/audioflinger/AudioPolicyManagerBase.cpp +++ b/services/audioflinger/AudioPolicyManagerBase.cpp @@ -1587,6 +1587,10 @@ uint32_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy strategy, if (device) break; device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADSET; if (device) break; + device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_AUX_DIGITAL; + if (device) break; + device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_DGTL_DOCK_HEADSET; + if (device) break; device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET; if (device) break; #ifdef WITH_A2DP @@ -1605,6 +1609,10 @@ uint32_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy strategy, break; case AudioSystem::FORCE_SPEAKER: + device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_AUX_DIGITAL; + if (device) break; + device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_DGTL_DOCK_HEADSET; + if (device) break; device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET; if (device) break; #ifdef WITH_A2DP |