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

Commit 6acd3d68 authored by Gopikrishnaiah Anandan's avatar Gopikrishnaiah Anandan
Browse files

ASoC: msm: qdsp6v2: Reset the calibration index



Proxy port is used in audio usecases like wifi display, usb headset
playback.Memory map handle for proxy port was not cached  since the
calibration index was not cleared after DSP responded to calibration
memory map command which resulted in audio mute for wifi display/usb
headset playback usecases.
Change clears the calibration index once a response for calibration
memory map is received.This change will ensure that proxy port memory map
handle is cached which resolves the audio mute issue.

CRs-fixed: 669389
Change-Id: I43c76d472daa9e539168f198969be36af5a0a10c
Signed-off-by: default avatarGopikrishnaiah Anandan <agopik@codeaurora.org>
parent 65c7182d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -669,6 +669,7 @@ static void remap_cal_data(struct cal_block_data *cal_block, int cal_index)
		atomic_set(&this_afe.mem_map_cal_index, cal_index);
		ret = afe_cmd_memory_map(cal_block->cal_data.paddr,
				cal_block->map_data.map_size);
		atomic_set(&this_afe.mem_map_cal_index, -1);
		if (ret < 0) {
			pr_err("%s: mmap did not work! addr = 0x%pa, size = %zd\n",
				__func__,
@@ -3959,6 +3960,7 @@ static int afe_map_cal_data(int32_t cal_type,
	atomic_set(&this_afe.mem_map_cal_index, cal_index);
	ret = afe_cmd_memory_map(cal_block->cal_data.paddr,
			cal_block->map_data.map_size);
	atomic_set(&this_afe.mem_map_cal_index, -1);
	if (ret < 0) {
		pr_err("%s: mmap did not work! addr = 0x%pa, size = %zd\n",
			__func__,
@@ -3992,6 +3994,7 @@ static int afe_unmap_cal_data(int32_t cal_type,
	atomic_set(&this_afe.mem_map_cal_index, cal_index);
	ret = afe_cmd_memory_unmap_nowait(
		cal_block->map_data.q6map_handle);
	atomic_set(&this_afe.mem_map_cal_index, -1);
	if (ret < 0) {
		pr_err("%s: unmap did not work! cal_type %i\n",
			__func__, cal_index);