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

Commit aa5d0fc2 authored by Haynes Mathew George's avatar Haynes Mathew George Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm: qdsp6v2: Open unique COPP port for concurrent ULL streams



Routing driver reuses the same adm for streams with the same
app_type, sample_rate etc. This isn't allowed for ULL streams
as per the DSP interface. We need to open a separate COPP
port for concurrent ULL streams

CRs-Fixed: 2083105
Change-Id: I569b32830145d6dae99449d0bc4148b2f60b101d
Signed-off-by: default avatarHaynes Mathew George <hgeorge@codeaurora.org>
Acked-by: default avatarShiv Maliyappanahalli <smaliyap@codeaurora.org>
parent 03f28c16
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -2364,7 +2364,8 @@ int adm_open(int port_id, int path, int rate, int channel_mode, int topology,
	struct adm_cmd_device_open_v5	open;
	struct adm_cmd_device_open_v6	open_v6;
	int ret = 0;
	int port_idx, copp_idx, flags;
	int port_idx, flags;
	int copp_idx = -1;
	int tmp_port = q6audio_get_port_id(port_id);

	pr_debug("%s:port %#x path:%d rate:%d mode:%d perf_mode:%d,topo_id %d\n",
@@ -2418,8 +2419,17 @@ int adm_open(int port_id, int path, int rate, int channel_mode, int topology,
	    (topology == VPM_TX_DM_RFECNS_COPP_TOPOLOGY))
		rate = 16000;

	copp_idx = adm_get_idx_if_copp_exists(port_idx, topology, perf_mode,
						rate, bit_width, app_type);
	/*
	 * Routing driver reuses the same adm for streams with the same
	 * app_type, sample_rate etc.
	 * This isn't allowed for ULL streams as per the DSP interface
	 */
	if (perf_mode != ULTRA_LOW_LATENCY_PCM_MODE)
		copp_idx = adm_get_idx_if_copp_exists(port_idx, topology,
						      perf_mode,
						      rate, bit_width,
						      app_type);

	if (copp_idx < 0) {
		copp_idx = adm_get_next_available_copp(port_idx);
		if (copp_idx >= MAX_COPPS_PER_PORT) {