Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6464572e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents d59545e5 7448b5c2
Loading
Loading
Loading
Loading
+362 −561

File changed.

Preview size limit exceeded, changes collapsed.

+21 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@
#define MAX_MODULES_IN_TOPO 16
#define ADM_GET_TOPO_MODULE_LIST_LENGTH\
		((MAX_MODULES_IN_TOPO + 1) * sizeof(uint32_t))
#define ADM_GET_TOPO_MODULE_INSTANCE_LIST_LENGTH                               \
	((MAX_MODULES_IN_TOPO + 1) * 2 * sizeof(uint32_t))
#define AUD_PROC_BLOCK_SIZE	4096
#define AUD_VOL_BLOCK_SIZE	4096
#define AUDIO_RX_CALIBRATION_SIZE	(AUD_PROC_BLOCK_SIZE + \
@@ -101,12 +103,24 @@ void adm_copp_mfc_cfg(int port_id, int copp_idx, int dst_sample_rate);
int adm_get_params(int port_id, int copp_idx, uint32_t module_id,
		   uint32_t param_id, uint32_t params_length, char *params);

int adm_get_pp_params(int port_id, int copp_idx, uint32_t client_id,
		      struct mem_mapping_hdr *mem_hdr,
		      struct param_hdr_v3 *param_hdr, u8 *returned_param_data);

int adm_send_params_v5(int port_id, int copp_idx, char *params,
			      uint32_t params_length);

int adm_dolby_dap_send_params(int port_id, int copp_idx, char *params,
			      uint32_t params_length);

int adm_set_pp_params(int port_id, int copp_idx,
		      struct mem_mapping_hdr *mem_hdr, u8 *param_data,
		      u32 params_size);

int adm_pack_and_set_one_pp_param(int port_id, int copp_idx,
				  struct param_hdr_v3 param_hdr,
				  u8 *param_data);

int adm_open(int port, int path, int rate, int mode, int topology,
			   int perf_mode, uint16_t bits_per_sample,
			   int app_type, int acdbdev_id);
