From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Ian Lartey <ian@opensource.wolfsonmicro.com>,
Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Subject: Re: [PATCH 9/9] ASoC: codecs: wm8753: Fix register cache incoherency
Date: Fri, 24 Dec 2010 15:50:41 +0000 [thread overview]
Message-ID: <20101224155040.GB16614@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1293198484-1902-10-git-send-email-lars@metafoo.de>
On Fri, Dec 24, 2010 at 02:48:04PM +0100, Lars-Peter Clausen wrote:
> The multi-component patch(commit f0fba2ad1) introduced a generic register cache
> framework. But the wm8753 driver still uses its own register cache for its
So, the actual relevant thing that the multi component patch did was to
introduce a new way of initialising the cache and setting up the pointer
that soc-cache uses to reference it, with some of the drivers being
partially converted.
Since most of the drivers were already using the soc-cache code they
mostly have some initialisation errors, others (like WM8753) weren't
using soc-cache at all and probably shouldn't have been flipped over.
> switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
> case SND_SOC_DAIFMT_I2S:
> - voice |= 0x0002;
> + voice = 0x0002;
> break;
This is more than a straight conversion of the driver - since changes
like this aren't simple substitutions they're much harder to review, if
you want to make changes such as this they should be split out into
separate patches. There's quite a few other bits like this in the
patch, some of which make it pretty confusing.
> - u16 voice, ioctl;
> + u16 voice, ioctl = 0;
Please don't mix variable declarations of initialised and uninitialised
variables like this.
> - wm8753_write(codec, WM8753_PCM, voice);
> - wm8753_write(codec, WM8753_IOCTL, ioctl);
> + snd_soc_write(codec, WM8753_PCM, voice);
> + snd_soc_update_bits(codec, WM8753_IOCTL, 0x00a2, ioctl);
This bit is especially confusing, we've now got a mixture of both
writing the full register and use of update_bits.
> + for (i = 1; i < ARRAY_SIZE(wm8753_reg); i++) {
> + if (i == WM8753_RESET)
> + continue;
> +
If you make the register reset function write the default value of the
reset register you can use the standard cache sync implementation.
next prev parent reply other threads:[~2010-12-24 15:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-24 13:47 [PATCH 0/9] ASoC: codecs: Fix register cache incoherencies Lars-Peter Clausen
2010-12-24 13:47 ` [PATCH 1/9] ASoC: codecs: Remove unused reg_cache fields from device structs Lars-Peter Clausen
2010-12-24 13:47 ` [PATCH 2/9] ASoC: codecs: max98088: Fix register cache incoherency Lars-Peter Clausen
2010-12-24 13:47 ` [PATCH 3/9] ASoC: codecs: wm8523: " Lars-Peter Clausen
2010-12-24 15:59 ` Mark Brown
2010-12-24 13:47 ` [PATCH 4/9] ASoC: codecs: wm8741: " Lars-Peter Clausen
2010-12-24 13:48 ` [PATCH 5/9] ASoC: codecs: wm8904: " Lars-Peter Clausen
2010-12-24 13:48 ` [PATCH 6/9] ASoC: codecs: wm8955: " Lars-Peter Clausen
2010-12-24 13:48 ` [PATCH 7/9] ASoC: codecs: wm8962: " Lars-Peter Clausen
2010-12-24 13:48 ` [PATCH 8/9] ASoC: codecs: wm9090: " Lars-Peter Clausen
2010-12-24 13:48 ` [PATCH 9/9] ASoC: codecs: wm8753: " Lars-Peter Clausen
2010-12-24 15:50 ` Mark Brown [this message]
2010-12-24 14:57 ` [PATCH 0/9] ASoC: codecs: Fix register cache incoherencies Mark Brown
2010-12-24 15:38 ` Lars-Peter Clausen
2010-12-24 16:14 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2010-12-28 20:37 [PATCH 0/9 v2] " Lars-Peter Clausen
2010-12-28 20:38 ` [PATCH 9/9] ASoC: codecs: wm8753: Fix register cache incoherency Lars-Peter Clausen
2010-12-28 23:43 ` Mark Brown
2010-12-28 20:38 ` Lars-Peter Clausen
2010-12-28 23:34 ` 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=20101224155040.GB16614@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=dp@opensource.wolfsonmicro.com \
--cc=ian@opensource.wolfsonmicro.com \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
/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