summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/common
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-05-12 18:42:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-12 18:43:00 +0000
commitd9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd (patch)
tree1d075b113943a8e3a032b9162100f05490213250 /services/audiopolicy/common
parent69dce3343ffe33d2ba60ab4c6755953a7ec96899 (diff)
parentdb4c031f518ae5806af73756273ff32cd8d0e4f8 (diff)
downloadframeworks_av-d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd.zip
frameworks_av-d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd.tar.gz
frameworks_av-d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd.tar.bz2
Merge "Update sampling rate to 192kHz for devices" into mnc-dev
Diffstat (limited to 'services/audiopolicy/common')
-rwxr-xr-xservices/audiopolicy/common/include/policy.h2
-rw-r--r--services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/services/audiopolicy/common/include/policy.h b/services/audiopolicy/common/include/policy.h
index e6a767f..4eef02f 100755
--- a/services/audiopolicy/common/include/policy.h
+++ b/services/audiopolicy/common/include/policy.h
@@ -20,7 +20,7 @@
// For mixed output and inputs, the policy will use max mixer sampling rates.
// Do not limit sampling rate otherwise
-#define MAX_MIXER_SAMPLING_RATE 48000
+#define MAX_MIXER_SAMPLING_RATE 192000
// For mixed output and inputs, the policy will use max mixer channel count.
// Do not limit channel count otherwise
diff --git a/services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp b/services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp
index 2e4d423..afcd073 100644
--- a/services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp
+++ b/services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp
@@ -611,9 +611,13 @@ uint32_t AudioPort::pickSamplingRate() const
// For mixed output and inputs, use max mixer sampling rates. Do not
// limit sampling rate otherwise
+ // For inputs, also see checkCompatibleSamplingRate().
if (mType != AUDIO_PORT_TYPE_MIX) {
maxRate = UINT_MAX;
}
+ // TODO: should mSamplingRates[] be ordered in terms of our preference
+ // and we return the first (and hence most preferred) match? This is of concern if
+ // we want to choose 96kHz over 192kHz for USB driver stability or resource constraints.
for (size_t i = 0; i < mSamplingRates.size(); i ++) {
if ((mSamplingRates[i] > samplingRate) && (mSamplingRates[i] <= maxRate)) {
samplingRate = mSamplingRates[i];