OSDN Git Service

ASoC: wm_adsp: Simplify handling of alg offset and length
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 20 Jun 2018 10:56:21 +0000 (11:56 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 20 Jun 2018 11:18:12 +0000 (12:18 +0100)
commit7f7cca08abf4c6c58ff1037cff5beec5a10a7da3
tree5c424bc483d29e451e312d69eeb4073191bb01fa
parent244e293690a6e07cbdfa11af1977488d91931eed
ASoC: wm_adsp: Simplify handling of alg offset and length

The current code that reads the algorithm list from the DSP is
somewhat unclear, it converts directly from bytes to registers using
a hard coded divide by 2. Most offsets are usually handled in DSP
words within the driver and there is a function specifically for
converting from words to register addresses. So update the handling
to use these. This also removes the assumption that the registers
are 16-bit word addressed, which will no longer be true on some of
our newer parts.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm_adsp.c