mbox series

[0/1] ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode

Message ID 20240529140658.180966-2-matteomartelli3@gmail.com (mailing list archive)
Headers show
Series ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode | expand

Message

Matteo Martelli May 29, 2024, 2 p.m. UTC
I found an issue on the sunxi i2s controller driver while doing some
tests with a Pine64 A64 host board and an external codec (ES8311).
The A64 i2s controller is compatible with the sun8i-h3-i2s driver.
The LRCLK was being inverted when the bus was operated in i2s mode:
normally should be left channel on low LRCLK and right channel on high
LRCLK, but it was the opposite instead.
I noticed this issue due to the playback being addressed on the wrong
codec channel, then confirmed by analyzing the clock signal with a logic
analyzer.

Note that this fix applies for all the i2s controllers compatible with
sun8i-h3-i2s and sun50i-h6-i2s, but I could test it only for the A64.

The issue had likely been introduced in commit dd657eae8164 ("ASoC:
sun4i-i2s: Fix the LRCK polarity") due to a misinterpreted bit in the H3
or H6 User Manual. I suppose that the i2s mode had not been tested at
that time. Can this be confirmed? Otherwise there is something else
going on and this patch should not be applied as is.

Matteo Martelli (1):
  ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode

 sound/soc/sunxi/sun4i-i2s.c | 143 ++++++++++++++++++------------------
 1 file changed, 73 insertions(+), 70 deletions(-)


base-commit: 47d09270d7776e46858a161f94b735640b2fb056

Comments

Mark Brown May 29, 2024, 2:14 p.m. UTC | #1
On Wed, May 29, 2024 at 04:00:14PM +0200, Matteo Martelli wrote:

> I found an issue on the sunxi i2s controller driver while doing some
> tests with a Pine64 A64 host board and an external codec (ES8311).
> The A64 i2s controller is compatible with the sun8i-h3-i2s driver.
> The LRCLK was being inverted when the bus was operated in i2s mode:
> normally should be left channel on low LRCLK and right channel on high
> LRCLK, but it was the opposite instead.

Please don't send cover letters for single patches, if there is anything
that needs saying put it in the changelog of the patch or after the ---
if it's administrative stuff.  This reduces mail volume and ensures that 
any important information is recorded in the changelog rather than being
lost.
Matteo Martelli May 29, 2024, 2:19 p.m. UTC | #2
Mark Brown wrote:
> On Wed, May 29, 2024 at 04:00:14PM +0200, Matteo Martelli wrote:
> 
> > I found an issue on the sunxi i2s controller driver while doing some
> > tests with a Pine64 A64 host board and an external codec (ES8311).
> > The A64 i2s controller is compatible with the sun8i-h3-i2s driver.
> > The LRCLK was being inverted when the bus was operated in i2s mode:
> > normally should be left channel on low LRCLK and right channel on high
> > LRCLK, but it was the opposite instead.
> 
> Please don't send cover letters for single patches, if there is anything
> that needs saying put it in the changelog of the patch or after the ---
> if it's administrative stuff.  This reduces mail volume and ensures that 
> any important information is recorded in the changelog rather than being
> lost. 

All right, sorry for that. Should I resend this patch without cover letter?
Mark Brown May 29, 2024, 2:23 p.m. UTC | #3
On Wed, May 29, 2024 at 04:19:53PM +0200, Matteo Martelli wrote:

> All right, sorry for that. Should I resend this patch without cover letter?

No.