Bladeren bron

Merge "dsp: Add param header size based on the instance id support"

qctecmdr 4 jaren geleden
bovenliggende
commit
ab02a0d9c1
1 gewijzigde bestanden met toevoegingen van 7 en 1 verwijderingen
  1. 7 1
      dsp/q6lsm.c

+ 7 - 1
dsp/q6lsm.c

@@ -2526,6 +2526,7 @@ int q6lsm_get_one_param(struct lsm_client *client,
 {
 	struct param_hdr_v3 param_info;
 	int rc = 0;
+	bool iid_supported = q6common_is_instance_id_supported();
 
 	memset(&param_info, 0, sizeof(param_info));
 
@@ -2534,7 +2535,12 @@ int q6lsm_get_one_param(struct lsm_client *client,
 		param_info.module_id = p_info->module_id;
 		param_info.instance_id = p_info->instance_id;
 		param_info.param_id = p_info->param_id;
-		param_info.param_size = p_info->param_size + sizeof(param_info);
+
+		if (iid_supported)
+			param_info.param_size = p_info->param_size + sizeof(struct param_hdr_v3);
+		else
+			param_info.param_size = p_info->param_size + sizeof(struct param_hdr_v2);
+
 		rc = q6lsm_get_params(client, NULL, &param_info);
 		if (rc) {
 			pr_err("%s: LSM_GET_CUSTOM_PARAMS failed, rc %d\n",