diff options
author | Andy Hung <hunga@google.com> | 2015-05-12 18:42:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-12 18:43:00 +0000 |
commit | d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd (patch) | |
tree | 1d075b113943a8e3a032b9162100f05490213250 /services/audioflinger/Threads.cpp | |
parent | 69dce3343ffe33d2ba60ab4c6755953a7ec96899 (diff) | |
parent | db4c031f518ae5806af73756273ff32cd8d0e4f8 (diff) | |
download | frameworks_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/audioflinger/Threads.cpp')
-rw-r--r-- | services/audioflinger/Threads.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index 2722d32..594ed05 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -5345,11 +5345,11 @@ AudioFlinger::RecordThread::RecordThread(const sp<AudioFlinger>& audioFlinger, } initFastCapture = // either capture sample rate is same as (a reasonable) primary output sample rate - (((primaryOutputSampleRate == 44100 || primaryOutputSampleRate == 48000) && + ((isMusicRate(primaryOutputSampleRate) && (mSampleRate == primaryOutputSampleRate)) || // or primary output sample rate is unknown, and capture sample rate is reasonable ((primaryOutputSampleRate == 0) && - ((mSampleRate == 44100 || mSampleRate == 48000)))) && + isMusicRate(mSampleRate))) && // and the buffer size is < 12 ms (mFrameCount * 1000) / mSampleRate < 12; break; @@ -6452,6 +6452,9 @@ status_t AudioFlinger::RecordThread::RecordBufferConverter::updateParameters( return NO_ERROR; } + ALOGV("RecordBufferConverter updateParameters srcMask:%#x dstMask:%#x" + " srcFormat:%#x dstFormat:%#x srcRate:%u dstRate:%u", + srcChannelMask, dstChannelMask, srcFormat, dstFormat, srcSampleRate, dstSampleRate); const bool valid = audio_is_input_channel(srcChannelMask) && audio_is_input_channel(dstChannelMask) |