msm: 8660: audio: Fix the silence issue in middle of DTS playback.

-Problem: When playing ac3, dts clips, observe the
content is missing in middle of playback and observe
silence. For DTS type-I and ac3 short clips issue is
easily seen.
-Cause: Currently ping-pong buffers are used in
lpa_if_hdmi driver. Incase of small period size
DMA has a chance to quickly complete the traverse
of ping-pong buffers and come back to start buffer
again before it is written back again by CPU.
This is resulting in stale data or corrupted data
being read by DMA and resulting in silence playback
incase of DTS, repeat of content in case
of Ac3 shorter clips.
-Fix: Increase number of periods to six instead of
two for DTS type-I, and four for others.This minimises
the chance of DMA reading the stale data as it takes
more time to comeback to same old position of data it
read earlier, by which time CPU able to write new data
at that position and issue is not seen.

Change-Id: I0bbac6bc2a12128699f844d22e86fe008b3abd2f
CRs-Fixed: 318781, 317978
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
1 file changed