]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: pxa-ssp: allow more flexible setup order
authorDaniel Mack <daniel@zonque.org>
Mon, 21 May 2018 21:50:16 +0000 (23:50 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 22 May 2018 10:57:16 +0000 (11:57 +0100)
commitb0d8a1ee1afdee8ffa0d982d65632f021ad392f4
treeee1c2f6a4829b6061d19659227375efdf0c60abb
parentfd4a86002f7b00a2d4256aa0527f3f114ca60534
ASoC: pxa-ssp: allow more flexible setup order

The pxa-ssp driver currently assumes that .set_fmt() is called before
.set_clkdiv(), .set_pll() etc.

Commit cbd31090bca2d ("ASoC: raumfeld: Use static DAI format setup") broke
support for Raumfeld hardware (and possible other PXA based ones) because
it effectively changed the order of these calls. Also, as the call to
.set_fmt() is now done at probe time, the port clock is not yet enabled.

To fix this, strip all hardware register access code from the .set_fmt()
callback and memorize the desired value, so we can use it from the
.hw_params() callback. Also make the .set_fmt() callback less destructive
by reading all registers that it writes to in the beginning and only
masking out the bits that it possibly fiddles with.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/pxa/pxa-ssp.c