During tsif stress tests it was reported that the dma flush caused by calling action_close() is sometimes unrecoverable. The root cause is stopping the tsif while a read by the dma of the tsif FIFO is in progress. The previous workaround relied on closing the tsif GPIOs to stop incoming data to the tsif, then add a delay to allow the dma to complete all outstanding transactions. A customer still reported seeing the dma issue. The reason the issue was still happening is due to the call of gpio API (request/free) which was done on pins not configured to act as GPIOs. Doing so caused tsif interface not to be closed properly. Per gpio-mux documentation, pins with function configured as non-gpio may suffer from un-expected behavior when calling gpio API, these calls were removed. The delay after closing tsif interface was enlarged to better cope with low bitrate streams. Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org> (cherry picked from commit b18fac5fe2c45d24bcac2bcd3db9bceb98317909) Change-Id: I5115d9cd51bac5a7cd5200731c5dd4eb0d4fc352 Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>