public inbox for linux-sunxi@lists.linux.dev
 help / color / mirror / Atom feed
From: Matteo Martelli <matteomartelli3@gmail.com>
To: "Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>, "Chen-Yu Tsai" <wens@csie.org>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Samuel Holland" <samuel@sholland.org>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Marcus Cooper" <codekipper@gmail.com>,
	"Clément Péron" <peron.clem@gmail.com>
Cc: Matteo Martelli <matteomartelli3@gmail.com>,
	linux-sound@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 0/1] ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode
Date: Wed, 29 May 2024 16:00:14 +0200	[thread overview]
Message-ID: <20240529140658.180966-2-matteomartelli3@gmail.com> (raw)

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
-- 
2.45.1


             reply	other threads:[~2024-05-29 14:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29 14:00 Matteo Martelli [this message]
2024-05-29 14:00 ` [PATCH 1/1] ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode Matteo Martelli
2024-06-06 16:11   ` Maxime Ripard
2024-06-07  8:04     ` Matteo Martelli
2024-06-26 19:04       ` Mark Brown
2024-06-28 16:07         ` Matteo Martelli
2024-07-02 13:42       ` Maxime Ripard
2024-07-02 15:17         ` Matteo Martelli
2024-07-15 14:29           ` Maxime Ripard
2024-07-16  9:27             ` Matteo Martelli
2024-05-29 14:14 ` [PATCH 0/1] " Mark Brown
2024-05-29 14:19   ` Matteo Martelli
2024-05-29 14:23     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240529140658.180966-2-matteomartelli3@gmail.com \
    --to=matteomartelli3@gmail.com \
    --cc=broonie@kernel.org \
    --cc=codekipper@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mripard@kernel.org \
    --cc=perex@perex.cz \
    --cc=peron.clem@gmail.com \
    --cc=samuel@sholland.org \
    --cc=tiwai@suse.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox