From 4accaf736763c7d897e4060b04141af96dcf515c Mon Sep 17 00:00:00 2001 From: Kiran Kandi Date: Thu, 17 Oct 2013 15:49:54 -0700 Subject: 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 --- include/hardware/audio.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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 #include #include +#ifdef AUDIO_LISTEN_ENABLED +#include +#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; -- cgit v1.1