ASoC: dsp: 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: I0fdba2560950c931a2ec6f152499fd4bb9f59086
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
This commit is contained in:
Vignesh Kulothungan 2018-01-29 17:21:19 -08:00 committed by Gerrit - the friendly Code Review server
parent f20d5b7ea5
commit fa497d2051
4 changed files with 625 additions and 689 deletions

File diff suppressed because it is too large Load diff

View file

@ -8778,35 +8778,6 @@ int q6asm_get_session_time_legacy(struct audio_client *ac, uint64_t *tstamp)
}
EXPORT_SYMBOL(q6asm_get_session_time_legacy);
/**
* q6asm_send_audio_effects_params -
* command to send audio effects params
*
* @ac: Audio client handle
* @params: audio effects params
* @params_length: size of params
*
* Returns 0 on success or error on failure
*/
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;
}
EXPORT_SYMBOL(q6asm_send_audio_effects_params);
/**
* q6asm_send_mtmx_strtr_window -
* command to send matrix for window params

View file

@ -635,9 +635,6 @@ int q6asm_get_session_time(struct audio_client *ac, uint64_t *tstamp);
int q6asm_get_session_time_legacy(struct audio_client *ac, uint64_t *tstamp);
int q6asm_send_audio_effects_params(struct audio_client *ac, char *params,
uint32_t params_length);
int q6asm_send_stream_cmd(struct audio_client *ac,
struct msm_adsp_event_data *data);

View file

@ -145,8 +145,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)