alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: alsa-devel@alsa-project.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH] ASoC: Avoid recalculating the bitmask for SOC_ENUM controls
Date: Fri, 14 Sep 2012 15:10:56 +0300	[thread overview]
Message-ID: <50531ED0.3090005@ti.com> (raw)
In-Reply-To: <1347623847-25287-1-git-send-email-lars@metafoo.de>

On 09/14/2012 02:57 PM, Lars-Peter Clausen wrote:
> For ENUM controls the bitmask is calculated based on the number of items.
> Currently this is done each time the control is accessed. And while the
> performance impact of this should be negligible we can easily do better. The
> roundup_pow_of_two macro performs the same calculation which is currently done
> manually, but it is also possible to use this macro with compile time constants
> and so it can be used to initialize static data. So we can use it to initialize
> the mask field of a ENUM control during its declaration.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  include/sound/soc.h        |    4 +++-
>  sound/soc/codecs/twl4030.c |    8 +++-----
>  sound/soc/soc-core.c       |   16 ++++++----------
>  sound/soc/soc-dapm.c       |   22 ++++++++--------------
>  4 files changed, 20 insertions(+), 30 deletions(-)

Looks good, for the twl4030 part:
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

  reply	other threads:[~2012-09-14 12:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 11:57 [PATCH] ASoC: Avoid recalculating the bitmask for SOC_ENUM controls Lars-Peter Clausen
2012-09-14 12:10 ` Peter Ujfalusi [this message]
2012-09-19  2:51 ` 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=50531ED0.3090005@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lars@metafoo.de \
    --cc=lrg@ti.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;
as well as URLs for NNTP newsgroup(s).