summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-01-10 23:53:09 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-01-10 23:53:09 +0000
commite0df2e7b19749ad40488d06bb557ce8d96ab3c37 (patch)
treecf5d10fe59f706450bed83f152567532a0f97ff5 /services/audioflinger
parent4c25e5ce31d073c934dfd21011f6662830e7097c (diff)
downloadframeworks_av-e0df2e7b19749ad40488d06bb557ce8d96ab3c37.zip
frameworks_av-e0df2e7b19749ad40488d06bb557ce8d96ab3c37.tar.gz
frameworks_av-e0df2e7b19749ad40488d06bb557ce8d96ab3c37.tar.bz2
audioflinger: Allow mixed use of JB A2DP HALs and ICS policy
Old policies don't address the modules by handle and expect them all to be scanned for supported devices; new modules stopped listing supported devices. The combination of a new A2DP with an old policy left policy unable to find A2DP outputs, so the new HALs couldn't be used. So... if an old policy is in use, searching for an A2DP output, and finds a non-primary HAL that doesn't list any device, assume it's A2DP and use it. Change-Id: Ie946c065b5c325afd02ba3437077f634e079b386
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/AudioFlinger.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index c7fbb09..4ea7443 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -323,6 +323,13 @@ AudioFlinger::AudioHwDevice* AudioFlinger::findSuitableHwDev_l(
if ((dev->get_supported_devices != NULL) &&
(dev->get_supported_devices(dev) & devices) == devices)
return audioHwDevice;
+#ifdef ICS_AUDIO_BLOB
+ else if (dev->get_supported_devices == NULL && i != 0 &&
+ devices == 0x80)
+ // Reasonably safe assumption: A non-primary HAL without
+ // get_supported_devices is a locally-built A2DP binary
+ return audioHwDevice;
+#endif
}
} else {
// check a match for the requested module handle