]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rockchip: i2s: switch BCLK to GPIO
authorJudy Hsiao <judyhsiao@chromium.org>
Wed, 15 Jun 2022 04:56:43 +0000 (04:56 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 20 Jun 2022 10:35:40 +0000 (11:35 +0100)
commit335601b325f7940d4994d27a72a8e3eb21749ebb
treef6b632b462b5a4d02f213842e260faf3a897200a
parentdf6ca95b108ace6d0f798b7fe7127c16aaf402b2
ASoC: rockchip: i2s: switch BCLK to GPIO

We discoverd that the state of BCLK on, LRCLK off and SD_MODE on
may cause the speaker melting issue. Removing LRCLK while BCLK
is present can cause unexpected output behavior including a large
DC output voltage as described in the Max98357a datasheet.

In order to:
  1. prevent BCLK from turning on by other component.
  2. keep BCLK and LRCLK being present at the same time

This patch switches BCLK to GPIO func before LRCLK output, and
configures BCLK func back during LRCLK is output.

Without this fix, BCLK is turned on 11 ms earlier than LRCK by the
da7219.
With this fix, BCLK is turned on only 0.4 ms earlier than LRCK by
the rockchip codec.

Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Link: https://lore.kernel.org/r/20220615045643.3137287-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rockchip_i2s.c