audio: fix deadlock with echo reference access

There is a problem with mutex acquisition order when removing or
adding an echo reference from do_input_standby_l() or start_input_stream():
the output stream mutex is acquired after the audio device mutex creating
a potential cross deadlock as the required order is output stream mutex
then audio device mutex.

Bug: 17830596.
Change-Id: I465f4eeb1f1f2e76d6cc3d685d96e4758c6bc473
2 files changed