diff options
author | Andy Hung <hunga@google.com> | 2015-04-07 13:45:50 -0700 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2015-04-08 18:47:28 -0700 |
commit | f129b03fa583d4cc26fd9c9171b8fb3b0ed8d4f4 (patch) | |
tree | cc6ebb41d964a77f5fe5b29e8a360d1a1e4cf7b9 /services/audiopolicy/common/managerdefinitions/include | |
parent | b6347ac62b36b4d9578d181ba83bf8e6446298e8 (diff) | |
download | frameworks_av-f129b03fa583d4cc26fd9c9171b8fb3b0ed8d4f4.zip frameworks_av-f129b03fa583d4cc26fd9c9171b8fb3b0ed8d4f4.tar.gz frameworks_av-f129b03fa583d4cc26fd9c9171b8fb3b0ed8d4f4.tar.bz2 |
Enable 8 bit and float pcm record formats for AudioPolicyManager
Add capability for handling different record channel masks.
Change-Id: I63f6b029aca5cefff7adf26198a3b594a7ea2d71
Diffstat (limited to 'services/audiopolicy/common/managerdefinitions/include')
-rw-r--r-- | services/audiopolicy/common/managerdefinitions/include/AudioPort.h | 13 | ||||
-rw-r--r-- | services/audiopolicy/common/managerdefinitions/include/IOProfile.h | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/services/audiopolicy/common/managerdefinitions/include/AudioPort.h b/services/audiopolicy/common/managerdefinitions/include/AudioPort.h index dea1b8a..1c2c27e 100644 --- a/services/audiopolicy/common/managerdefinitions/include/AudioPort.h +++ b/services/audiopolicy/common/managerdefinitions/include/AudioPort.h @@ -62,8 +62,12 @@ public: // searches for an exact match status_t checkExactChannelMask(audio_channel_mask_t channelMask) const; // searches for a compatible match, currently implemented for input channel masks only - status_t checkCompatibleChannelMask(audio_channel_mask_t channelMask) const; - status_t checkFormat(audio_format_t format) const; + status_t checkCompatibleChannelMask(audio_channel_mask_t channelMask, + audio_channel_mask_t *updatedChannelMask) const; + + status_t checkExactFormat(audio_format_t format) const; + // searches for a compatible match, currently implemented for input formats only + status_t checkCompatibleFormat(audio_format_t format, audio_format_t *updatedFormat) const; status_t checkGain(const struct audio_gain_config *gainConfig, int index) const; uint32_t pickSamplingRate() const; @@ -71,6 +75,11 @@ public: audio_format_t pickFormat() const; static const audio_format_t sPcmFormatCompareTable[]; + static int compareFormatsGoodToBad( + const audio_format_t *format1, const audio_format_t *format2) { + // compareFormats sorts from bad to good, we reverse it here + return compareFormats(*format2, *format1); + } static int compareFormats(audio_format_t format1, audio_format_t format2); audio_module_handle_t getModuleHandle() const; diff --git a/services/audiopolicy/common/managerdefinitions/include/IOProfile.h b/services/audiopolicy/common/managerdefinitions/include/IOProfile.h index 022257e..ab6fcc1 100644 --- a/services/audiopolicy/common/managerdefinitions/include/IOProfile.h +++ b/services/audiopolicy/common/managerdefinitions/include/IOProfile.h @@ -45,7 +45,9 @@ public: uint32_t samplingRate, uint32_t *updatedSamplingRate, audio_format_t format, + audio_format_t *updatedFormat, audio_channel_mask_t channelMask, + audio_channel_mask_t *updatedChannelMask, uint32_t flags) const; void dump(int fd); |