OSDN Git Service

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>
Fri, 24 Jun 2022 15:21:52 +0000 (16:21 +0100)
commita5450aba737dae3ee1a64b282e609d8375d6700c
treef6b632b462b5a4d02f213842e260faf3a897200a
parent391153522d186f19a008d824bb3a05950351ce6c
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