summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-10-01 09:47:30 -0700
committerGlenn Kasten <gkasten@google.com>2012-11-01 10:11:25 -0700
commitb64497eb8724c4c372fffdbf3ee30543432953c5 (patch)
treef9a5c97f77d045bcf5b4c19e4353da07d00f6fd1 /include
parent719ae96a5308273100a68d112f131c61f9b3db81 (diff)
downloadframeworks_av-b64497eb8724c4c372fffdbf3ee30543432953c5.zip
frameworks_av-b64497eb8724c4c372fffdbf3ee30543432953c5.tar.gz
frameworks_av-b64497eb8724c4c372fffdbf3ee30543432953c5.tar.bz2
Add NBAIO support for more sample rates
This will be used for audio capture but it is not scalable, and we need a better approach in the long term. Change-Id: I8b12f6b64a3fd8e8a8c425c82574260fe8ffbed6
Diffstat (limited to 'include')
-rw-r--r--include/media/nbaio/NBAIO.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/media/nbaio/NBAIO.h b/include/media/nbaio/NBAIO.h
index 81f42ed..f5d6eb5 100644
--- a/include/media/nbaio/NBAIO.h
+++ b/include/media/nbaio/NBAIO.h
@@ -45,17 +45,15 @@ enum {
// Negotiation of format is based on the data provider and data sink, or the data consumer and
// data source, exchanging prioritized arrays of offers and counter-offers until a single offer is
// mutually agreed upon. Each offer is an NBAIO_Format. For simplicity and performance,
-// NBAIO_Format is an enum that ties together the most important combinations of the various
+// NBAIO_Format is a typedef that ties together the most important combinations of the various
// attributes, rather than a struct with separate fields for format, sample rate, channel count,
// interleave, packing, alignment, etc. The reason is that NBAIO_Format tries to abstract out only
-// the combinations that are actually needed within AudioFligner. If the list of combinations grows
+// the combinations that are actually needed within AudioFlinger. If the list of combinations grows
// too large, then this decision should be re-visited.
-enum NBAIO_Format {
- Format_Invalid,
- Format_SR44_1_C2_I16, // 44.1 kHz PCM stereo interleaved 16-bit signed
- Format_SR48_C2_I16, // 48 kHz PCM stereo interleaved 16-bit signed
- Format_SR44_1_C1_I16, // 44.1 kHz PCM mono interleaved 16-bit signed
- Format_SR48_C1_I16, // 48 kHz PCM mono interleaved 16-bit signed
+// Sample rate and channel count are explicit, PCM interleaved 16-bit is assumed.
+typedef unsigned NBAIO_Format;
+enum {
+ Format_Invalid
};
// Return the frame size of an NBAIO_Format in bytes