ASoC: msm: Unblock and return the write if flush is triggered

Invalidate the write coming during the flush and close operation.
Reset the out_needed to 0 in flush.

Change-Id: I98d7a5c52d7a2470769cd4b7f62819aa05a20065
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Merge "ASoC: msm: Unblock and return the write if flush is triggered"