summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.h
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-07-10 16:56:07 -0700
committerAndy Hung <hunga@google.com>2014-07-10 17:02:21 -0700
commit463be250de73907965faa6a216c00312bf81e049 (patch)
treefb6e9ba368855cf8fadb66fa221795d1b061afca /services/audioflinger/Threads.h
parent01cab9ce4fb203fab8f5115ff866f9f0cc96a73a (diff)
downloadframeworks_av-463be250de73907965faa6a216c00312bf81e049.zip
frameworks_av-463be250de73907965faa6a216c00312bf81e049.tar.gz
frameworks_av-463be250de73907965faa6a216c00312bf81e049.tar.bz2
Return negotiated format with HAL in AudioFlinger
Fixes an issue caused by extended precision and the FastMixer when the format to the FastMixer was returned instead of the HAL format. Change-Id: I2be9d55d5c87d82e46b5200b07fcdd986ebde08a
Diffstat (limited to 'services/audioflinger/Threads.h')
-rw-r--r--services/audioflinger/Threads.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index c265833..3b7257b 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -234,7 +234,7 @@ public:
// dynamic externally-visible
uint32_t sampleRate() const { return mSampleRate; }
audio_channel_mask_t channelMask() const { return mChannelMask; }
- audio_format_t format() const { return mFormat; }
+ audio_format_t format() const { return mHALFormat; }
// Called by AudioFlinger::frameCount(audio_io_handle_t output) and effects,
// and returns the [normal mix] buffer's frame count.
virtual size_t frameCount() const = 0;
@@ -407,7 +407,11 @@ protected:
audio_channel_mask_t mChannelMask;
uint32_t mChannelCount;
size_t mFrameSize;
- audio_format_t mFormat;
+ audio_format_t mFormat; // Source format for Recording and
+ // Sink format for Playback.
+ // Sink format may be different than
+ // HAL format if Fastmixer is used.
+ audio_format_t mHALFormat;
size_t mBufferSize; // HAL buffer size for read() or write()
Vector< sp<ConfigEvent> > mConfigEvents;