summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/common
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-05-06 08:46:52 -0700
committerAndy Hung <hunga@google.com>2015-05-12 09:30:51 -0700
commitdb4c031f518ae5806af73756273ff32cd8d0e4f8 (patch)
tree62f9e0541acccc3acacf808d2a3cdad130eb819b /services/audiopolicy/common
parent18aa27016a94d0fee243637a80fd0741f89e08f2 (diff)
downloadframeworks_av-db4c031f518ae5806af73756273ff32cd8d0e4f8.zip
frameworks_av-db4c031f518ae5806af73756273ff32cd8d0e4f8.tar.gz
frameworks_av-db4c031f518ae5806af73756273ff32cd8d0e4f8.tar.bz2
Update sampling rate to 192kHz for devices
Change-Id: I0a83206be51d7ae18ccf85b94b2127356307be69
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 a2327ee..4bda1f7 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];