From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Daniel Mack <zonque@gmail.com>
Cc: alsa-devel@alsa-project.org, timur@freescale.com, lrg@ti.com
Subject: Re: [PATCH] ALSA: ASoC: cs4720: use snd_soc_cache_sync()
Date: Tue, 22 Nov 2011 14:02:10 +0000 [thread overview]
Message-ID: <20111122140210.GD6624@sirena.org.uk> (raw)
In-Reply-To: <1321969516-21174-1-git-send-email-zonque@gmail.com>
On Tue, Nov 22, 2011 at 02:45:16PM +0100, Daniel Mack wrote:
> Replace the manual register restore mechanism in cs4270.c and call
> snd_soc_cache_sync() instead. The current is also wrong, as it doesn't
> update the internal cache, leading to cache inconsitency after suspend.
I don't understand why this is a bug fix - the code is writing the
values from the internal cache to the hardware and what's there doesn't
look obviously wrong...
> /* first restore the entire register cache ... */
> - for (reg = CS4270_FIRSTREG; reg <= CS4270_LASTREG; reg++) {
> - u8 val = snd_soc_read(codec, reg);
> -
This reads from the cache.
> - if (i2c_smbus_write_byte_data(i2c_client, reg, val)) {
> - dev_err(codec->dev, "i2c write failed\n");
> - return -EIO;
> - }
This writes the cached value to the hardware.
next prev parent reply other threads:[~2011-11-22 14:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 13:45 [PATCH] ALSA: ASoC: cs4720: use snd_soc_cache_sync() Daniel Mack
2011-11-22 14:02 ` Mark Brown [this message]
2011-11-22 15:23 ` Daniel Mack
2011-11-22 15:35 ` Mark Brown
2011-11-22 15:37 ` Timur Tabi
2011-11-22 15:41 ` Daniel Mack
2011-11-22 15:43 ` Mark Brown
2011-11-22 15:44 ` Daniel Mack
2011-11-22 15:47 ` Timur Tabi
2011-11-22 15:57 ` Daniel Mack
2011-11-22 16:12 ` Timur Tabi
2011-11-22 15:53 ` Mark Brown
2011-11-22 16:04 ` Daniel Mack
2011-11-22 16:08 ` 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=20111122140210.GD6624@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@ti.com \
--cc=timur@freescale.com \
--cc=zonque@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox