From cfb25d103635b9bff644e63b2cf3b316a6242e43 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Thu, 18 Nov 2010 17:27:21 -0800 Subject: [PATCH] Fix issue 3158317. Do not open the input device when opening the input stream but only when the input stream starts. This avoids blocking the thread executing openInputStream() on the pcm input driver mutex while this mutex is constantly acquired and released by the high priority audio input thread. It also allows an app to open an input stream while another thread is recording if it does not use it immediately (useful for voice search and VoIP). Also did some clean up in output and input stream standby logic. Change-Id: I69c82f5833f7a034d828001f87e02745d7683b65