diff options
author | Eric Laurent <elaurent@google.com> | 2015-01-30 20:27:43 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-01-30 20:27:44 +0000 |
commit | 1bf8a21018cc1d95dc3c28b5044aeda327c7b54e (patch) | |
tree | 8a4be46e5650fa435176aaa2e5ce95b8e146de8c /services/audiopolicy | |
parent | d99c6855901e4b2625aaad3fc24cff5ecf675fa3 (diff) | |
parent | a82797faddb37adb2d441737884576684c8515cb (diff) | |
download | frameworks_av-1bf8a21018cc1d95dc3c28b5044aeda327c7b54e.zip frameworks_av-1bf8a21018cc1d95dc3c28b5044aeda327c7b54e.tar.gz frameworks_av-1bf8a21018cc1d95dc3c28b5044aeda327c7b54e.tar.bz2 |
Merge "audio policy: add fallback for output selection" into lmp-mr1-dev
Diffstat (limited to 'services/audiopolicy')
-rw-r--r-- | services/audiopolicy/AudioPolicyManager.cpp | 4 |
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; |