summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-08-19 12:09:05 -0700
committerGlenn Kasten <gkasten@google.com>2013-11-08 11:55:36 -0800
commit8594843c15b4722ced39436fe9e64f3e57e7ace4 (patch)
tree9d8e4dcf8cf31ee119abe0872223a416e6418ec0 /services/audioflinger/AudioFlinger.cpp
parentd8a1de6204829b0379bbd13042f1450bdb203f2b (diff)
downloadframeworks_av-8594843c15b4722ced39436fe9e64f3e57e7ace4.zip
frameworks_av-8594843c15b4722ced39436fe9e64f3e57e7ace4.tar.gz
frameworks_av-8594843c15b4722ced39436fe9e64f3e57e7ace4.tar.bz2
Pull HAL reads out of RecordThread resample
Previously, the resample was indirectly calling HAL read from within the BufferProvider's getNextBuffer. Now the HAL read is done ahead of time into a circular buffer, and the getNextBuffer just reads out of that memory. This change will permit some future planned features. Also removed the mono to mono resampling optimization, as that optimization will no longer be valid in the future. Change-Id: I59f5016a2df91078d697c37a7dec2d9d9f44542e
Diffstat (limited to 'services/audioflinger/AudioFlinger.cpp')
-rw-r--r--services/audioflinger/AudioFlinger.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 79c41f7..c9c9f8a 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1717,9 +1717,11 @@ audio_io_handle_t AudioFlinger::openInput(audio_module_handle_t module,
reqFormat == config.format && config.format == AUDIO_FORMAT_PCM_16_BIT &&
(config.sample_rate <= 2 * reqSamplingRate) &&
(popcount(config.channel_mask) <= FCC_2) && (popcount(reqChannelMask) <= FCC_2)) {
+ // FIXME describe the change proposed by HAL (save old values so we can log them here)
ALOGV("openInput() reopening with proposed sampling rate and channel mask");
inStream = NULL;
status = inHwHal->open_input_stream(inHwHal, id, *pDevices, &config, &inStream);
+ // FIXME log this new status; HAL should not propose any further changes
}
if (status == NO_ERROR && inStream != NULL) {