Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1418664

Re: [PATCH 2/4] ASoC: sunxi: Add Allwinner A10 Digital Audio driver

From Maxime Ripard <maxime.ripard@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/4] ASoC: sunxi: Add Allwinner A10 Digital Audio driver
Date 2016-06-09 23:10 +0200
Message-ID <rIfnc-3pv-53@gated-at.bofh.it> (permalink)
References <rFiAV-3aE-3@gated-at.bofh.it> <rFiAV-3aE-13@gated-at.bofh.it> <rFvRw-3oj-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/4] ASoC: sunxi: Add Allwinner A10 Digital Audio driver Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-06-01 20:00 +0200
  Re: [PATCH 2/4] ASoC: sunxi: Add Allwinner A10 Digital Audio driver Code Kipper <codekipper@gmail.com> - 2016-06-02 10:10 +0200
    Re: [PATCH 2/4] ASoC: sunxi: Add Allwinner A10 Digital Audio driver Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-06-09 23:10 +0200
  Re: [PATCH 2/4] ASoC: sunxi: Add Allwinner A10 Digital Audio driver Mark Brown <broonie@kernel.org> - 2016-06-02 12:30 +0200
    Re: [PATCH 2/4] ASoC: sunxi: Add Allwinner A10 Digital Audio driver Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-06-09 23:10 +0200
      Re: [PATCH 2/4] ASoC: sunxi: Add Allwinner A10 Digital Audio driver Mark Brown <broonie@kernel.org> - 2016-06-10 02:40 +0200
        Re: [PATCH 2/4] ASoC: sunxi: Add Allwinner A10 Digital Audio driver Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-06-10 09:40 +0200

csiph-web