FROMLIST: ASoC: AMD: Fix capture unstable in beginning for some runs

alsa_conformance_test -C hw:0,4 -p 1024 --debug
would sometime show:
TIME_DIFF(s)    HW_LEVEL       READ              RATE
0.000095970         1024       1024    10670001.041992
0.042609555         1024       2048       24032.168372
0.021330364         1024       3072       48006.681930
0.021339559         1024       4096       47985.996337
The issue is that in dma pointer function we can have stale value
of the register for current descriptor of channel.
The register retains the number of the last descriptor that
was transferred.

Fix ensures that we report position, 0, till the one period worth of
data is transferred.  After one period of data, in handler of period
completion interrupt we update the config and correct value of descriptor
starts reflecting.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>

(am from https://patchwork.kernel.org/patch/10603801/)

BUG=b:113768831
TEST=
multiple runs of
alsa_conformance_test -C hw:0,4 -p 1024 --debug

Change-Id: I1c749491ca11cbda7f035142eabd7347a7ec2294
Reviewed-on: https://chromium-review.googlesource.com/1228453
Commit-Ready: Akshu Agrawal <akshu.agrawal@amd.com>
Tested-by: Akshu Agrawal <akshu.agrawal@amd.com>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
(cherry picked from commit c2ac4fcb0b8175a31803c89104976135b0eebd29)
Reviewed-on: https://chromium-review.googlesource.com/1235097
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Trybot-Ready: Daniel Kurtz <djkurtz@chromium.org>
1 file changed