* question on dapm_reg_event()
@ 2010-01-05 2:10 Haojian Zhuang
2010-01-06 14:53 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Haojian Zhuang @ 2010-01-05 2:10 UTC (permalink / raw)
To: alsa-devel
Hi all,
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?
Thanks
Haojian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: question on dapm_reg_event()
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
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2010-01-06 14:53 UTC (permalink / raw)
To: Haojian Zhuang; +Cc: alsa-devel
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: question on dapm_reg_event()
2010-01-06 14:53 ` Mark Brown
@ 2010-01-06 15:48 ` Jarkko Nikula
2010-01-06 15:59 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Jarkko Nikula @ 2010-01-06 15:48 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Haojian Zhuang
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: question on dapm_reg_event()
2010-01-06 15:48 ` Jarkko Nikula
@ 2010-01-06 15:59 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2010-01-06 15:59 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: alsa-devel, Haojian Zhuang
On Wed, Jan 06, 2010 at 05:48:59PM +0200, Jarkko Nikula wrote:
> Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> > 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.
Ah, you're using some of the shared fields that the generic widget
handling code then tries to interpret itself. It'd probably be less
surprising to special case this widget in the generic code (as we do in
a few other cases, like the PGA ramping).
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-06 15:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-01-06 15:59 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.