msm: audio: qdsp5: Add timeout for read call of pcm in driver

Any unexpected events such as sdcard removal can delay the
reading of recorded packets and results in pcm driver running
out of frame buffers. But read calls of application gets blocked
for such unknown or abrupt errors.

Add timeout of two seconds for read call in pcm in driver to avoid
application getting blocked on driver read calls in any error cases
which can result in improper application behavior.

Signed-off-by: Manish Dewangan <manish@codeaurora.org>
1 file changed