Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jhnikula@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Haojian Zhuang <haojian.zhuang@gmail.com>
Subject: Re: question on dapm_reg_event()
Date: Wed, 6 Jan 2010 17:48:59 +0200	[thread overview]
Message-ID: <20100106174859.227f1cd8.jhnikula@gmail.com> (raw)
In-Reply-To: <20100106145321.GC5783@sirena.org.uk>

On Wed, 6 Jan 2010 14:53:22 +0000
Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:

> On Mon, Jan 04, 2010 at 09:10:27PM -0500, Haojian Zhuang wrote:
> 
> > I just have a question on dapm code. In dapm_reg_event(), -(w->reg +
> > 1) is input parameter of snd_soc_update_bits(). Why we need to use
> > negative value as input parameter at here? Why do we not use w->reg at
> > here?
> 
> Hrm, no, that's not at all clear to me either.  CCing Jarkko who
> contributed the register write control originally.

IIRC, there were some reason to avoid register update by the
dapm_update_bits and negative register value was used to prevent it.

Reg+1 makes sure that the value is negative also for register 0.


-- 
Jarkko

  reply	other threads:[~2010-01-06 15:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-05  2:10 question on dapm_reg_event() Haojian Zhuang
2010-01-06 14:53 ` Mark Brown
2010-01-06 15:48   ` Jarkko Nikula [this message]
2010-01-06 15:59     ` 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=20100106174859.227f1cd8.jhnikula@gmail.com \
    --to=jhnikula@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=haojian.zhuang@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