]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: bcm2835: Support left/right justified and DSP modes
authorMatthias Reichl <hias@horus.com>
Wed, 8 Nov 2017 20:03:30 +0000 (21:03 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 10 Nov 2017 21:26:07 +0000 (21:26 +0000)
commit9dc3c064d3fbde8e5ede59db167f9a651533f3f7
treed7382df4973dbc730256509cd157941a1e67eede
parent37a9eb0b822622d749c3c465aa8043d982825693
ASoC: bcm2835: Support left/right justified and DSP modes

DSP modes and left/right justified modes can be supported
on bcm2835 by configuring the frame sync polarity and
frame sync length registers and by adjusting the
channel data position registers.

Clock and frame sync polarity handling in hw_params has
been refactored to make the interaction between logical
rising/falling edge frame start and physical configuration
(changed by normal/inverted polarity modes) clearer.

Modes where the first active data bit is transmitted immediately
after frame start (eg DSP mode B with slot 0 active)
only work reliable if bcm2835 is configured as frame master.
In frame slave mode channel swap (or shift, this isn't quite
clear yet) can occur.

Currently the driver only warns if an unstable configuration
is detected but doensn't prevent using them.

Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/bcm/bcm2835-i2s.c