diff options
| author | Varun Balaraj <varunb@codeaurora.org> | 2017-07-13 13:30:15 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-07-13 01:47:22 -0700 |
| commit | 701ac49eb764851f08de0ca5ce46ed355fc6ee9c (patch) | |
| tree | 0577af8841e94d4924b28e96dcdd0ce61eb096ad /include | |
| parent | d9fbe4b9210bcf0b7553d224f1c7390c15b91022 (diff) | |
ASoC: q6dspv2: Support for pan-scale and downmix set param
Add support for set params on ASM/ADM for MFC and
Volume modules. Make PSPD mitrix set param api generic.
Change-Id: I75a5b9e3fd2316b75be41439848f89190944bc36
Signed-off-by: Varun Balaraj <varunb@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/apr_audio-v2.h | 54 | ||||
| -rw-r--r-- | include/sound/q6adm-v2.h | 10 | ||||
| -rw-r--r-- | include/sound/q6asm-v2.h | 8 |
3 files changed, 69 insertions, 3 deletions
diff --git a/include/sound/apr_audio-v2.h b/include/sound/apr_audio-v2.h index 74995a0cdbad..00cba88b6082 100644 --- a/include/sound/apr_audio-v2.h +++ b/include/sound/apr_audio-v2.h @@ -625,6 +625,10 @@ struct audproc_softvolume_params { */ #define AUDPROC_PARAM_ID_MFC_OUTPUT_MEDIA_FORMAT 0x00010913 +/* ID of the Coefficient parameter used by AUDPROC_MODULE_ID_CHMIXER to + *configure the channel mixer weighting coefficients. + */ +#define AUDPROC_CHMIXER_PARAM_ID_COEFF 0x00010342 struct audproc_mfc_output_media_fmt { struct adm_cmd_set_pp_params_v5 params; @@ -3902,6 +3906,14 @@ struct asm_softvolume_params { u32 rampingcurve; } __packed; +struct asm_stream_pan_ctrl_params { + uint16_t num_output_channels; + uint16_t num_input_channels; + uint16_t output_channel_map[8]; + uint16_t input_channel_map[8]; + uint16_t gain[64]; +} __packed; + #define ASM_END_POINT_DEVICE_MATRIX 0 #define PCM_CHANNEL_NULL 0 @@ -7802,6 +7814,48 @@ struct asm_volume_ctrl_lr_chan_gain { /*< Linear gain in Q13 format for the right channel.*/ } __packed; +struct audproc_chmixer_param_coeff { + uint32_t index; + uint16_t num_output_channels; + uint16_t num_input_channels; +} __packed; + + +/* ID of the Multichannel Volume Control parameters used by + * AUDPROC_MODULE_ID_VOL_CTRL. + */ +#define AUDPROC_PARAM_ID_MULTICHANNEL_GAIN 0x00010713 + +/* Payload of the AUDPROC_PARAM_ID_MULTICHANNEL_GAIN channel type/gain + * pairs used by the Volume Control module. + * This structure immediately follows the + * audproc_volume_ctrl_multichannel_gain_t structure. + */ +struct audproc_volume_ctrl_channel_type_gain_pair { + uint8_t channel_type; + /* Channel type for which the gain setting is to be applied. */ + + uint8_t reserved1; + uint8_t reserved2; + uint8_t reserved3; + + uint32_t gain; + /* Gain value for this channel in Q28 format. */ +} __packed; + +/* Payload of the AUDPROC_PARAM_ID_MULTICHANNEL_MUTE parameters used by + * the Volume Control module. + */ +struct audproc_volume_ctrl_multichannel_gain { + uint32_t num_channels; + /* Number of channels for which mute configuration is provided. Any + * channels present in the data for which mute configuration is not + * provided are set to unmute. + */ + + struct audproc_volume_ctrl_channel_type_gain_pair *gain_data; + /* Array of channel type/mute setting pairs. */ +} __packed; /* Structure for the mute configuration parameter for a volume control module. */ diff --git a/include/sound/q6adm-v2.h b/include/sound/q6adm-v2.h index e689e9357012..8c53bb9762ce 100644 --- a/include/sound/q6adm-v2.h +++ b/include/sound/q6adm-v2.h @@ -138,9 +138,13 @@ int adm_get_topology_for_port_copp_idx(int port_id, int copp_idx); int adm_get_indexes_from_copp_id(int copp_id, int *port_idx, int *copp_idx); -int adm_set_stereo_to_custom_stereo(int port_id, int copp_idx, - unsigned int session_id, - char *params, uint32_t params_length); +int adm_set_pspd_matrix_params(int port_id, int copp_idx, + unsigned int session_id, + char *params, uint32_t params_length); + +int adm_set_downmix_params(int port_id, int copp_idx, + unsigned int session_id, char *params, + uint32_t params_length); int adm_get_pp_topo_module_list(int port_id, int copp_idx, int32_t param_length, char *params); diff --git a/include/sound/q6asm-v2.h b/include/sound/q6asm-v2.h index d0dffbd15923..177c2f4da32e 100644 --- a/include/sound/q6asm-v2.h +++ b/include/sound/q6asm-v2.h @@ -611,6 +611,14 @@ int q6asm_set_softvolume(struct audio_client *ac, int q6asm_set_softvolume_v2(struct audio_client *ac, struct asm_softvolume_params *param, int instance); +/* Set panning and MFC params */ +int q6asm_set_mfc_panning_params(struct audio_client *ac, + struct asm_stream_pan_ctrl_params *pan_param); + +/* Set vol gain pair */ +int q6asm_set_vol_ctrl_gain_pair(struct audio_client *ac, + struct asm_stream_pan_ctrl_params *pan_param); + /* Send left-right channel gain */ int q6asm_set_lrgain(struct audio_client *ac, int left_gain, int right_gain); |
