audio: fix crash when starting capture

When starting capture, we check if a playback stream is active with an
incompatible sampling rate and if yes force this stream in standby.
The output stream lock is acquired while requesting standby. The problem
is that this stream is referenced by adev->active_out which is cleared by
do_output_standby() and a crash occurs when releasing the lock.

The same problem is present when starting a playback stream and a capture
stream is active.

Change-Id: I72ce058308371199655e3b2e1cfc0529328555ec
1 file changed