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

Commit 2cf1763f 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: Fix unmap memory command failure"

parents 051a30c6 330ff133
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@
#include <linux/mutex.h>
#include <sound/audio_cal_utils.h>

static int unmap_memory(struct cal_type_data *cal_type,
			struct cal_block_data *cal_block);

size_t get_cal_info_size(int32_t cal_type)
{
@@ -445,17 +447,13 @@ static void destroy_all_cal_blocks(struct cal_type_data *cal_type)
		cal_block = list_entry(ptr,
			struct cal_block_data, list);

		if (cal_type->info.cal_util_callbacks.unmap_cal != NULL) {
			ret = cal_type->info.cal_util_callbacks.
				unmap_cal(cal_type->info.reg.cal_type,
					cal_block);
		ret = unmap_memory(cal_type, cal_block);
		if (ret < 0) {
				pr_err("%s: unmap_cal failed, cal type %d, ret = %d!\n",
			pr_err("%s: unmap_memory failed, cal type %d, ret = %d!\n",
				__func__,
			       cal_type->info.reg.cal_type,
				ret);
		}
		}
		delete_cal_block(cal_block);
		cal_block = NULL;
	}
+12 −0
Original line number Diff line number Diff line
@@ -3182,6 +3182,18 @@ static int adm_unmap_cal_data(int32_t cal_type,
		goto done;
	}

	if (cal_block == NULL) {
		pr_err("%s: Cal block is NULL!\n",
						__func__);
		goto done;
	}

	if (cal_block->map_data.q6map_handle == 0) {
		pr_err("%s: Map handle is NULL, nothing to unmap\n",
				__func__);
		goto done;
	}

	atomic_set(&this_adm.mem_map_handles[cal_index],
		cal_block->map_data.q6map_handle);
	atomic_set(&this_adm.mem_map_index, cal_index);
+11 −0
Original line number Diff line number Diff line
@@ -6051,6 +6051,17 @@ static int afe_unmap_cal_data(int32_t cal_type,
		goto done;
	}

	if (cal_block == NULL) {
		pr_err("%s: Cal block is NULL!\n",
						__func__);
		goto done;
	}

	if (cal_block->map_data.q6map_handle == 0) {
		pr_err("%s: Map handle is NULL, nothing to unmap\n",
				__func__);
		goto done;
	}

	atomic_set(&this_afe.mem_map_cal_handles[cal_index],
		cal_block->map_data.q6map_handle);