diff options
author | Eric Laurent <elaurent@google.com> | 2010-12-14 16:31:33 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2010-12-15 11:01:48 -0800 |
commit | f3a8d32fd475ec68d966fa6f12a4c975ba80b659 (patch) | |
tree | b64cef369c553e79b0ce9f4b74485aed40fd9e53 /services | |
parent | d27f1e6959cdcdadfa471b9824686d784ca55def (diff) | |
download | frameworks_av-f3a8d32fd475ec68d966fa6f12a4c975ba80b659.zip frameworks_av-f3a8d32fd475ec68d966fa6f12a4c975ba80b659.tar.gz frameworks_av-f3a8d32fd475ec68d966fa6f12a4c975ba80b659.tar.bz2 |
Change audio routing policy for HDMI
HDMI device should have a higher priority than analog dock audio but a lower priority
than wired headsets.
Also modified AudioService so that HDMI is mapped to DEVICE_OUT_AUX_DIGITAL device and not
DEVICE_OUT_DGTL_DOCK_HEADSET as before to enable discrimination between SPDIF going to
digital dock and SPIDF going to HDMI.
Change-Id: I887d0c73479784dd2edaf41ce1a7d8d0bdcbb4bd
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/AudioPolicyManagerBase.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/services/audioflinger/AudioPolicyManagerBase.cpp b/services/audioflinger/AudioPolicyManagerBase.cpp index 175f613..5b9273d 100644 --- a/services/audioflinger/AudioPolicyManagerBase.cpp +++ b/services/audioflinger/AudioPolicyManagerBase.cpp @@ -1641,19 +1641,19 @@ uint32_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy strategy, // FALL THROUGH case STRATEGY_MEDIA: { - uint32_t device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_AUX_DIGITAL; - if (device2 == 0) { - device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADPHONE; - } + uint32_t device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADPHONE; if (device2 == 0) { device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADSET; } if (device2 == 0) { - device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET; + device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_AUX_DIGITAL; } if (device2 == 0) { device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_DGTL_DOCK_HEADSET; } + if (device2 == 0) { + device2 = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET; + } #ifdef WITH_A2DP if (mA2dpOutput != 0) { if (strategy == STRATEGY_SONIFICATION && !a2dpUsedForSonification()) { |