ASoC: msm: qdsp6v2: Update audio effects driver to support Instance ID

Add support to set and get audio effects module params with
Instance ID support. Maintain support for non
Instance ID set and get param structures as well.
Use common pack and set param functions to set and
get parameters to DSP instead of handling them at an
individual module level.

CRs-Fixed: 2151551
Change-Id: I62342d434fc5bd58c06d22913683d7d0fd602da9
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
This commit is contained in:
Aditya Bavanari 2017-04-17 16:29:27 -07:00
parent 7a5f4a39ac
commit 7448b5c257
3 changed files with 597 additions and 664 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2015, 2017 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -159,8 +159,12 @@
#define PBE_ENABLE_PARAM_LEN 1
#define PBE_CONFIG_PARAM_LEN 28
/* Command Payload length and size for Non-IID commands */
#define COMMAND_PAYLOAD_LEN 3
#define COMMAND_PAYLOAD_SZ (COMMAND_PAYLOAD_LEN * sizeof(uint32_t))
/* Command Payload length and size for IID commands */
#define COMMAND_IID_PAYLOAD_LEN 4
#define COMMAND_IID_PAYLOAD_SZ (COMMAND_IID_PAYLOAD_LEN * sizeof(uint32_t))
#define MAX_INBAND_PARAM_SZ 4096
#define Q27_UNITY (1 << 27)
#define Q8_UNITY (1 << 8)

File diff suppressed because it is too large Load diff

View file

@ -8048,25 +8048,6 @@ fail_cmd:
return -EINVAL;
}
int q6asm_send_audio_effects_params(struct audio_client *ac, char *params,
uint32_t params_length)
{
int rc;
pr_debug("%s:\n", __func__);
/*
* Leave function as wrapper for use by effects. Params must be properly
* packed. Use q6common_pack_pp_param to pack params correctly.
*/
rc = q6asm_set_pp_params(ac, NULL, params, params_length);
if (rc)
pr_err("%s: audio effects set-params send failed\n", __func__);
return rc;
}
int q6asm_send_mtmx_strtr_window(struct audio_client *ac,
struct asm_session_mtmx_strtr_param_window_v2_t *window_param,
uint32_t param_id)