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

Commit 21f95d94 authored by Haynes Mathew George's avatar Haynes Mathew George
Browse files

ASoC: msm: qdsp6v2: Fix for incorrect topology selection



Fix API used to find topology associated with a particular
COPP instance. It is incorrect to pass the COPP instance ID
as an index into the q6adm COPP state array.

Along with this, fix a typo in DS2 DAP driver.

Change-Id: Ib741deb785b14b4258b46737ed2c9939cb6286e1
CRs-Fixed: 767595
Signed-off-by: default avatarHaynes Mathew George <hgeorge@codeaurora.org>
parent b9e32abd
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ enum {
/* DOLBY device definitions end */
enum {
	DOLBY_OFF_CACHE = 0,
	DOLBY_SPEKAER_CACHE,
	DOLBY_SPEAKER_CACHE,
	DOLBY_HEADPHONE_CACHE,
	DOLBY_HDMI_CACHE,
	DOLBY_WFD_CACHE,
@@ -739,7 +739,7 @@ static int msm_ds2_dap_map_device_to_dolby_cache_devices(int32_t device_id)
		break;
	case EARPIECE:
	case SPEAKER:
		cache_dev = DOLBY_SPEKAER_CACHE;
		cache_dev = DOLBY_SPEAKER_CACHE;
		break;
	case WIRED_HEADSET:
	case WIRED_HEADPHONE:
@@ -1935,6 +1935,8 @@ int msm_ds2_dap_init(int port_id, int copp_idx, int channels,
				(dev_map[i].device_id &
				ds2_dap_params_states.device)) {
				idx = i;
				/* Give priority to headset in case of
				   combo device */
				if (dev_map[i].device_id == SPEAKER)
					continue;
				else
+2 −2
Original line number Diff line number Diff line
@@ -836,7 +836,7 @@ void msm_pcm_routing_dereg_phy_stream(int fedai_id, int stream_type)
								__func__);
				continue;
			}
			topology = adm_get_topology_for_port_from_copp_id(
			topology = adm_get_topology_for_port_copp_idx(
					msm_bedais[i].port_id, idx);
			adm_close(msm_bedais[i].port_id, fdai->perf_mode, idx);
			pr_debug("%s:copp:%ld,idx bit fe:%d,type:%d,be:%d\n",
@@ -5596,7 +5596,7 @@ static int msm_routing_put_device_pp_params_mixer(struct snd_kcontrol *kcontrol,
			if (!test_bit(idx, &copp))
				continue;
			topo_id = adm_get_topology_for_port_copp_idx(port_id,
								     copp);
								     idx);
			if (topo_id != COMPRESSED_PASSTHROUGH_DEFAULT_TOPOLOGY)
				continue;
		pr_debug("%s: port: 0x%x, copp %ld, be active: %d, passt: %d\n",