OSDN Git Service

ASoC: rockchip: i2s: switch BCLK to GPIO
authorJudy Hsiao <judyhsiao@chromium.org>
Sun, 19 Jun 2022 09:53:22 +0000 (09:53 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 21 Jun 2022 14:58:06 +0000 (15:58 +0100)
commit8c77cf26a82e751ce827614664faf40243058d5d
tree4b0df99a433150478ae90ac314c297bc6917ba1e
parent289a3ec0b5b9a2de6fc75633aa81f017792ecc99
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>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20220619095324.492678-2-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rockchip_i2s.c