]> 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)
commitf86da848f6368673c0753f2a183b388a027d0a6c
treeee1c2f6a4829b6061d19659227375efdf0c60abb
parent1d126017d597c20843d75953431b79388d30b524
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 9c1c4cd41c041 ("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