From: Lars-Peter Clausen <lars@metafoo.de>
To: "Andreas Irestål" <andreas.irestal@axis.com>,
alsa-devel@alsa-project.org
Subject: Re: Can't use adau1361 as i2s master due to bad write ordering
Date: Wed, 3 Feb 2016 17:25:40 +0100 [thread overview]
Message-ID: <56B22A04.1010603@metafoo.de> (raw)
In-Reply-To: <20160203160421.GA21568@lnxandire1.se.axis.com>
On 02/03/2016 05:04 PM, Andreas Irestål wrote:
> I've run into problems using the adau1361 codec (adau1761) as i2s master.
>
> I'm using i2c to set up the codec, and according to the datasheet there
> is an enable bit, which must be set in order to be able to access any
> other register than the first two registers.
>
> This enable bit is set when the codec enters bias level standby,
> however, before entering this bias level, some other registers are
> written which will have no effect due to the inner workings of this
> codec. Oddly enough, it does ack all writes when measuring the i2c bus.
>
> One of these registers is the serial port 0 register, which
> configures the i2s bus. This results in the situation that the CODEC dai
> thinks it is running as i2s slave and the CPU dai thinks too as well,
> and the bus is dead. Since the other register fields does not change
> with our dai configuration, the register never gets physically updated
> by an i2c write.
>
> If I reset/reboot the system, which in our case does not power cycle the
> codec, the i2s bus is correctly set up and everything works as one would
> expect.
>
> So, either the driver behaves incorrectly relying on bias level being
> set before any other registers are written, or the underlying subsystem
> are behaving incorrectly. We're using the simple-card board driver as it
> is sufficient for our needs.
Hi,
Yes, that sounds like a bug in the driver. We probably need to enable the
clock in the probe() function before we do any other register writes.
- Lars
prev parent reply other threads:[~2016-02-03 16:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 16:04 Can't use adau1361 as i2s master due to bad write ordering Andreas Irestål
2016-02-03 16:25 ` Lars-Peter Clausen [this message]
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=56B22A04.1010603@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=andreas.irestal@axis.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.