• Judy Hsiao's avatar
    ASoC: rockchip: i2s: switch BCLK to GPIO · a5450aba
    Judy Hsiao authored
    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: default avatarJudy Hsiao <judyhsiao@chromium.org>
    Link: https://lore.kernel.org/r/20220615045643.3137287-1-judyhsiao@chromium.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    a5450aba
rockchip_i2s.c 21.1 KB