From 84f8b4d77aeaeb07cdecf2a782fad66f69bcf14f Mon Sep 17 00:00:00 2001 From: Trinath Thammishetty Date: Mon, 29 Oct 2018 11:57:19 +0530 Subject: [PATCH] hal: Use correct param for loopback set param Use correct parameter for qahw loopback set param data to resolve compilation error. Change-Id: I41146392ade9bd447f81b4ce3d401bab591c157f --- hal/audio_hw_extn_api.c | 4 ++-- qahw/src/qahw.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hal/audio_hw_extn_api.c b/hal/audio_hw_extn_api.c index 310b5375..44591c91 100644 --- a/hal/audio_hw_extn_api.c +++ b/hal/audio_hw_extn_api.c @@ -425,13 +425,13 @@ static int qahwi_open_output_stream(struct audio_hw_device *dev, int qahwi_loopback_set_param_data(audio_patch_handle_t handle, audio_extn_loopback_param_id param_id, - void *payload) { + audio_extn_loopback_param_payload *payload) { int ret = 0; ret = audio_extn_hw_loopback_set_param_data( handle, param_id, - (audio_extn_loopback_param_payload *)payload); + payload); return ret; } diff --git a/qahw/src/qahw.c b/qahw/src/qahw.c index 126f794f..3390c269 100644 --- a/qahw/src/qahw.c +++ b/qahw/src/qahw.c @@ -70,8 +70,8 @@ typedef int (*qahwi_out_get_param_data_t)(struct audio_stream_out *out, qahw_param_payload *payload); typedef int (*qahwi_loopback_set_param_data_t)(audio_patch_handle_t patch_handle, - qahw_param_id param_id, - qahw_param_payload *payload); + qahw_loopback_param_id param_id, + qahw_loopback_param_payload *payload); typedef struct { audio_hw_device_t *audio_device; @@ -1460,7 +1460,7 @@ int qahw_loopback_set_param_data_l(qahw_module_handle_t *hw_module, if (qahw_module->qahwi_loopback_set_param_data) { ret = qahw_module->qahwi_loopback_set_param_data(handle, param_id, - (void *)payload); + payload); } else { ret = -ENOSYS; ALOGE("%s not supported\n", __func__);