summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2015-01-30 21:22:44 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-30 21:22:44 +0000
commite33dee9e041c6ad8d822f717ef141d657da96c32 (patch)
tree89889c9730c4736d464c449b7cded762cd6769a1 /services/audiopolicy
parentcba7fe5f1cb13108367d6de288428801b2d89a8e (diff)
parent14a849c267bdcf564c30f9f2ebf0d619b36f500a (diff)
downloadframeworks_av-e33dee9e041c6ad8d822f717ef141d657da96c32.zip
frameworks_av-e33dee9e041c6ad8d822f717ef141d657da96c32.tar.gz
frameworks_av-e33dee9e041c6ad8d822f717ef141d657da96c32.tar.bz2
am 14a849c2: am 1bf8a210: Merge "audio policy: add fallback for output selection" into lmp-mr1-dev
* commit '14a849c267bdcf564c30f9f2ebf0d619b36f500a': audio policy: add fallback for output selection
Diffstat (limited to 'services/audiopolicy')
-rw-r--r--services/audiopolicy/AudioPolicyManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp
index 8ee1ef0..a58d60c 100644
--- a/services/audiopolicy/AudioPolicyManager.cpp
+++ b/services/audiopolicy/AudioPolicyManager.cpp
@@ -1113,6 +1113,10 @@ audio_io_handle_t AudioPolicyManager::getOutputForDevice(
if (output != AUDIO_IO_HANDLE_NONE) {
mpClientInterface->closeOutput(output);
}
+ // fall back to mixer output if possible when the direct output could not be open
+ if (audio_is_linear_pcm(format) && samplingRate <= MAX_MIXER_SAMPLING_RATE) {
+ goto non_direct_output;
+ }
return AUDIO_IO_HANDLE_NONE;
}
outputDesc->mSamplingRate = config.sample_rate;