Merge "mm-audio: Avoid command thread loop if omx component is stopped" into audio-userspace.lnx.2.1-dev
diff --git a/mm-audio/aenc-aac/qdsp6/src/aenc_svr.c b/mm-audio/aenc-aac/qdsp6/src/aenc_svr.c
index 9a8448a..53e371e 100644
--- a/mm-audio/aenc-aac/qdsp6/src/aenc_svr.c
+++ b/mm-audio/aenc-aac/qdsp6/src/aenc_svr.c
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, The Linux Foundation. All rights reserved.
+Copyright (c) 2010, 2016, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -189,6 +189,7 @@
 
 void omx_aac_thread_stop(struct aac_ipc_info *aac_info) {
     DEBUG_DETAIL("%s stop server\n", __FUNCTION__);
+    aac_info->dead = 1;
     close(aac_info->pipe_in);
     close(aac_info->pipe_out);
     pthread_join(aac_info->thr,NULL);
diff --git a/mm-audio/aenc-amrnb/qdsp6/src/aenc_svr.c b/mm-audio/aenc-amrnb/qdsp6/src/aenc_svr.c
index dea7c7f..f283c32 100644
--- a/mm-audio/aenc-amrnb/qdsp6/src/aenc_svr.c
+++ b/mm-audio/aenc-amrnb/qdsp6/src/aenc_svr.c
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, The Linux Foundation. All rights reserved.
+Copyright (c) 2010, 2016, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -189,6 +189,7 @@
 
 void omx_amr_thread_stop(struct amr_ipc_info *amr_info) {
     DEBUG_DETAIL("%s stop server\n", __FUNCTION__);
+    amr_info->dead = 1;
     close(amr_info->pipe_in);
     close(amr_info->pipe_out);
     pthread_join(amr_info->thr,NULL);
diff --git a/mm-audio/aenc-evrc/qdsp6/src/aenc_svr.c b/mm-audio/aenc-evrc/qdsp6/src/aenc_svr.c
index 4f828fc..feda0a5 100644
--- a/mm-audio/aenc-evrc/qdsp6/src/aenc_svr.c
+++ b/mm-audio/aenc-evrc/qdsp6/src/aenc_svr.c
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, The Linux Foundation. All rights reserved.
+Copyright (c) 2010, 2016, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -189,6 +189,7 @@
 
 void omx_evrc_thread_stop(struct evrc_ipc_info *evrc_info) {
     DEBUG_DETAIL("%s stop server\n", __FUNCTION__);
+    evrc_info->dead = 1;
     close(evrc_info->pipe_in);
     close(evrc_info->pipe_out);
     pthread_join(evrc_info->thr,NULL);
diff --git a/mm-audio/aenc-qcelp13/qdsp6/src/aenc_svr.c b/mm-audio/aenc-qcelp13/qdsp6/src/aenc_svr.c
index bdc96ac..6304918 100644
--- a/mm-audio/aenc-qcelp13/qdsp6/src/aenc_svr.c
+++ b/mm-audio/aenc-qcelp13/qdsp6/src/aenc_svr.c
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------------
-Copyright (c) 2010, The Linux Foundation. All rights reserved.
+Copyright (c) 2010, 2016, The Linux Foundation. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -191,6 +191,7 @@
 
 void omx_qcelp13_thread_stop(struct qcelp13_ipc_info *qcelp13_info) {
     DEBUG_DETAIL("%s stop server\n", __FUNCTION__);
+    qcelp13_info->dead = 1;
     close(qcelp13_info->pipe_in);
     close(qcelp13_info->pipe_out);
     pthread_join(qcelp13_info->thr,NULL);