am 3a49cd8b: (-s ours) am bdcf8251: Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge
* commit '3a49cd8b15a854ef18aae96a8f32dcd403aa81a8':
diff --git a/include/hardware/audio_effect.h b/include/hardware/audio_effect.h
index 46e323d..2c8f2e3 100644
--- a/include/hardware/audio_effect.h
+++ b/include/hardware/audio_effect.h
@@ -873,8 +873,10 @@
// Effect library interface
/////////////////////////////////////////////////
-// Effect library interface version 2.0
-#define EFFECT_LIBRARY_API_VERSION EFFECT_MAKE_API_VERSION(2,0)
+// Effect library interface version 3.0
+// Note that EffectsFactory.c only checks the major version component, so changes to the minor
+// number can only be used for fully backwards compatible changes
+#define EFFECT_LIBRARY_API_VERSION EFFECT_MAKE_API_VERSION(3,0)
#define AUDIO_EFFECT_LIBRARY_TAG ((('A') << 24) | (('E') << 16) | (('L') << 8) | ('T'))
@@ -893,57 +895,6 @@
////////////////////////////////////////////////////////////////////////////////
//
- // Function: query_num_effects
- //
- // Description: Returns the number of different effects exposed by the
- // library. Each effect must have a unique effect uuid (see
- // effect_descriptor_t). This function together with EffectQueryEffect()
- // is used to enumerate all effects present in the library.
- //
- // Input/Output:
- // pNumEffects: address where the number of effects should be returned.
- //
- // Output:
- // returned value: 0 successful operation.
- // -ENODEV library failed to initialize
- // -EINVAL invalid pNumEffects
- // *pNumEffects: updated with number of effects in library
- //
- ////////////////////////////////////////////////////////////////////////////////
- int32_t (*query_num_effects)(uint32_t *pNumEffects);
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // Function: query_effect
- //
- // Description: Returns the descriptor of the effect engine which index is
- // given as argument.
- // See effect_descriptor_t for details on effect descriptors.
- // This function together with EffectQueryNumberEffects() is used to enumerate all
- // effects present in the library. The enumeration sequence is:
- // EffectQueryNumberEffects(&num_effects);
- // for (i = 0; i < num_effects; i++)
- // EffectQueryEffect(i,...);
- //
- // Input/Output:
- // index: index of the effect
- // pDescriptor: address where to return the effect descriptor.
- //
- // Output:
- // returned value: 0 successful operation.
- // -ENODEV library failed to initialize
- // -EINVAL invalid pDescriptor or index
- // -ENOSYS effect list has changed since last execution of
- // EffectQueryNumberEffects()
- // -ENOENT no more effect available
- // *pDescriptor: updated with the effect descriptor.
- //
- ////////////////////////////////////////////////////////////////////////////////
- int32_t (*query_effect)(uint32_t index,
- effect_descriptor_t *pDescriptor);
-
- ////////////////////////////////////////////////////////////////////////////////
- //
// Function: create_effect
//
// Description: Creates an effect engine of the specified implementation uuid and
diff --git a/modules/audio_remote_submix/audio_hw.cpp b/modules/audio_remote_submix/audio_hw.cpp
index 3756274..e9759e5 100755
--- a/modules/audio_remote_submix/audio_hw.cpp
+++ b/modules/audio_remote_submix/audio_hw.cpp
@@ -571,8 +571,7 @@
// initialize pipe
{
ALOGV(" initializing pipe");
- const NBAIO_Format format =
- config->sample_rate == 48000 ? Format_SR48_C2_I16 : Format_SR44_1_C2_I16;
+ const NBAIO_Format format = Format_from_SR_C(config->sample_rate, 2);
const NBAIO_Format offers[1] = {format};
size_t numCounterOffers = 0;
// creating a MonoPipe with optional blocking set to true.