mbox series

[v4,0/3] ASoC: rockchip: i2s: switch BCLK to GPIO

Message ID 20220619095324.492678-1-judyhsiao@chromium.org
Headers show
Series ASoC: rockchip: i2s: switch BCLK to GPIO | expand

Message

Judy Hsiao June 19, 2022, 9:53 a.m. UTC
The patches series is to fix the unexpected large DC output
voltage of Max98357a that burns the speakers on the rockchip
platform when BCLK and SD_MODE are ON but LRCLK is OFF.

Changes Since V4:
    -- Fix indentation in the driver. (Align parameters with the parenthesis
       placement.)
    -- Fix incorrect return type of rockchip_snd_rxctrl.
Changes Since V3:
    -- Fix indentation in the documentation.
    -- Put pinctrl-1 right after pinctrl-0 in dtsi.
    -- Fix indentation in the driver.
    -- Remove unnecessary dev_dbg() in the driver.
Changes Since V2:
    -- Add documents of i2s pinctrl-names.
    -- Fix dtsi syntax error.
    -- Include the dtsi change and the driver change in the same series.
    -- Ensure that driver gets both bclk_on and bclk_off states before using them.

Judy Hsiao (3):
  ASoC: rockchip: i2s: switch BCLK to GPIO
  arm64: dts: rk3399: i2s: switch BCLK to GPIO
  ASoC: dt-bindings: rockchip: Document pinctrl-names for i2s

 .../bindings/sound/rockchip-i2s.yaml          |   7 +
 .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi |  10 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi      |  25 ++-
 sound/soc/rockchip/rockchip_i2s.c             | 171 +++++++++++++-----
 4 files changed, 165 insertions(+), 48 deletions(-)

Comments

Mark Brown June 21, 2022, 4:59 p.m. UTC | #1
On Sun, 19 Jun 2022 09:53:21 +0000, Judy Hsiao wrote:
> The patches series is to fix the unexpected large DC output
> voltage of Max98357a that burns the speakers on the rockchip
> platform when BCLK and SD_MODE are ON but LRCLK is OFF.
> 
> Changes Since V4:
>     -- Fix indentation in the driver. (Align parameters with the parenthesis
>        placement.)
>     -- Fix incorrect return type of rockchip_snd_rxctrl.
> Changes Since V3:
>     -- Fix indentation in the documentation.
>     -- Put pinctrl-1 right after pinctrl-0 in dtsi.
>     -- Fix indentation in the driver.
>     -- Remove unnecessary dev_dbg() in the driver.
> Changes Since V2:
>     -- Add documents of i2s pinctrl-names.
>     -- Fix dtsi syntax error.
>     -- Include the dtsi change and the driver change in the same series.
>     -- Ensure that driver gets both bclk_on and bclk_off states before using them.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: rockchip: i2s: switch BCLK to GPIO
      commit: 44f362c2cc6dd0c5e3cb499c4fb4ed45b63a6196
[3/3] ASoC: dt-bindings: rockchip: Document pinctrl-names for i2s
      (no commit info)

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
Chen-Yu Tsai June 21, 2022, 5:58 p.m. UTC | #2
Hi Mark,

On Wed, Jun 22, 2022 at 1:00 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Sun, 19 Jun 2022 09:53:21 +0000, Judy Hsiao wrote:
> > The patches series is to fix the unexpected large DC output
> > voltage of Max98357a that burns the speakers on the rockchip
> > platform when BCLK and SD_MODE are ON but LRCLK is OFF.
> >
> > Changes Since V4:
> >     -- Fix indentation in the driver. (Align parameters with the parenthesis
> >        placement.)
> >     -- Fix incorrect return type of rockchip_snd_rxctrl.
> > Changes Since V3:
> >     -- Fix indentation in the documentation.
> >     -- Put pinctrl-1 right after pinctrl-0 in dtsi.
> >     -- Fix indentation in the driver.
> >     -- Remove unnecessary dev_dbg() in the driver.
> > Changes Since V2:
> >     -- Add documents of i2s pinctrl-names.
> >     -- Fix dtsi syntax error.
> >     -- Include the dtsi change and the driver change in the same series.
> >     -- Ensure that driver gets both bclk_on and bclk_off states before using them.
> >
> > [...]
>
> Applied to
>
>    https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
>
> Thanks!
>
> [1/3] ASoC: rockchip: i2s: switch BCLK to GPIO
>       commit: 44f362c2cc6dd0c5e3cb499c4fb4ed45b63a6196

Seems you applied v1 instead of v4?

Either way, this causes the driver to crash for any I2S node that doesn't
have pinctrl properties set. Notably, the I2S controller that sends audio
to the HDMI controller will never have pinctrl properties, since the
connection is internal.


ChenYu


> [3/3] ASoC: dt-bindings: rockchip: Document pinctrl-names for i2s
>       (no commit info)
>
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
>
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
>
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
>
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
>
> Thanks,
> Mark
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Mark Brown June 22, 2022, 10:52 a.m. UTC | #3
On Wed, Jun 22, 2022 at 02:02:41AM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> On Sun, Jun 19, 2022 at 5:54 PM Judy Hsiao <judyhsiao@chromium.org> wrote:
> >
> > 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

Please delete unneeded context from mails when replying.  Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.