OSDN Git Service

ASoC: AMD: Reset bytescount when starting transaction
authorDaniel Kurtz <djkurtz@chromium.org>
Mon, 2 Jul 2018 21:19:51 +0000 (15:19 -0600)
committerMark Brown <broonie@kernel.org>
Tue, 3 Jul 2018 15:15:30 +0000 (16:15 +0100)
commit1a337a1e7885085d224583c766614e5945bde671
tree109a40f420b82740d0ec52cec81790320a00f24c
parent8c6b964eddd2c39a9796899b2be099ece1b6c6ca
ASoC: AMD: Reset bytescount when starting transaction

The pointer() callback gets its value by reading the I2S BYTE_COUNT
register.  This is a 64-bit runnning transaction counter. If a
transaction was aborted in the middle of a sample buffer, the counter will
stop counting on a number divisible by the buffer size.  Since we actually
use it as a pointer into an aligned buffer, however, we do want to ensure
that it always starts at a number divisible by the buffer size when
starting a transaction, hence we reset it whenever starting a transaction.

To accomplish this, it wasn't necessary to zero bytescount at the
termination of each transaction, so remove this unnecessary code.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp-pcm-dma.c