summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-01-09 15:33:01 -0800
committerEric Laurent <elaurent@google.com>2011-01-09 16:05:30 -0800
commit58bf1d91654b47cc08a22cd63d0c5681539dc5b3 (patch)
tree0eff4c46a231c30ed9f96b43e375f100591bbe0d /services/audioflinger
parentc211ce2439b26cfce10b694913ef56272c7f59e9 (diff)
downloadframeworks_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.cpp8
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