hal: protect in pcm handle for multithreading cases.

During mmap record usecase, if SSR is triggered
it causes in pcm device to be put in standby thereby
closing the pcm device. During same time if get mmap
position is queried from another thread it can use already
freed in->pcm device causing crash.

Fix this by protecting with in lock.

Change-Id: I489279138d5f6f1c90c5549c72c61852623b2768
1 file changed