linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH 1/1] ASoC: core: cache index fix
Date: Wed, 3 Aug 2011 18:00:51 +0900	[thread overview]
Message-ID: <20110803090049.GA30782@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <s5hvcufqalz.wl%tiwai@suse.de>

On Wed, Aug 03, 2011 at 08:20:56AM +0200, Takashi Iwai wrote:

> BTW, looking through snd_soc_get_reg_access_index() for *_readable() & 
> co , I wonder what would be the merit of using rbtree if this kind of
> indexed array is present. If the actual value is also kept in that
> array, we can drop the whole complex stuff like rbtree and lzo.

I agree, you may have seen me mentioning that we should just disallow
the use of advanced caches for the register maps with non-zero steps.
There's really very little benefit from them.

> In addition, the default values aren't necessary to be in a flat array
> form at all.  What we need is a copy function to expand the data
> appropriately to reg_def_copy.

Yes, we can do better here.  We do need something that's reasonably easy
to write in source code, though.  I was thinking something like an array
of:

    { reg, value }

might do the trick for the sparse devices.   Ideally all this code is
going to get pushed out into regmap too so other subsystems can use it.

> Or, we can consider dropping the flat reg_def_copy since it's just
> wasteful to keep the flat array for all types unconditionally, but let
> the codec driver provide an iterator and an look-up or such.

The purpose of that is slightly different, the idea is to let us discard
initdata while still being able to reference the defaults at runtime for
CODECs that didn't get instantiated in the system.  In order to allow
the discard to happen we need to take a copy of the defaults table when
we probe the device.

  reply	other threads:[~2011-08-03  9:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 11:38 [PATCH 1/1] ASoC: core: cache index fix Dong Aisheng
2011-08-01 11:51 ` Mark Brown
2011-08-02  8:03   ` Dong Aisheng-B29396
2011-08-02  8:38     ` Mark Brown
2011-08-02  9:41       ` Dong Aisheng-B29396
2011-08-02 10:34         ` [alsa-devel] " Takashi Iwai
2011-08-02 10:55           ` Dong Aisheng-B29396
2011-08-02 11:09             ` Takashi Iwai
2011-08-02 11:15               ` Dong Aisheng-B29396
2011-08-02 12:10                 ` Takashi Iwai
2011-08-02 12:29                   ` Dong Aisheng-B29396
2011-08-02 12:52                     ` Takashi Iwai
2011-08-02 15:48                       ` Mark Brown
2011-08-02 16:13                         ` Takashi Iwai
2011-08-02 16:40                           ` Mark Brown
2011-08-02 18:06                             ` Takashi Iwai
2011-08-03  5:23                               ` Mark Brown
2011-08-03  6:20                                 ` Takashi Iwai
2011-08-03  9:00                                   ` Mark Brown [this message]
2011-08-03  7:03                                 ` Dong Aisheng-B29396
2011-08-03  7:39                             ` Dong Aisheng-B29396
2011-08-03  9:31                               ` Mark Brown
2011-08-03 11:11                                 ` Dong Aisheng-B29396
2011-08-02 12:58           ` Mark Brown
2011-08-02 13:17         ` Dong Aisheng-B29396
2011-08-02 15:27           ` Mark Brown
2011-08-02 16:05         ` Mark Brown
2011-08-02  9:51       ` Wolfram Sang
2011-08-02 10:38         ` [alsa-devel] " Takashi Iwai
2011-08-02 15:29         ` 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=20110803090049.GA30782@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).