From db4c031f518ae5806af73756273ff32cd8d0e4f8 Mon Sep 17 00:00:00 2001 From: Andy Hung Date: Wed, 6 May 2015 08:46:52 -0700 Subject: Update sampling rate to 192kHz for devices Change-Id: I0a83206be51d7ae18ccf85b94b2127356307be69 --- services/audiopolicy/common/include/policy.h | 2 +- services/audiopolicy/common/managerdefinitions/src/AudioPort.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'services/audiopolicy/common') 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]; -- cgit v1.1