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

Commit 1ccc8752 authored by Vignesh Kulothungan's avatar Vignesh Kulothungan Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: dsp: Update rtac driver to support Instance ID



Add support to set and get rtac 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: Ic96e83477e72dc5ffa4d87a1e98c34814bbd0b8d
Signed-off-by: default avatarVignesh Kulothungan <vigneshk@codeaurora.org>
parent 85073c04
Loading
Loading
Loading
Loading
+10 −10
Original line number Original line Diff line number Diff line
@@ -2005,10 +2005,10 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv)
			break;
			break;
		}
		}
		case ASM_STREAM_CMD_GET_PP_PARAMS_V2:
		case ASM_STREAM_CMD_GET_PP_PARAMS_V2:
			pr_debug("%s: ASM_STREAM_CMD_GET_PP_PARAMS_V2 session %d opcode 0x%x token 0x%x src %d dest %d\n",
		case ASM_STREAM_CMD_GET_PP_PARAMS_V3:
				__func__, ac->session,
			pr_debug("%s: ASM_STREAM_CMD_GET_PP_PARAMS session %d opcode 0x%x token 0x%x src %d dest %d\n",
				data->opcode, data->token,
				__func__, ac->session, data->opcode,
				data->src_port, data->dest_port);
				data->token, data->src_port, data->dest_port);
			/* Should only come here if there is an APR */
			/* Should only come here if there is an APR */
			/* error or malformed APR packet. Otherwise */
			/* error or malformed APR packet. Otherwise */
			/* response will be returned as */
			/* response will be returned as */
@@ -2085,12 +2085,12 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv)
		break;
		break;
	}
	}
	case ASM_STREAM_CMDRSP_GET_PP_PARAMS_V2:
	case ASM_STREAM_CMDRSP_GET_PP_PARAMS_V2:
		pr_debug("%s: ASM_STREAM_CMDRSP_GET_PP_PARAMS_V2 session %d opcode 0x%x token 0x%x src %d dest %d\n",
	case ASM_STREAM_CMDRSP_GET_PP_PARAMS_V3:
				__func__, ac->session, data->opcode,
		pr_debug("%s: ASM_STREAM_CMDRSP_GET_PP_PARAMS session %d opcode 0x%x token 0x%x src %d dest %d\n",
				data->token,
			__func__, ac->session, data->opcode, data->token,
			data->src_port, data->dest_port);
			data->src_port, data->dest_port);
		if (payload[0] != 0) {
		if (payload[0] != 0) {
			pr_err("%s: ASM_STREAM_CMDRSP_GET_PP_PARAMS_V2 returned error = 0x%x\n",
			pr_err("%s: ASM_STREAM_CMDRSP_GET_PP_PARAMS returned error = 0x%x\n",
			       __func__, payload[0]);
			       __func__, payload[0]);
		} else if (generic_get_data) {
		} else if (generic_get_data) {
			generic_get_data->valid = 1;
			generic_get_data->valid = 1;
+7 −3
Original line number Original line Diff line number Diff line
@@ -7456,6 +7456,7 @@ static int32_t qdsp_cvs_callback(struct apr_client_data *data, void *priv)
							data->payload_size);
							data->payload_size);
				break;
				break;
			case VSS_ICOMMON_CMD_GET_PARAM_V2:
			case VSS_ICOMMON_CMD_GET_PARAM_V2:
			case VSS_ICOMMON_CMD_GET_PARAM_V3:
				pr_debug("%s: VSS_ICOMMON_CMD_GET_PARAM_V2\n",
				pr_debug("%s: VSS_ICOMMON_CMD_GET_PARAM_V2\n",
					 __func__);
					 __func__);
				/* Should only come here if there is an APR */
				/* Should only come here if there is an APR */
@@ -7589,7 +7590,8 @@ static int32_t qdsp_cvs_callback(struct apr_client_data *data, void *priv)
		pr_debug("Recd VSS_ISTREAM_EVT_NOT_READY\n");
		pr_debug("Recd VSS_ISTREAM_EVT_NOT_READY\n");
	} else if (data->opcode == VSS_ISTREAM_EVT_READY) {
	} else if (data->opcode == VSS_ISTREAM_EVT_READY) {
		pr_debug("Recd VSS_ISTREAM_EVT_READY\n");
		pr_debug("Recd VSS_ISTREAM_EVT_READY\n");
	} else if (data->opcode == VSS_ICOMMON_RSP_GET_PARAM) {
	} else if (data->opcode == VSS_ICOMMON_RSP_GET_PARAM ||
		   VSS_ICOMMON_RSP_GET_PARAM_V3) {
		pr_debug("%s: VSS_ICOMMON_RSP_GET_PARAM\n", __func__);
		pr_debug("%s: VSS_ICOMMON_RSP_GET_PARAM\n", __func__);
		ptr = data->payload;
		ptr = data->payload;
		if (ptr[0] != 0) {
		if (ptr[0] != 0) {
@@ -7747,12 +7749,13 @@ static int32_t qdsp_cvp_callback(struct apr_client_data *data, void *priv)
						data->payload_size);
						data->payload_size);
					break;
					break;
				default:
				default:
					pr_debug("%s: invalid token for command VSS_ICOMMON_CMD_SET_PARAM_V2: %d\n",
					pr_debug("%s: invalid token for command VSS_ICOMMON_CMD_SET_PARAM: %d\n",
						__func__, data->token);
						__func__, data->token);
					break;
					break;
				}
				}
				break;
				break;
			case VSS_ICOMMON_CMD_GET_PARAM_V2:
			case VSS_ICOMMON_CMD_GET_PARAM_V2:
			case VSS_ICOMMON_CMD_GET_PARAM_V3:
				pr_debug("%s: VSS_ICOMMON_CMD_GET_PARAM_V2\n",
				pr_debug("%s: VSS_ICOMMON_CMD_GET_PARAM_V2\n",
					 __func__);
					 __func__);
				/* Should only come here if there is an APR */
				/* Should only come here if there is an APR */
@@ -7819,7 +7822,8 @@ static int32_t qdsp_cvp_callback(struct apr_client_data *data, void *priv)
				break;
				break;
			}
			}
		}
		}
	} else if (data->opcode == VSS_ICOMMON_RSP_GET_PARAM) {
	} else if (data->opcode == VSS_ICOMMON_RSP_GET_PARAM ||
		   VSS_ICOMMON_RSP_GET_PARAM_V3) {
		pr_debug("%s: VSS_ICOMMON_RSP_GET_PARAM\n", __func__);
		pr_debug("%s: VSS_ICOMMON_RSP_GET_PARAM\n", __func__);
		ptr = data->payload;
		ptr = data->payload;
		if (ptr[0] != 0) {
		if (ptr[0] != 0) {
+306 −202

File changed.

Preview size limit exceeded, changes collapsed.

+72 −34

File changed.

Preview size limit exceeded, changes collapsed.