diff options
author | Sidipotu Ashok <sashok@codeaurora.org> | 2019-05-06 15:41:56 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-06-13 11:06:48 -0700 |
commit | afffd20339b67a6cd6ab4851385da471a38df21b (patch) | |
tree | 3f535ef9607b5d30a37209c2a7dec755083be9f5 /hal/audio_extn/audio_extn.h | |
parent | 3d42a81fd26cf94ab1e00ca37e96f7b3ff56f898 (diff) | |
download | hardware_qcom_audio-afffd20339b67a6cd6ab4851385da471a38df21b.tar.gz hardware_qcom_audio-afffd20339b67a6cd6ab4851385da471a38df21b.tar.bz2 hardware_qcom_audio-afffd20339b67a6cd6ab4851385da471a38df21b.zip |
hal: Add QAP extention
- Add new source file in audio_extn folder
Change-Id: If62e948f74f5e9e933704b5b6e061471d3a62a38
Diffstat (limited to 'hal/audio_extn/audio_extn.h')
-rw-r--r-- | hal/audio_extn/audio_extn.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h index efb7d7d2..9c09fc58 100644 --- a/hal/audio_extn/audio_extn.h +++ b/hal/audio_extn/audio_extn.h @@ -800,6 +800,59 @@ bool audio_extn_is_qaf_stream(struct stream_out *out); #define audio_extn_is_qaf_stream(out) (0) #endif + +#ifdef QAP_EXTN_ENABLED +/* + * Helper funtion to know if HAL QAP extention is enabled or not. + */ +bool audio_extn_qap_is_enabled(); +/* + * QAP HAL extention init, called during bootup/HAL device open. + * QAP library will be loaded in this funtion. + */ +int audio_extn_qap_init(struct audio_device *adev); +void audio_extn_qap_deinit(); +/* + * if HAL QAP is enabled and inited succesfully then all then this funtion + * gets called for all the open_output_stream requests, in other words + * the core audio_hw->open_output_stream is overridden by this funtion + */ +int audio_extn_qap_open_output_stream(struct audio_hw_device *dev, + audio_io_handle_t handle, + audio_devices_t devices, + audio_output_flags_t flags, + struct audio_config *config, + struct audio_stream_out **stream_out, + const char *address __unused); +void audio_extn_qap_close_output_stream(struct audio_hw_device *dev __unused, + struct audio_stream_out *stream); +/* + * this funtion is how HAL QAP extention gets to know the device connection/disconnection + */ +int audio_extn_qap_set_parameters(struct audio_device *adev, struct str_parms *parms); +int audio_extn_qap_out_set_param_data(struct stream_out *out, + audio_extn_param_id param_id, + audio_extn_param_payload *payload); +int audio_extn_qap_out_get_param_data(struct stream_out *out, + audio_extn_param_id param_id, + audio_extn_param_payload *payload); +/* + * helper funtion. + */ +bool audio_extn_is_qap_stream(struct stream_out *out); +#else +#define audio_extn_qap_is_enabled() (0) +#define audio_extn_qap_deinit() (0) +#define audio_extn_qap_close_output_stream adev_close_output_stream +#define audio_extn_qap_open_output_stream adev_open_output_stream +#define audio_extn_qap_init(adev) (0) +#define audio_extn_qap_set_parameters(adev, parms) (0) +#define audio_extn_qap_out_set_param_data(out, param_id, payload) (0) +#define audio_extn_qap_out_get_param_data(out, param_id, payload) (0) +#define audio_extn_is_qap_stream(out) (0) +#endif + + #ifdef AUDIO_EXTN_BT_HAL_ENABLED int audio_extn_bt_hal_load(void **handle); int audio_extn_bt_hal_open_output_stream(void *handle, int in_rate, audio_channel_mask_t channel_mask, int bit_width); |