From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Eric Millbrandt <emillbrandt@dekaresearch.com>
Cc: grant.likely@secretlab.ca, alsa-devel@alsa-project.org,
patch@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH 1/1] Do not write to invalid registers on the wm9712.
Date: Tue, 22 Dec 2009 17:59:27 +0000 [thread overview]
Message-ID: <1261504767.3555.2.camel@odin> (raw)
In-Reply-To: <1261502938-11137-1-git-send-email-emillbrandt@dekaresearch.com>
On Tue, 2009-12-22 at 12:28 -0500, Eric Millbrandt wrote:
> This patch fixes a bug where "virtual" registers were being written to the
> ac97 bus. This was causing unrelated registers to become corrupted (headphone 0x04,
> touchscreen 0x78, etc).
>
> This patch duplicates protection that was included in the wm9713 driver.
>
> Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
> ---
> sound/soc/codecs/wm9712.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
> index 0ac1215..e237bf6 100644
> --- a/sound/soc/codecs/wm9712.c
> +++ b/sound/soc/codecs/wm9712.c
> @@ -463,7 +463,8 @@ static int ac97_write(struct snd_soc_codec *codec, unsigned int reg,
> {
> u16 *cache = codec->reg_cache;
>
> - soc_ac97_ops.write(codec->ac97, reg, val);
> + if (reg < 0x7c)
> + soc_ac97_ops.write(codec->ac97, reg, val);
> reg = reg >> 1;
> if (reg < (ARRAY_SIZE(wm9712_reg)))
> cache[reg] = val;
> --
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
next prev parent reply other threads:[~2009-12-22 17:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-22 17:28 [PATCH 1/1] Do not write to invalid registers on the wm9712 Eric Millbrandt
2009-12-22 17:59 ` Liam Girdwood [this message]
2009-12-22 23:46 ` Mark Brown
2009-12-23 15:00 ` Eric Millbrandt
2009-12-23 15:23 ` 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=1261504767.3555.2.camel@odin \
--to=lrg@slimlogic.co.uk \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=emillbrandt@dekaresearch.com \
--cc=grant.likely@secretlab.ca \
--cc=patch@alsa-project.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