From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: ASoC cache code (looking toward 2.6.38 merge window)
Date: Mon, 20 Dec 2010 16:34:36 +0000 [thread overview]
Message-ID: <20101220163435.GK26706@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <s5h4oa8zbe4.wl%tiwai@suse.de>
On Mon, Dec 20, 2010 at 04:56:03PM +0100, Takashi Iwai wrote:
> Mark Brown wrote:
> > It wasn't portability, it was specifically the fact that some drivers
> > want to do block operations which means they depend very strongly on the
> > exact memory layout of the cache (obviously this only works for
> > uncompressed caches).
> But this is exactly what hinders the portability :) Which part of
> soc_4_12_spi_read/write specifies that this must be aligned to be BE
> while spi_7_9 to be LE? Why soc_16_16_i2c converts to BE internally
> while soc_16_8_i2c doesn't? I mean, such a difference isn't visible
> in the API level but hard-coded in the implementation although the
> API appears as if it's portable.
They should all be specifying something, quite what they should be
specifying varies - it just comes down to whatever the standard wire
format that the chip vendors have come up with. Mostly if it's not
specified it should be little endian.
It's not really been an issue as pretty much all the CPUs have the same
endianness.
> > There's more potential users than currently have it enabled, it's just
> > that the WM8994 driver is the only driver that turns it on by default
> > right now (several other CODEC drivers should but need testing just to
> > confirm that it's OK). It's only a few kilobytes and Kconfig really
> > isn't good at supporting this sort of selection, I'd worry about the
> > usability issues.
> Well, it drags LZO COMPRESS and DECOMPRESS unconditionally, which I
> feel uneasy. Usually the consumer of such lib stuff has a Kconfig,
> especially the feature can be optional (and in this case it is).
> The necessary change is simple like below. The code that requires a
> compressed cache just needs to select SND_SOC_LZO_CACHE or whatever.
That's one way of doing it, but it does hurt usability.
> It's no urgent issue, yeah. It's just what I feel uneasy to see such
> a thing...
If someone's worried about memory usage in ASoC they'd be much better
going after the strings than this TBH.
> +#ifdef CONFIG_SND_SOC_LZO_CACHE
> + SND_SOC_LZO_COMPRESSION = 2,
> +#endif
> +#ifdef CONFIG_SND_SOC_RBTREE_CACHE
> + SND_SOC_RBTREE_COMPRESSION = 3,
> +#endif
If we were going to make this user selectable we should keep the defines
and then fall back to a flat cache if they're turned off otherwise you
end up having too much faff with Kconfig interdependencies.
> config SND_SOC_WM8994
> tristate
> + select SND_SOC_RBTREE_CACHE
Except the machine driver can override this...
next prev parent reply other threads:[~2010-12-20 16:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 14:50 ASoC cache code (looking toward 2.6.38 merge window) Takashi Iwai
2010-12-20 15:27 ` Mark Brown
2010-12-20 15:56 ` Takashi Iwai
2010-12-20 16:01 ` [PATCH 1/4] ASoC: clean up cache read/write functions Takashi Iwai
2010-12-20 16:01 ` [PATCH 2/4] ASoC: clean up spi " Takashi Iwai
2010-12-20 16:02 ` [PATCH 3/4] ASoC: clean up i2c cache read / write functions Takashi Iwai
2010-12-20 16:05 ` [PATCH 4/4] ASoC: clean up cache accesser Takashi Iwai
2010-12-20 16:27 ` Dimitris Papastamos
2010-12-20 16:47 ` Takashi Iwai
2010-12-20 16:54 ` Mark Brown
2010-12-20 17:09 ` Dimitris Papastamos
2010-12-20 17:22 ` Takashi Iwai
2010-12-20 17:04 ` Dimitris Papastamos
2010-12-20 16:42 ` Mark Brown
2010-12-20 16:57 ` Takashi Iwai
2010-12-20 17:20 ` [PATCH 4/4] ASoC: Factor out cache_ops implementations Takashi Iwai
2010-12-20 17:29 ` [PATCH 2/4] ASoC: clean up spi cache read/write functions Mark Brown
2010-12-20 17:23 ` [PATCH 1/4] ASoC: clean up " Dimitris Papastamos
2010-12-20 17:24 ` Mark Brown
2010-12-20 17:32 ` Takashi Iwai
2010-12-20 16:34 ` Mark Brown [this message]
2010-12-20 16:51 ` ASoC cache code (looking toward 2.6.38 merge window) Takashi Iwai
2010-12-20 16:58 ` Mark Brown
2010-12-20 16:59 ` Takashi Iwai
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=20101220163435.GK26706@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@slimlogic.co.uk \
--cc=tiwai@suse.de \
/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 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.