Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1628477
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Arnd Bergmann <arnd@arndb.de> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] ASoC: codec: wm8960: Relax bit clock computation when using PLL |
| Date | Fri, 21 Apr 2017 20:50:01 +0200 |
| Message-ID | <tyLMZ-Pg-1@gated-at.bofh.it> (permalink) |
| References | <tyLtF-Ix-41@gated-at.bofh.it> <tyLMZ-Pg-3@gated-at.bofh.it> |
| X-Original-To | Daniel Baluta <daniel.baluta@nxp.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ZT9hLoZz8/XVG7/VoEW4XgD9YhEvM15N4XJB1rmd7j4=; b=eg91cemKZDasXqDRqS2iCurDacO5pCd77gkYQRhRimrigAwTTUdgYA8ejxVial3JMs wsxtGAaGtf+OI5/4Q9uFZo1aMoUG3uWF53YJ9VahG+kEUJr5h7hgWW+TLEiWf51R2tqS xIkD1wb96p14p78HTIsodsVH7GXLTX+oQPWY4JnHDjvNyvn8FQg3j0xl0qdugThi6YdR mAgFvslXfHX5ZLqJ5lFh9q6paInr53BPeq+3GAoIRHq6Zv6E7c4qxAgLzu+5q0MFV/PW A0mJMAJT3TVNRxwxJyNUCV1AKmslkKZPqCrDcrB2dMts7gJ4abw3Rr7QrcXD4G1U4659 VIYQ== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ZT9hLoZz8/XVG7/VoEW4XgD9YhEvM15N4XJB1rmd7j4=; b=iJ6Wot+9a8URIF8wYd+G15IkJiO75hJCYs8DzJGluoM5JRe92bhudd38ROWjmTe5uf 9TDfQzPdygzA2e/nARB3JdgJNeqiioLfTLSggny8kRihzBInRM7G36zykXiQb7LNXa61 7n2UvFgi1eSPQ8WrBwpBAt25nc8duMXXIUOSIkDHAk+aJ52Zm6xE6zlmzceoVPuBILDP eo9dqk4tHbtcSraJ/d3vFExdGzJ0u1rAKt65R15XKj6XGo1s7Xr1I1K7y9/8Dh/fmSp9 aRyS2LYab2L2PCQK8TP8NcHsGY6Rcm08wiZeIA6O31A03F4qVKz94LgAyIGWkVw/Y8ka 1tZg== |
| X-Gm-Message-State | AN3rC/5czRA/w2eeOJKo3hMOWPZmVhH7o56UnVi+Nppe10aJFBvixE6G ziLiKWVGWHUj5BozCDrjBMhWDyz90F+q |
| X-Received | by 10.157.43.82 with SMTP id f18mr8734912otd.226.1492785865645; Fri, 21 Apr 2017 07:44:25 -0700 (PDT) |
| MIME-Version | 1.0 |
| X-Google-Sender-Auth | VSupbpYtNQyeTAldaXV2pIwRwfc |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 35 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Mark Brown <broonie@kernel.org>, tiwai@suse.com, Charles Keepax <ckeepax@opensource.wolfsonmicro.com>, Liam Girdwood <lgirdwood@gmail.com>, patches@opensource.wolfsonmicro.com, alsa-devel@alsa-project.org, Linux Kernel Mailing List <linux-kernel@vger.kernel.org> |
| X-Original-Date | Fri, 21 Apr 2017 16:44:25 +0200 |
| X-Original-Message-ID | <CAK8P3a3n-pzaPkyximnW8kt8HXS=gjtGtf_j=at-1Ea=gbkD-A@mail.gmail.com> |
| X-Original-References | <1492780055-4892-1-git-send-email-daniel.baluta@nxp.com> <1492780055-4892-3-git-send-email-daniel.baluta@nxp.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1628477 |
Show key headers only | View raw
On Fri, Apr 21, 2017 at 3:07 PM, Daniel Baluta <daniel.baluta@nxp.com> wrote:
> Bitclk is derived from sysclk using bclk_divs.
> Sysclk can be derived in two ways:
> (1) directly from MLCK
> (2) MCLK via PLL
>
> Commit 3c01b9ee2ab9d0d ("ASoC: codec: wm8960: Relax bit clock
> computation")
> relaxed bitclk computation when sysclk is directly derived from MCLK.
>
> Lets do the same thing when sysclk is derived via PLL.
>
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
> Here, I forced the following harmless initialization:
>
> *sysclk_idx = *dac_idx = *bclk_idx = -1;
>
> otherwise I would trigger a gcc false positive warning:
>
> sound/soc/codecs/wm8960.c: In function 'wm8960_configure_clocking':
> sound/soc/codecs/wm8960.c:810:46: warning: 'j' may be used uninitialized
> in this function [-Wmaybe-uninitialized]
> snd_soc_update_bits(codec, WM8960_CLOCK1, 0x7 << 6, j << 6);
> ~~^~~~
> sound/soc/codecs/wm8960.c:806:44: warning: 'i' may be used uninitialized
> in this function [-Wmaybe-uninitialized]
> snd_soc_update_bits(codec, WM8960_CLOCK1, 3 << 1, i << 1);
> ~~^~~~
I saw the same warning earlier, but it was gone after the rework
I posted the other day. Please try if that works for you as well, I think
that would be better than a bogus initialization.
Arnd
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 2/2] ASoC: codec: wm8960: Relax bit clock computation when using PLL Arnd Bergmann <arnd@arndb.de> - 2017-04-21 20:50 +0200
csiph-web