btfmcodec: unblock waiting threads during usecase shutdown

This change notifies waiting thread when usecase shutdown
is triggered and also flush work queues.

Change-Id: If523e806dc23fc256e82c4eac30f7aa79b119f55
This commit is contained in:
Balakrishna Godavarthi
2023-01-27 10:52:49 +05:30
committed by Gerrit - the friendly Code Review server
parent 4a2649332e
commit e7e85692a1
4 changed files with 34 additions and 5 deletions

View File

@@ -255,7 +255,8 @@ int btfmcodec_hwep_shutdown(struct btfmcodec_data *btfmcodec, int id)
} else {
if (*status == BTM_RSP_RECV)
ret = 0;
else if (*status == BTM_FAIL_RESP_RECV)
else if (*status == BTM_FAIL_RESP_RECV ||
*status == BTM_RSP_NOT_RECV_CLIENT_KILLED)
ret = -1;
}
} else {
@@ -489,7 +490,8 @@ static int btfmcodec_configure_master(struct btfmcodec_data *btfmcodec, uint8_t
} else {
if (*status == BTM_RSP_RECV)
return 0;
else if (*status == BTM_FAIL_RESP_RECV)
else if (*status == BTM_FAIL_RESP_RECV ||
*status == BTM_RSP_NOT_RECV_CLIENT_KILLED)
return -1;
}