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

Commit 4315848f authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "dsp: Unload the BT modules when APR handle is NULL"

parents db9fc7ab 3ab64ab2
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -887,6 +887,19 @@ static int32_t afe_callback(struct apr_client_data *data, void *priv)
		mutex_lock(&this_afe.afe_cmd_lock);
		for (i = 0; i < AFE_LPASS_CORE_HW_VOTE_MAX; i++)
			this_afe.lpass_hw_core_client_hdl[i] = 0;

		/*
		 * Free the port mapping structures used for AVCS module
		 * load/unload.
		 */
		for (i = 0; i < MAX_ALLOWED_USE_CASES; i++) {
		    if (pm[i]) {
			kfree(pm[i]->payload);
			pm[i]->payload = NULL;
			kfree(pm[i]);
			pm[i] = NULL;
		    }
		}
		mutex_unlock(&this_afe.afe_cmd_lock);

		/*