diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-12-21 12:19:56 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-12-21 18:17:18 -0500 |
commit | 68d44ee0bc70be30ea1ee936e6e21082193386cf (patch) | |
tree | f3b71694f3d9a6bf6a74b5ef3d3c0b6192c6287f /sound/soc/soc-cache.c | |
parent | be4fcddd17f01ede0ff46cf86c5ab8c5adb37175 (diff) |
ASoC: Make LZO cache compression optional
Make LZO cache compression optional as it pulls in the kernel wide LZO
implementation and rbtree compression is generally more efficient for
typical register maps, especially in terms of CPU performance.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/soc-cache.c')
-rw-r--r-- | sound/soc/soc-cache.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index fc80be7dfd6a..a9ebc078bea8 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c | |||
@@ -988,6 +988,7 @@ static int snd_soc_rbtree_cache_init(struct snd_soc_codec *codec) | |||
988 | return 0; | 988 | return 0; |
989 | } | 989 | } |
990 | 990 | ||
991 | #ifdef CONFIG_SND_SOC_CACHE_LZO | ||
991 | struct snd_soc_lzo_ctx { | 992 | struct snd_soc_lzo_ctx { |
992 | void *wmem; | 993 | void *wmem; |
993 | void *dst; | 994 | void *dst; |
@@ -1399,6 +1400,7 @@ err_tofree: | |||
1399 | } | 1400 | } |
1400 | return ret; | 1401 | return ret; |
1401 | } | 1402 | } |
1403 | #endif | ||
1402 | 1404 | ||
1403 | static int snd_soc_flat_cache_sync(struct snd_soc_codec *codec) | 1405 | static int snd_soc_flat_cache_sync(struct snd_soc_codec *codec) |
1404 | { | 1406 | { |
@@ -1541,6 +1543,7 @@ static const struct snd_soc_cache_ops cache_types[] = { | |||
1541 | .write = snd_soc_flat_cache_write, | 1543 | .write = snd_soc_flat_cache_write, |
1542 | .sync = snd_soc_flat_cache_sync | 1544 | .sync = snd_soc_flat_cache_sync |
1543 | }, | 1545 | }, |
1546 | #ifdef CONFIG_SND_SOC_CACHE_LZO | ||
1544 | { | 1547 | { |
1545 | .id = SND_SOC_LZO_COMPRESSION, | 1548 | .id = SND_SOC_LZO_COMPRESSION, |
1546 | .name = "LZO", | 1549 | .name = "LZO", |
@@ -1550,6 +1553,7 @@ static const struct snd_soc_cache_ops cache_types[] = { | |||
1550 | .write = snd_soc_lzo_cache_write, | 1553 | .write = snd_soc_lzo_cache_write, |
1551 | .sync = snd_soc_lzo_cache_sync | 1554 | .sync = snd_soc_lzo_cache_sync |
1552 | }, | 1555 | }, |
1556 | #endif | ||
1553 | { | 1557 | { |
1554 | .id = SND_SOC_RBTREE_COMPRESSION, | 1558 | .id = SND_SOC_RBTREE_COMPRESSION, |
1555 | .name = "rbtree", | 1559 | .name = "rbtree", |