summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKiran Kandi <kkandi@codeaurora.org>2013-10-17 15:49:54 -0700
committerSteve Kondik <steve@cyngn.com>2015-11-11 18:39:13 +0100
commit4accaf736763c7d897e4060b04141af96dcf515c (patch)
treed1efa7148630364fefc691eeec0cbceed2f2988c
parentf4a9c13a6d7ef732afc0888b63149ddf601b33b0 (diff)
downloadhardware_libhardware-4accaf736763c7d897e4060b04141af96dcf515c.zip
hardware_libhardware-4accaf736763c7d897e4060b04141af96dcf515c.tar.gz
hardware_libhardware-4accaf736763c7d897e4060b04141af96dcf515c.tar.bz2
audio: add set_parameters for listen hal
Add listen hal specific set parameters function so that Listen service can call Listen hal directly, by passing audio hal. This is needed since set_parameters call in audio hal does not guarantee the correct return value is returned for any parameters set. Change-Id: I647b9e7f841c8157e4eb597655166ea863a00925
-rw-r--r--include/hardware/audio.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index ca7b18b..a562554 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -28,6 +28,9 @@
#include <hardware/hardware.h>
#include <system/audio.h>
#include <hardware/audio_effect.h>
+#ifdef AUDIO_LISTEN_ENABLED
+#include <listen_types.h>
+#endif
__BEGIN_DECLS
@@ -652,6 +655,27 @@ struct audio_hw_device {
int (*set_audio_port_config)(struct audio_hw_device *dev,
const struct audio_port_config *config);
+#ifdef AUDIO_LISTEN_ENABLED
+ /** This method opens the listen session and returns a handle */
+ int (*open_listen_session)(struct audio_hw_device *dev,
+ struct listen_open_params*,
+ struct listen_session** handle);
+
+ /** This method closes the listen session */
+ int (*close_listen_session)(struct audio_hw_device *dev,
+ struct listen_session* handle);
+
+ /** This method sets the mad observer callback */
+ int (*set_mad_observer)(struct audio_hw_device *dev,
+ listen_callback_t cb_func);
+
+ /* This method is used for setting listen hal specfic parameters.
+ * If multiple paramets are set in one call and setting any one of them
+ * fails it will return failure.
+ */
+ int (*listen_set_parameters)(struct audio_hw_device *dev,
+ const char *kv_pairs);
+#endif
};
typedef struct audio_hw_device audio_hw_device_t;