summaryrefslogtreecommitdiffstats
path: root/services
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
commiteb0d0c48ebfcee5e8141ae25fe42a9eac6aae230 (patch)
tree3475e7f5e88c9ec50a000e86c43f5cf20c4c0379 /services
parentaee6c07b3572bf2510cd9e7d29c454fcfedde31d (diff)
downloadframeworks_av-eb0d0c48ebfcee5e8141ae25fe42a9eac6aae230.zip
frameworks_av-eb0d0c48ebfcee5e8141ae25fe42a9eac6aae230.tar.gz
frameworks_av-eb0d0c48ebfcee5e8141ae25fe42a9eac6aae230.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')
-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