aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/Kconfig17
-rw-r--r--sound/soc/soc-cache.c4
2 files changed, 19 insertions, 2 deletions
diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
index 21a5465ceb65..a3efc52a34da 100644
--- a/sound/soc/Kconfig
+++ b/sound/soc/Kconfig
@@ -4,8 +4,6 @@
4 4
5menuconfig SND_SOC 5menuconfig SND_SOC
6 tristate "ALSA for SoC audio support" 6 tristate "ALSA for SoC audio support"
7 select LZO_COMPRESS
8 select LZO_DECOMPRESS
9 select SND_PCM 7 select SND_PCM
10 select AC97_BUS if SND_SOC_AC97_BUS 8 select AC97_BUS if SND_SOC_AC97_BUS
11 select SND_JACK if INPUT=y || INPUT=SND 9 select SND_JACK if INPUT=y || INPUT=SND
@@ -22,6 +20,21 @@ menuconfig SND_SOC
22 20
23if SND_SOC 21if SND_SOC
24 22
23config SND_SOC_CACHE_LZO
24 bool "Support LZO compression for register caches"
25 select LZO_COMPRESS
26 select LZO_DECOMPRESS
27 ---help---
28 Select this to enable LZO compression for register caches.
29 This will allow machine or CODEC drivers to compress register
30 caches in memory, reducing the memory consumption at the
31 expense of performance. If this is not present and is used
32 the system will fall back to uncompressed caches.
33
34 Usually it is safe to disable this option, where cache
35 compression in used the rbtree option will typically perform
36 better.
37
25config SND_SOC_AC97_BUS 38config SND_SOC_AC97_BUS
26 bool 39 bool
27 40
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
991struct snd_soc_lzo_ctx { 992struct 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
1403static int snd_soc_flat_cache_sync(struct snd_soc_codec *codec) 1405static 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",