summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/common/managerdefinitions/include/AudioPort.h
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-04-07 13:45:50 -0700
committerAndy Hung <hunga@google.com>2015-04-08 18:47:28 -0700
commitf129b03fa583d4cc26fd9c9171b8fb3b0ed8d4f4 (patch)
treecc6ebb41d964a77f5fe5b29e8a360d1a1e4cf7b9 /services/audiopolicy/common/managerdefinitions/include/AudioPort.h
parentb6347ac62b36b4d9578d181ba83bf8e6446298e8 (diff)
downloadframeworks_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/AudioPort.h')
-rw-r--r--services/audiopolicy/common/managerdefinitions/include/AudioPort.h13
1 files changed, 11 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;