From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/3] ASoC: sun8i-codec: A33 codec fixes
Date: Wed, 8 Nov 2017 16:47:07 +0100 [thread overview]
Message-ID: <20171108154710.16407-1-maxime.ripard@free-electrons.com> (raw)
Hi,
The commit 043b8daa578f ("ASoC: sun4i-i2s: Update global enable with
bitmask") has broken the A33 codec since it's been merged as part as
4.14-rc1.
The reason has been that while that commit was obviously right, one of
its side effect was to clear the bit that would set the I2S controller
in slave mode, effectively forcing it to act as master.
This was actually working by accident since the codec also had its
condition on whether to act as a master or a slave backward, meaning
that even though we were setting the i2s controller as slave and the
codec as master, we were ending up with the exact opposite.
The commit mentionned above (rightfully) broke that combination, and
we ended up with the two devices in slave mode, which obviously didn't
work.
The way to fix that is in two parts. The first one is obviously to
make the codec act as its proper role. However, that's not sufficient
because some logic was missing in the initial driver that was merged
to act as such. Indeed the BCLK divider was never programmed, meaning
that we would generate a BCLK running at the PLL rate, which is way
too fast. The second patch addresses that.
The final fix is here to address an issue that has been there for
quite some time too and would invert the two channels. It appears that
the codec and I2S drivers don't share the same polarity for the LRCK
signal. The fix is quite obvious and is to invert whatever value has
been programmed in ALSA.
All these commits should go as fix in 4.14 if possible, as without
them the audio is completely broken.
Let me know what you think,
Maxime
Maxime Ripard (3):
ASoC: sun8i-codec: Invert Master / Slave condition
ASoC: sun8i-codec: Set the BCLK divider
ASoC: sun8i-codec: Fix left and right channels inversion
sound/soc/sunxi/sun8i-codec.c | 63 +++++++++++++++++++++++++++++++++++++++----
1 file changed, 58 insertions(+), 5 deletions(-)
--
2.14.3
next reply other threads:[~2017-11-08 15:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-08 15:47 Maxime Ripard [this message]
2017-11-08 15:47 ` [PATCH 1/3] ASoC: sun8i-codec: Invert Master / Slave condition Maxime Ripard
2017-11-08 16:22 ` Chen-Yu Tsai
2017-11-08 18:26 ` Applied "ASoC: sun8i-codec: Invert Master / Slave condition" to the asoc tree Mark Brown
2017-11-08 15:47 ` [PATCH 2/3] ASoC: sun8i-codec: Set the BCLK divider Maxime Ripard
2017-11-08 16:22 ` Chen-Yu Tsai
2017-11-08 15:47 ` [PATCH 3/3] ASoC: sun8i-codec: Fix left and right channels inversion Maxime Ripard
2017-11-08 16:25 ` Chen-Yu Tsai
2017-11-08 21:33 ` Applied "ASoC: sun8i-codec: Fix left and right channels inversion" to the asoc tree 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=20171108154710.16407-1-maxime.ripard@free-electrons.com \
--to=maxime.ripard@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.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