summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/common
diff options
context:
space:
mode:
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];