[alsa-devel] [PATCH v2] ASoC: fsl_ssi: Fix channel swap on playback start

Fabio Estevam festevam at gmail.com
Tue Apr 4 22:28:53 CEST 2017


On Tue, Apr 4, 2017 at 5:09 PM, Arnaud Mouiche
<arnaud.mouiche at invoxia.com> wrote:

> SCR bit 3 (NET) is also set, so you should be in network mode with a long
> frame sync.
> In fact, you can entirely simulate a I2S behavior using Network mode. you
> should just be careful about the way everything is configured (eg. place of
> samples in the stream)

While debugging this issue I noticed that when I put the oscilloscope
probe in the LRCLK SGTL5000 pin the swap did not occur anymore.

After removing the probe the swap occurred frequently.

So decided to change the SGTL5000 LRCLK pin strength value:

--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1118,7 +1118,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
                        SGTL5000_DAC_MUTE_RIGHT |
                        SGTL5000_DAC_MUTE_LEFT);

-       snd_soc_write(codec, SGTL5000_CHIP_PAD_STRENGTH, 0x015f);
+       snd_soc_write(codec, SGTL5000_CHIP_PAD_STRENGTH, 0x035f);

        snd_soc_write(codec, SGTL5000_CHIP_ANA_CTRL,
                        SGTL5000_HP_ZCD_EN |

and the swap does not happen.

So it seems that no change is needed on the imx-ssi side :-)


More information about the Alsa-devel mailing list