From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Code Kipper <codekipper@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
devicetree <devicetree@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Andrea Venturi <ennesimamail.av@gmail.com>,
gianfranco@moddevices.com
Subject: Re: [PATCH 2/4] ASoC: sunxi: Add Allwinner A10 Digital Audio driver
Date: Thu, 9 Jun 2016 23:06:21 +0200 [thread overview]
Message-ID: <20160609210621.GJ5242@lukather> (raw)
In-Reply-To: <CAEKpxBmLb27WYqB5SMhKqTw2cTznNEZVJdxEFKkwCY03JsdyVg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]
Hi Markus,
On Thu, Jun 02, 2016 at 10:03:21AM +0200, Code Kipper wrote:
> snip
> > +
> > + /* Always favor the highest oversampling rate */
> > + for (i = (ARRAY_SIZE(sun4i_i2s_oversample_rates) - 1); i >= 0; i--) {
> > + unsigned int oversample_rate = sun4i_i2s_oversample_rates[i];
> > +
> > + bclk_div = sun4i_i2s_get_bclk_div(i2s, oversample_rate,
> > + word_size);
> > + mclk_div = sun4i_i2s_get_mclk_div(i2s, oversample_rate,
> > + clk_rate,
> > + rate);
> > +
> > + if ((bclk_div >= 0) && (mclk_div >= 0))
> > + break;
> > + }
> > +
> > + if (bclk_div < 0 && mclk_div < 0)
>
> this wouldn't work if one of the divs returns a valid value and I saw
> this when working with this driver. Use if ((bclk_div < 0) ||
> (mclk_div < 0)). Rest of the code looks code and I will have a go at
> testing with it ASAP,
Ack, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-06-09 21:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 17:54 [PATCH 0/4] ASoC: sunxi: Add i2s controller support Maxime Ripard
2016-06-01 17:54 ` [PATCH 1/4] dt-bindings: Add A10 I2S controller binding documentation Maxime Ripard
2016-06-02 10:09 ` Mark Brown
2016-06-06 13:08 ` Rob Herring
2016-06-09 17:15 ` Maxime Ripard
2016-06-01 17:54 ` [PATCH 2/4] ASoC: sunxi: Add Allwinner A10 Digital Audio driver Maxime Ripard
2016-06-02 8:03 ` Code Kipper
2016-06-09 21:06 ` Maxime Ripard [this message]
2016-06-02 10:26 ` Mark Brown
2016-06-09 21:05 ` Maxime Ripard
2016-06-10 0:37 ` Mark Brown
2016-06-10 7:36 ` Maxime Ripard
2016-06-01 17:54 ` [PATCH 3/4] ARM: sun7i: Add mod1 clock nodes Maxime Ripard
2016-06-01 17:54 ` [PATCH 4/4] ARM: sun7i: Add DAI nodes Maxime Ripard
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=20160609210621.GJ5242@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=codekipper@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=ennesimamail.av@gmail.com \
--cc=gianfranco@moddevices.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--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