@@ -157,6 +171,10 @@ int adm_set_downmix_params(int port_id, int copp_idx,
int adm_get_pp_topo_module_list(int port_id, int copp_idx, int32_t param_length,
				char *params);

int adm_get_pp_topo_module_list_v2(int port_id, int copp_idx,
				   int32_t param_length,
				   int32_t *returned_params);

int adm_set_volume(int port_id, int copp_idx, int volume);

int adm_set_softvolume(int port_id, int copp_idx,
@@ -169,6 +187,9 @@ int adm_send_set_multichannel_ec_primary_mic_ch(int port_id, int copp_idx,

int adm_param_enable(int port_id, int copp_idx, int module_id,  int enable);

int adm_param_enable_v2(int port_id, int copp_idx,
			struct module_instance_info mod_inst_info, int enable);

int adm_send_calibration(int port_id, int copp_idx, int path, int perf_mode,
			 int cal_type, char *params, int size);

+11 −0
Original line number Diff line number Diff line
@@ -265,6 +265,17 @@ int q6asm_audio_client_buf_alloc_contiguous(unsigned int dir
int q6asm_audio_client_buf_free_contiguous(unsigned int dir,
			struct audio_client *ac);

int q6asm_set_pp_params(struct audio_client *ac,
			struct mem_mapping_hdr *mem_hdr, u8 *param_data,
			u32 param_size);

int q6asm_pack_and_set_pp_param_in_band(struct audio_client *ac,
					struct param_hdr_v3 param_hdr,
					u8 *param_data);

int q6asm_set_soft_volume_module_instance_ids(int instance,
					      struct param_hdr_v3 *param_hdr);

int q6asm_open_read(struct audio_client *ac, uint32_t format
		/*, uint16_t bits_per_sample*/);

+15 −105
Original line number Diff line number Diff line
@@ -112,31 +112,27 @@ struct lsm_custom_topologies {
	uint32_t buffer_size;
} __packed;

struct lsm_param_size_reserved {
	uint16_t param_size;
	uint16_t reserved;
} __packed;

union lsm_param_size {
	uint32_t param_size;
	struct lsm_param_size_reserved sr;
struct lsm_session_cmd_set_params_v2 {
	struct apr_hdr apr_hdr;
	uint32_t payload_size;
	struct mem_mapping_hdr mem_hdr;
	u32 param_data[0];
} __packed;

struct lsm_param_payload_common {
	uint32_t	module_id;
	uint32_t	param_id;
	union lsm_param_size p_size;
struct lsm_session_cmd_set_params_v3 {
	struct apr_hdr apr_hdr;
	struct mem_mapping_hdr mem_hdr;
	uint32_t payload_size;
	u32 param_data[0];
} __packed;

struct lsm_param_op_mode {
	struct lsm_param_payload_common common;
	uint32_t	minor_version;
	uint16_t	mode;
	uint16_t	reserved;
} __packed;

struct lsm_param_connect_to_port {
	struct lsm_param_payload_common common;
	uint32_t	minor_version;
	/* AFE port id that receives voice wake up data */
	uint16_t	port_id;
@@ -144,20 +140,17 @@ struct lsm_param_connect_to_port {
} __packed;

struct lsm_param_poll_enable {
	struct lsm_param_payload_common common;
	uint32_t	minor_version;
	/* indicates to voice wakeup that HW MAD/SW polling is enabled or not */
	uint32_t	polling_enable;
} __packed;

struct lsm_param_fwk_mode_cfg {
	struct lsm_param_payload_common common;
	uint32_t	minor_version;
	uint32_t	mode;
} __packed;

struct lsm_param_media_fmt {
	struct lsm_param_payload_common common;
	uint32_t	minor_version;
	uint32_t	sample_rate;
	uint16_t	num_channels;
@@ -165,78 +158,23 @@ struct lsm_param_media_fmt {
	uint8_t		channel_mapping[LSM_MAX_NUM_CHANNELS];
} __packed;

/*
 * This param cannot be sent in this format.
 * The actual number of confidence level values
 * need to appended to this param payload.
 */
struct lsm_param_min_confidence_levels {
	struct lsm_param_payload_common common;
struct lsm_param_confidence_levels {
	uint8_t num_confidence_levels;
} __packed;

struct lsm_set_params_hdr {
	uint32_t	data_payload_size;
	uint32_t	data_payload_addr_lsw;
	uint32_t	data_payload_addr_msw;
	uint32_t	mem_map_handle;
} __packed;

struct lsm_cmd_set_params {
	struct apr_hdr  msg_hdr;
	struct lsm_set_params_hdr param_hdr;
} __packed;

struct lsm_cmd_set_params_conf {
	struct apr_hdr  msg_hdr;
	struct lsm_set_params_hdr params_hdr;
	struct lsm_param_min_confidence_levels	conf_payload;
} __packed;

struct lsm_cmd_set_params_opmode {
	struct apr_hdr  msg_hdr;
	struct lsm_set_params_hdr params_hdr;
	struct lsm_param_op_mode op_mode;
} __packed;

struct lsm_cmd_set_connectport {
	struct apr_hdr msg_hdr;
	struct lsm_set_params_hdr params_hdr;
	struct lsm_param_connect_to_port connect_to_port;
} __packed;

struct lsm_cmd_poll_enable {
	struct apr_hdr  msg_hdr;
	struct lsm_set_params_hdr params_hdr;
	struct lsm_param_poll_enable poll_enable;
	uint8_t confidence_levels[0];
} __packed;

struct lsm_param_epd_thres {
	struct lsm_param_payload_common common;
	uint32_t	minor_version;
	uint32_t	epd_begin;
	uint32_t	epd_end;
} __packed;

struct lsm_cmd_set_epd_threshold {
	struct apr_hdr msg_hdr;
	struct lsm_set_params_hdr param_hdr;
	struct lsm_param_epd_thres epd_thres;
} __packed;

struct lsm_param_gain {
	struct lsm_param_payload_common common;
	uint32_t	minor_version;
	uint16_t	gain;
	uint16_t	reserved;
} __packed;

struct lsm_cmd_set_gain {
	struct apr_hdr msg_hdr;
	struct lsm_set_params_hdr param_hdr;
	struct lsm_param_gain lsm_gain;
} __packed;

struct lsm_cmd_reg_snd_model {
	struct apr_hdr	hdr;
	uint32_t	model_size;
@@ -245,31 +183,16 @@ struct lsm_cmd_reg_snd_model {
	uint32_t	mem_map_handle;
} __packed;

struct lsm_lab_enable {
	struct lsm_param_payload_common common;
struct lsm_param_lab_enable {
	uint16_t enable;
	uint16_t reserved;
} __packed;

struct lsm_params_lab_enable {
	struct apr_hdr msg_hdr;
	struct lsm_set_params_hdr params_hdr;
	struct lsm_lab_enable lab_enable;
} __packed;

struct lsm_lab_config {
	struct lsm_param_payload_common common;
struct lsm_param_lab_config {
	uint32_t minor_version;
	uint32_t wake_up_latency_ms;
} __packed;


struct lsm_params_lab_config {
	struct apr_hdr  msg_hdr;
	struct lsm_set_params_hdr params_hdr;
	struct lsm_lab_config lab_config;
} __packed;

struct lsm_cmd_read {
	struct apr_hdr hdr;
	uint32_t buf_addr_lsw;
@@ -291,19 +214,6 @@ struct lsm_cmd_read_done {
	uint32_t flags;
} __packed;

struct lsm_cmd_set_fwk_mode_cfg {
	struct apr_hdr  msg_hdr;
	struct lsm_set_params_hdr params_hdr;
	struct lsm_param_fwk_mode_cfg fwk_mode_cfg;
} __packed;

struct lsm_cmd_set_media_fmt {
	struct apr_hdr  msg_hdr;
	struct lsm_set_params_hdr params_hdr;
	struct lsm_param_media_fmt media_fmt;
} __packed;


struct lsm_client *q6lsm_client_alloc(lsm_app_cb cb, void *priv);
void q6lsm_client_free(struct lsm_client *client);
int q6lsm_open(struct lsm_client *client, uint16_t app_id);
+5 −1
Original line number Diff line number Diff line
/*
 * 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)
Loading