[alsa-devel] [PATCH v2] ASoC: fsl_ssi: Fix channel swap on playback start
Fabio Estevam
festevam at gmail.com
Mon Apr 3 23:53:07 CEST 2017
Hi Caleb,
On Mon, Apr 3, 2017 at 5:32 PM, Caleb Crome <caleb at crome.org> wrote:
> This patch definitely breaks the i.mx6 channel alignment. In fact it
> breaks it so that the channels are never aligned properly.
>
> My test setup is as follows:
> * Get vanilla kernel, tag v4.11-rc5
Thanks for testing.
Just tested 4.11-rc5. It needs this additional patch:
https://patchwork.ozlabs.org/patch/745349/
otherwise pinctrl hog is broken and then sgtl5000 does not probe due
to the lack of MCLK.
I am using the original imx6dl-wandboard.dtb on my tests with no
hardware changes.
The test I am running is simple: just run the following script on the wandboard:
#!/bin/bash
while true
do
aplay swap_test.wav& sleep 1; killall aplay
done
You can get swap_test.wav file that consists of silence in the left
channel and none silence in the right channel from here:
https://www.dropbox.com/s/4zt0jvmtx34ic9x/swap_test.wav?dl=0
Then keep listening the left channel. In about one out of ten times
you will get non-silence there, indicating a swap.
> * apply a couple patches to allow AUD4 on the wandboard external
> connectors (and disable internal audio)
> * Test results: v4.11-rc5 works flawlessly using Arnaud's atest
> program. No channel slips, no issues at all.
> * Apply this patch, recompile, build.
> * Channel alignment fails. The channels never get aligned properly.
>
> Am I right that the *only* change is this one-liner, and ignore the
> previous non V2 version of this patch?
>> - regmap_update_bits(regs, CCSR_SSI_SCR, vals->scr, vals->scr);
>> + regmap_update_bits(regs, CCSR_SSI_SCR,
>> + CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE | CCSR_SSI_SCR_RE,
>> + CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE | CCSR_SSI_SCR_RE);
Yes, with only this change I do not get the swap anymore.
If you have a chance to run this method, please let me know how it goes.
Thanks
More information about the Alsa-devel
mailing list