alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] reducing memory footprint of ALSA
@ 2015-05-26 13:13 Jie Yang
  2015-05-26 13:13 ` [PATCH v2 1/2] ALSA: Kconfig: add config menu for reduced memory footprint Jie Yang
  2015-05-26 13:13 ` [PATCH v2 2/2] ALSA: set no sound proc fs " Jie Yang
  0 siblings, 2 replies; 11+ messages in thread
From: Jie Yang @ 2015-05-26 13:13 UTC (permalink / raw)
  To: tiwai, broonie; +Cc: vivian.zhang, alsa-devel, linux-kernel, liam.r.girdwood

We are planning to work on reducing memory footprint of ALSA,
targeting on small memory embedded devices(e.g. IoT), this
series focuses on disabling procfs, hw/sw params refinement,
mmap, dpcm, dapm, compressed API, compat code APIs...

These first two patches is a start, add config menu in Kconfig,
and disable ALSA proc FS once reducing memory footprint is
selected, which can save about 9KB code size on x86_64 platform.

Changes in v2:
Prompt "Sound Proc FS Support" appears only when
SND_REDUCED_MEMORY_FOOTPRINT is true.

Jie Yang (2):
  ALSA: Kconfig: add config menu for reduced memory footprint
  ALSA: set no sound proc fs for reduced memory footprint

 include/sound/info.h               |  8 ++++----
 sound/Kconfig                      | 16 ++++++++++++++++
 sound/core/Makefile                |  2 +-
 sound/core/hwdep.c                 |  6 +++---
 sound/core/init.c                  |  8 ++++----
 sound/core/oss/mixer_oss.c         |  6 +++---
 sound/core/pcm.c                   |  6 +++---
 sound/core/seq/oss/seq_oss.c       |  6 +++---
 sound/core/seq/oss/seq_oss_init.c  |  5 ++---
 sound/core/seq/oss/seq_oss_midi.c  |  4 ++--
 sound/core/seq/oss/seq_oss_readq.c |  4 ++--
 sound/core/seq/oss/seq_oss_synth.c |  4 ++--
 sound/core/seq/seq_clientmgr.c     |  4 ++--
 sound/core/seq/seq_device.c        |  2 +-
 sound/core/seq/seq_info.h          |  2 +-
 sound/core/seq/seq_queue.c         |  4 ++--
 sound/core/seq/seq_timer.c         |  4 ++--
 sound/core/sound.c                 |  4 ++--
 sound/core/sound_oss.c             |  4 ++--
 sound/core/timer.c                 |  4 ++--
 sound/pci/hda/Makefile             |  3 ++-
 sound/pci/hda/hda_eld.c            |  4 ++--
 sound/pci/hda/hda_local.h          |  4 ++--
 sound/pci/hda/patch_hdmi.c         |  4 ++--
 sound/pci/hda/patch_sigmatel.c     |  2 +-
 25 files changed, 68 insertions(+), 52 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 1/2] ALSA: Kconfig: add config menu for reduced memory footprint
  2015-05-26 13:13 [PATCH 0/2] reducing memory footprint of ALSA Jie Yang
@ 2015-05-26 13:13 ` Jie Yang
  2015-05-26 13:13 ` [PATCH v2 2/2] ALSA: set no sound proc fs " Jie Yang
  1 sibling, 0 replies; 11+ messages in thread
From: Jie Yang @ 2015-05-26 13:13 UTC (permalink / raw)
  To: tiwai, broonie; +Cc: vivian.zhang, alsa-devel, linux-kernel, liam.r.girdwood

For some embedded devices, we need reduce code size and data
footprint as much as possible, e.g. disabling procfs, hw/sw
params refinement, mmap, dpcm, dapm, compressed API...

Here add root config menu for those configuration, and
disable procfs once reduced memory footprint is selected.

Signed-off-by: Jie Yang <yang.jie@intel.com>
---
 sound/Kconfig | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/sound/Kconfig b/sound/Kconfig
index 5a240e0..84c9e58 100644
--- a/sound/Kconfig
+++ b/sound/Kconfig
@@ -68,6 +68,22 @@ menuconfig SND
 
 if SND
 
+menuconfig SND_REDUCED_MEMORY_FOOTPRINT
+	bool "Reduced Memory Footprint Support"
+	default n
+	help
+	  Say 'Y' to enable Reduced Memory Footprint Support, which may
+	  reduce code size and data footprint as much as possible.
+
+config SND_PROC_FS
+	bool "Sound Proc FS Support" if SND_REDUCED_MEMORY_FOOTPRINT
+	depends on PROC_FS
+	default y
+	help
+	  Say 'N' to disable Sound proc FS, which may reduce code size about
+	  9KB on x86_64 platform.
+	  If unsure say Y.
+
 source "sound/core/Kconfig"
 
 source "sound/drivers/Kconfig"
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint
  2015-05-26 13:13 [PATCH 0/2] reducing memory footprint of ALSA Jie Yang
  2015-05-26 13:13 ` [PATCH v2 1/2] ALSA: Kconfig: add config menu for reduced memory footprint Jie Yang
@ 2015-05-26 13:13 ` Jie Yang
  2015-05-27  4:49   ` Sudip Mukherjee
  1 sibling, 1 reply; 11+ messages in thread
From: Jie Yang @ 2015-05-26 13:13 UTC (permalink / raw)
  To: tiwai, broonie; +Cc: vivian.zhang, alsa-devel, linux-kernel, liam.r.girdwood

Disable sound proc fs, when CONFIG_SND_NO_PROC_FS is selected,
which can save about 9KB memory size for reducing memory
footprint purpose.
---
 include/sound/info.h               | 8 ++++----
 sound/core/Makefile                | 2 +-
 sound/core/hwdep.c                 | 6 +++---
 sound/core/init.c                  | 8 ++++----
 sound/core/oss/mixer_oss.c         | 6 +++---
 sound/core/pcm.c                   | 6 +++---
 sound/core/seq/oss/seq_oss.c       | 6 +++---
 sound/core/seq/oss/seq_oss_init.c  | 5 ++---
 sound/core/seq/oss/seq_oss_midi.c  | 4 ++--
 sound/core/seq/oss/seq_oss_readq.c | 4 ++--
 sound/core/seq/oss/seq_oss_synth.c | 4 ++--
 sound/core/seq/seq_clientmgr.c     | 4 ++--
 sound/core/seq/seq_device.c        | 2 +-
 sound/core/seq/seq_info.h          | 2 +-
 sound/core/seq/seq_queue.c         | 4 ++--
 sound/core/seq/seq_timer.c         | 4 ++--
 sound/core/sound.c                 | 4 ++--
 sound/core/sound_oss.c             | 4 ++--
 sound/core/timer.c                 | 4 ++--
 sound/pci/hda/Makefile             | 3 ++-
 sound/pci/hda/hda_eld.c            | 4 ++--
 sound/pci/hda/hda_local.h          | 4 ++--
 sound/pci/hda/patch_hdmi.c         | 4 ++--
 sound/pci/hda/patch_sigmatel.c     | 2 +-
 24 files changed, 52 insertions(+), 52 deletions(-)

diff --git a/include/sound/info.h b/include/sound/info.h
index 1626995..67390ee 100644
--- a/include/sound/info.h
+++ b/include/sound/info.h
@@ -92,14 +92,14 @@ struct snd_info_entry {
 	struct list_head list;
 };
 
-#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
+#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_SND_PROC_FS)
 int snd_info_minor_register(void);
 #else
 #define snd_info_minor_register()	0
 #endif
 
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 
 extern struct snd_info_entry *snd_seq_root;
 #ifdef CONFIG_SND_OSSEMUL
@@ -197,7 +197,7 @@ static inline int snd_info_check_reserved_words(const char *str) { return 1; }
  * OSS info part
  */
 
-#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
+#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_SND_PROC_FS)
 
 #define SNDRV_OSS_INFO_DEV_AUDIO	0
 #define SNDRV_OSS_INFO_DEV_SYNTH	1
@@ -210,6 +210,6 @@ static inline int snd_info_check_reserved_words(const char *str) { return 1; }
 int snd_oss_info_register(int dev, int num, char *string);
 #define snd_oss_info_unregister(dev, num) snd_oss_info_register(dev, num, NULL)
 
-#endif /* CONFIG_SND_OSSEMUL && CONFIG_PROC_FS */
+#endif /* CONFIG_SND_OSSEMUL && CONFIG_SND_PROC_FS */
 
 #endif /* __SOUND_INFO_H */
diff --git a/sound/core/Makefile b/sound/core/Makefile
index 7dd17a3..9e5bb10 100644
--- a/sound/core/Makefile
+++ b/sound/core/Makefile
@@ -4,7 +4,7 @@
 #
 
 snd-y     := sound.o init.o memory.o control.o misc.o device.o
-ifneq ($(CONFIG_PROC_FS),)
+ifneq ($(CONFIG_SND_PROC_FS),)
 snd-y += info.o
 snd-$(CONFIG_SND_OSSEMUL) += info_oss.o
 endif
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index 51692c8..36d2416 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -484,7 +484,7 @@ static int snd_hwdep_dev_disconnect(struct snd_device *device)
 	return 0;
 }
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /*
  *  Info interface
  */
@@ -521,10 +521,10 @@ static void __exit snd_hwdep_proc_done(void)
 {
 	snd_info_free_entry(snd_hwdep_proc_entry);
 }
-#else /* !CONFIG_PROC_FS */
+#else /* !CONFIG_SND_PROC_FS */
 #define snd_hwdep_proc_init()
 #define snd_hwdep_proc_done()
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
 
 
 /*
diff --git a/sound/core/init.c b/sound/core/init.c
index f8abd2d..3e0ceba 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -100,7 +100,7 @@ int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int free_flag);
 EXPORT_SYMBOL(snd_mixer_oss_notify_callback);
 #endif
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 static void snd_card_id_read(struct snd_info_entry *entry,
 			     struct snd_info_buffer *buffer)
 {
@@ -122,7 +122,7 @@ static int init_info_for_card(struct snd_card *card)
 
 	return snd_info_card_register(card);
 }
-#else /* !CONFIG_PROC_FS */
+#else /* !CONFIG_SND_PROC_FS */
 #define init_info_for_card(card)
 #endif
 
@@ -776,7 +776,7 @@ int snd_card_register(struct snd_card *card)
 
 EXPORT_SYMBOL(snd_card_register);
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 static void snd_card_info_read(struct snd_info_entry *entry,
 			       struct snd_info_buffer *buffer)
 {
@@ -861,7 +861,7 @@ int __init snd_card_info_init(void)
 
 	return 0;
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
 
 /**
  *  snd_component_add - add a component string
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index 056f8e2..a99f720 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -1111,7 +1111,7 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss *mixer, struct snd_mix
 	return 0;
 }
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /*
  */
 #define MIXER_VOL(name) [SOUND_MIXER_##name] = #name
@@ -1255,10 +1255,10 @@ static void snd_mixer_oss_proc_done(struct snd_mixer_oss *mixer)
 	snd_info_free_entry(mixer->proc_entry);
 	mixer->proc_entry = NULL;
 }
-#else /* !CONFIG_PROC_FS */
+#else /* !CONFIG_SND_PROC_FS */
 #define snd_mixer_oss_proc_init(mix)
 #define snd_mixer_oss_proc_done(mix)
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
 
 static void snd_mixer_oss_build(struct snd_mixer_oss *mixer)
 {
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index b25bcf5..e537943 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -1181,7 +1181,7 @@ int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree)
 }
 EXPORT_SYMBOL(snd_pcm_notify);
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /*
  *  Info interface
  */
@@ -1227,10 +1227,10 @@ static void snd_pcm_proc_done(void)
 	snd_info_free_entry(snd_pcm_proc_entry);
 }
 
-#else /* !CONFIG_PROC_FS */
+#else /* !CONFIG_SND_PROC_FS */
 #define snd_pcm_proc_init()
 #define snd_pcm_proc_done()
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
 
 
 /*
diff --git a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c
index 72873a4..7354b8b 100644
--- a/sound/core/seq/oss/seq_oss.c
+++ b/sound/core/seq/oss/seq_oss.c
@@ -45,7 +45,7 @@ MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MUSIC);
  */
 static int register_device(void);
 static void unregister_device(void);
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 static int register_proc(void);
 static void unregister_proc(void);
 #else
@@ -261,7 +261,7 @@ unregister_device(void)
  * /proc interface
  */
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 
 static struct snd_info_entry *info_entry;
 
@@ -303,4 +303,4 @@ unregister_proc(void)
 	snd_info_free_entry(info_entry);
 	info_entry = NULL;
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index 2de3fef..b1221b2 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -479,8 +479,7 @@ snd_seq_oss_reset(struct seq_oss_devinfo *dp)
 	snd_seq_oss_timer_stop(dp->timer);
 }
 
-
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /*
  * misc. functions for proc interface
  */
@@ -531,4 +530,4 @@ snd_seq_oss_system_info_read(struct snd_info_buffer *buf)
 			snd_seq_oss_readq_info_read(dp->readq, buf);
 	}
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c
index 96e8395..aaff9ee 100644
--- a/sound/core/seq/oss/seq_oss_midi.c
+++ b/sound/core/seq/oss/seq_oss_midi.c
@@ -665,7 +665,7 @@ snd_seq_oss_midi_make_info(struct seq_oss_devinfo *dp, int dev, struct midi_info
 }
 
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /*
  * proc interface
  */
@@ -705,4 +705,4 @@ snd_seq_oss_midi_info_read(struct snd_info_buffer *buf)
 		snd_use_lock_free(&mdev->use_lock);
 	}
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
diff --git a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c
index c080c73..ccd8935 100644
--- a/sound/core/seq/oss/seq_oss_readq.c
+++ b/sound/core/seq/oss/seq_oss_readq.c
@@ -222,7 +222,7 @@ snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *q, unsigned long curt, int
 }
 
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /*
  * proc interface
  */
@@ -233,4 +233,4 @@ snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf
 		    (waitqueue_active(&q->midi_sleep) ? "sleeping":"running"),
 		    q->qlen, q->input_time);
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
index 48e4fe1..0f3b381 100644
--- a/sound/core/seq/oss/seq_oss_synth.c
+++ b/sound/core/seq/oss/seq_oss_synth.c
@@ -630,7 +630,7 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in
 }
 
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /*
  * proc interface
  */
@@ -658,4 +658,4 @@ snd_seq_oss_synth_info_read(struct snd_info_buffer *buf)
 		snd_use_lock_free(&rec->use_lock);
 	}
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index edbdab8..b64f20d 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -2447,7 +2447,7 @@ EXPORT_SYMBOL(snd_seq_kernel_client_write_poll);
 
 /*---------------------------------------------------------------------------*/
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /*
  *  /proc interface
  */
@@ -2549,7 +2549,7 @@ void snd_seq_info_clients_read(struct snd_info_entry *entry,
 		snd_seq_client_unlock(client);
 	}
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
 
 /*---------------------------------------------------------------------------*/
 
diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c
index d99f99d..288af56 100644
--- a/sound/core/seq/seq_device.c
+++ b/sound/core/seq/seq_device.c
@@ -72,7 +72,7 @@ static struct bus_type snd_seq_bus_type = {
 /*
  * proc interface -- just for compatibility
  */
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 static struct snd_info_entry *info_entry;
 
 static int print_dev_info(struct device *dev, void *data)
diff --git a/sound/core/seq/seq_info.h b/sound/core/seq/seq_info.h
index 4892a7f..f8549f8 100644
--- a/sound/core/seq/seq_info.h
+++ b/sound/core/seq/seq_info.h
@@ -29,7 +29,7 @@ void snd_seq_info_timer_read(struct snd_info_entry *entry, struct snd_info_buffe
 void snd_seq_info_queues_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
 
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 int snd_seq_info_init( void );
 int snd_seq_info_done( void );
 #else
diff --git a/sound/core/seq/seq_queue.c b/sound/core/seq/seq_queue.c
index a0cda38..7dfd0f4 100644
--- a/sound/core/seq/seq_queue.c
+++ b/sound/core/seq/seq_queue.c
@@ -753,7 +753,7 @@ int snd_seq_control_queue(struct snd_seq_event *ev, int atomic, int hop)
 
 /*----------------------------------------------------------------*/
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /* exported to seq_info.c */
 void snd_seq_info_queues_read(struct snd_info_entry *entry, 
 			      struct snd_info_buffer *buffer)
@@ -787,5 +787,5 @@ void snd_seq_info_queues_read(struct snd_info_entry *entry,
 		queuefree(q);
 	}
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
 
diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c
index 186f161..82b220c 100644
--- a/sound/core/seq/seq_timer.c
+++ b/sound/core/seq/seq_timer.c
@@ -422,7 +422,7 @@ snd_seq_tick_time_t snd_seq_timer_get_cur_tick(struct snd_seq_timer *tmr)
 }
 
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /* exported to seq_info.c */
 void snd_seq_info_timer_read(struct snd_info_entry *entry,
 			     struct snd_info_buffer *buffer)
@@ -449,5 +449,5 @@ void snd_seq_info_timer_read(struct snd_info_entry *entry,
 		queuefree(q);
  	}
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
 
diff --git a/sound/core/sound.c b/sound/core/sound.c
index e5d37bd..175f9e4 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -330,7 +330,7 @@ int snd_unregister_device(struct device *dev)
 }
 EXPORT_SYMBOL(snd_unregister_device);
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /*
  *  INFO PART
  */
@@ -391,7 +391,7 @@ int __init snd_minor_info_init(void)
 	entry->c.text.read = snd_minor_info_read;
 	return snd_info_register(entry); /* freed in error path */
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
 
 /*
  *  INIT PART
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index 86e2d91..0ca9d72 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -207,7 +207,7 @@ EXPORT_SYMBOL(snd_unregister_oss_device);
  *  INFO PART
  */
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 static const char *snd_oss_device_type_name(int type)
 {
 	switch (type) {
@@ -259,4 +259,4 @@ int __init snd_minor_info_oss_init(void)
 	entry->c.text.read = snd_minor_info_oss_read;
 	return snd_info_register(entry); /* freed in error path */
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
diff --git a/sound/core/timer.c b/sound/core/timer.c
index a9a1a04..31f40f0 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1034,7 +1034,7 @@ static int snd_timer_register_system(void)
 	return snd_timer_global_register(timer);
 }
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 /*
  *  Info interface
  */
@@ -1104,7 +1104,7 @@ static void __exit snd_timer_proc_done(void)
 {
 	snd_info_free_entry(snd_timer_proc_entry);
 }
-#else /* !CONFIG_PROC_FS */
+#else /* !CONFIG_SND_PROC_FS */
 #define snd_timer_proc_init()
 #define snd_timer_proc_done()
 #endif
diff --git a/sound/pci/hda/Makefile b/sound/pci/hda/Makefile
index 9c259ce..2732890 100644
--- a/sound/pci/hda/Makefile
+++ b/sound/pci/hda/Makefile
@@ -5,7 +5,8 @@ snd-hda-intel-$(CONFIG_SND_HDA_I915) +=	hda_i915.o
 
 snd-hda-codec-y := hda_bind.o hda_codec.o hda_jack.o hda_auto_parser.o hda_sysfs.o
 snd-hda-codec-y += hda_controller.o
-snd-hda-codec-$(CONFIG_PROC_FS) += hda_proc.o
+snd-hda-codec-$(CONFIG_SND_PROC_FS) += hda_proc.o
+
 snd-hda-codec-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o
 snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o
 
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index 0e6d753..c746cd9 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -448,7 +448,7 @@ void snd_hdmi_show_eld(struct hda_codec *codec, struct parsed_hdmi_eld *e)
 		hdmi_show_short_audio_desc(codec, e->sad + i);
 }
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 
 static void hdmi_print_sad_info(int i, struct cea_sad *a,
 				struct snd_info_buffer *buffer)
@@ -586,7 +586,7 @@ void snd_hdmi_write_eld_info(struct hdmi_eld *eld,
 		}
 	}
 }
-#endif /* CONFIG_PROC_FS */
+#endif /* CONFIG_SND_PROC_FS */
 
 /* update PCM info based on ELD */
 void snd_hdmi_eld_update_pcm_info(struct parsed_hdmi_eld *e,
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 3b567f4..be7c66d 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -330,7 +330,7 @@ int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec,
 /*
  * generic proc interface
  */
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 int snd_hda_codec_proc_new(struct hda_codec *codec);
 #else
 static inline int snd_hda_codec_proc_new(struct hda_codec *codec) { return 0; }
@@ -777,7 +777,7 @@ int snd_hdmi_get_eld_ati(struct hda_codec *codec, hda_nid_t nid,
 			 unsigned char *buf, int *eld_size,
 			 bool rev3_or_later);
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 void snd_hdmi_print_eld_info(struct hdmi_eld *eld,
 			     struct snd_info_buffer *buffer);
 void snd_hdmi_write_eld_info(struct hdmi_eld *eld,
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index ef8a562..73c20c0 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -86,7 +86,7 @@ struct hdmi_spec_per_pin {
 	bool non_pcm;
 	bool chmap_set;		/* channel-map override by ALSA API? */
 	unsigned char chmap[8]; /* ALSA API channel-map */
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 	struct snd_info_entry *proc_entry;
 #endif
 };
@@ -548,7 +548,7 @@ static void hdmi_set_channel_count(struct hda_codec *codec,
  * ELD proc files
  */
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 static void print_eld_info(struct snd_info_entry *entry,
 			   struct snd_info_buffer *buffer)
 {
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 43c99ce..054026a 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4337,7 +4337,7 @@ static void stac_shutup(struct hda_codec *codec)
 
 #define stac_free	snd_hda_gen_free
 
-#ifdef CONFIG_PROC_FS
+#ifdef CONFIG_SND_PROC_FS
 static void stac92hd_proc_hook(struct snd_info_buffer *buffer,
 			       struct hda_codec *codec, hda_nid_t nid)
 {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint
  2015-05-26 13:13 ` [PATCH v2 2/2] ALSA: set no sound proc fs " Jie Yang
@ 2015-05-27  4:49   ` Sudip Mukherjee
  2015-05-27  5:38     ` Jie, Yang
  0 siblings, 1 reply; 11+ messages in thread
From: Sudip Mukherjee @ 2015-05-27  4:49 UTC (permalink / raw)
  To: Jie Yang
  Cc: tiwai, broonie, alsa-devel, linux-kernel, liam.r.girdwood, vivian.zhang

On Tue, May 26, 2015 at 09:13:57PM +0800, Jie Yang wrote:
> Disable sound proc fs, when CONFIG_SND_NO_PROC_FS is selected,
> which can save about 9KB memory size for reducing memory
> footprint purpose.
> ---
missing Signed-off-by.

regards
sudip

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint
  2015-05-27  4:49   ` Sudip Mukherjee
@ 2015-05-27  5:38     ` Jie, Yang
  2015-05-27  6:18       ` Takashi Iwai
  0 siblings, 1 reply; 11+ messages in thread
From: Jie, Yang @ 2015-05-27  5:38 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: tiwai, broonie, alsa-devel, linux-kernel, Girdwood, Liam R,
	Zhang, Vivian

> -----Original Message-----
> From: Sudip Mukherjee [mailto:sudipm.mukherjee@gmail.com]
> Sent: Wednesday, May 27, 2015 12:50 PM
> To: Jie, Yang
> Cc: tiwai@suse.de; broonie@kernel.org; alsa-devel@alsa-project.org; linux-
> kernel@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory
> footprint
> 
> On Tue, May 26, 2015 at 09:13:57PM +0800, Jie Yang wrote:
> > Disable sound proc fs, when CONFIG_SND_NO_PROC_FS is selected, which
> > can save about 9KB memory size for reducing memory footprint purpose.
> > ---
> missing Signed-off-by.
 
Thanks for pointing out.

Signed-off-by: Jie Yang <yang.jie@intel.com>

Takashi, do I need to resend them?

Thanks,
~Keyon

> 
> regards
> sudip

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint
  2015-05-27  5:38     ` Jie, Yang
@ 2015-05-27  6:18       ` Takashi Iwai
  2015-05-27  7:09         ` Jie, Yang
  0 siblings, 1 reply; 11+ messages in thread
From: Takashi Iwai @ 2015-05-27  6:18 UTC (permalink / raw)
  To: Jie, Yang
  Cc: Sudip Mukherjee, broonie, alsa-devel, linux-kernel, Girdwood,
	Liam R, Zhang, Vivian

At Wed, 27 May 2015 05:38:01 +0000,
Jie, Yang wrote:
> 
> > -----Original Message-----
> > From: Sudip Mukherjee [mailto:sudipm.mukherjee@gmail.com]
> > Sent: Wednesday, May 27, 2015 12:50 PM
> > To: Jie, Yang
> > Cc: tiwai@suse.de; broonie@kernel.org; alsa-devel@alsa-project.org; linux-
> > kernel@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory
> > footprint
> > 
> > On Tue, May 26, 2015 at 09:13:57PM +0800, Jie Yang wrote:
> > > Disable sound proc fs, when CONFIG_SND_NO_PROC_FS is selected, which
> > > can save about 9KB memory size for reducing memory footprint purpose.
> > > ---
> > missing Signed-off-by.
>  
> Thanks for pointing out.
> 
> Signed-off-by: Jie Yang <yang.jie@intel.com>
> 
> Takashi, do I need to resend them?

Yes, but you seen to have missed my first comment.  Here again:

================================================================
> +menuconfig SND_REDUCED_MEMORY_FOOTPRINT
> +	bool "Reduced Memory Footprint Support"
> +	default n
> +	help
> +	  Say 'Y' to enable Reduced Memory Footprint Support, which may
> +	  reduce code size and data footprint as much as possible.

I'd like to move this into sound/core.
Also, the kconfig name appears a bit too lengthy to me.
================================================================

And, after reading this again, I wonder whether we just take the
existing CONFIG_EXPERT for allowing the selection of more knobs like
CONFIG_SND_PROC_FS.  

SND_PROC_FS
	bool "Sound proc file" if EXPERT
	depends on PROC_FS
	....


Takashi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint
  2015-05-27  6:18       ` Takashi Iwai
@ 2015-05-27  7:09         ` Jie, Yang
  2015-05-27  7:22           ` Takashi Iwai
  0 siblings, 1 reply; 11+ messages in thread
From: Jie, Yang @ 2015-05-27  7:09 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Sudip Mukherjee, broonie, alsa-devel, linux-kernel, Girdwood,
	Liam R, Zhang, Vivian

> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Wednesday, May 27, 2015 2:19 PM
> To: Jie, Yang
> Cc: Sudip Mukherjee; broonie@kernel.org; alsa-devel@alsa-project.org;
> linux-kernel@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory
> footprint
> 
> At Wed, 27 May 2015 05:38:01 +0000,
> Jie, Yang wrote:
> >
> > > -----Original Message-----
> > > From: Sudip Mukherjee [mailto:sudipm.mukherjee@gmail.com]
> > > Sent: Wednesday, May 27, 2015 12:50 PM
> > > To: Jie, Yang
> > > Cc: tiwai@suse.de; broonie@kernel.org; alsa-devel@alsa-project.org;
> > > linux- kernel@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> > > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced
> > > memory footprint
> > >
> > > On Tue, May 26, 2015 at 09:13:57PM +0800, Jie Yang wrote:
> > > > Disable sound proc fs, when CONFIG_SND_NO_PROC_FS is selected,
> > > > which can save about 9KB memory size for reducing memory footprint
> purpose.
> > > > ---
> > > missing Signed-off-by.
> >
> > Thanks for pointing out.
> >
> > Signed-off-by: Jie Yang <yang.jie@intel.com>
> >
> > Takashi, do I need to resend them?
> 
> Yes, but you seen to have missed my first comment.  Here again:
 
Sorry about the missing. :)

> 
> ==========================================================
> ======
> > +menuconfig SND_REDUCED_MEMORY_FOOTPRINT
> > +	bool "Reduced Memory Footprint Support"
> > +	default n
> > +	help
> > +	  Say 'Y' to enable Reduced Memory Footprint Support, which may
> > +	  reduce code size and data footprint as much as possible.
> 
> I'd like to move this into sound/core.
> Also, the kconfig name appears a bit too lengthy to me.
> ==========================================================
> ======
> 
> And, after reading this again, I wonder whether we just take the existing
> CONFIG_EXPERT for allowing the selection of more knobs like
> CONFIG_SND_PROC_FS.
> 
> SND_PROC_FS
> 	bool "Sound proc file" if EXPERT
 
Sounds good. Then we don't need 'SND_REDUCED_MEMORY_FOOTPRINT'
any more? Or we can keep it as root menu of the set of items, just as below?
(I changed it to SND_SMALL_FOOTPRINT, as your comment above)

menuconfig SND_SMALL_FOOTPRINT
	bool "Reduced Memory Footprint Support" if EXPERT
	default n
	help
	  Say 'Y' to enable Reduced Memory Footprint Support, which may
	  reduce code size and data footprint as much as possible.

config SND_PROC_FS
        bool "Sound Proc FS Support" if SND_SMALL_FOOTPRINT
        depends on PROC_FS
        default y
        help
          Say 'N' to disable Sound proc FS, which may reduce code size about
          9KB on x86_64 platform.
          If unsure say Y.

~Keyon

> 	depends on PROC_FS
> 	....
> 
> 
> Takashi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint
  2015-05-27  7:09         ` Jie, Yang
@ 2015-05-27  7:22           ` Takashi Iwai
  2015-05-27  7:40             ` Jie, Yang
  0 siblings, 1 reply; 11+ messages in thread
From: Takashi Iwai @ 2015-05-27  7:22 UTC (permalink / raw)
  To: Jie, Yang
  Cc: Sudip Mukherjee, broonie, alsa-devel, linux-kernel, Girdwood,
	Liam R, Zhang, Vivian

At Wed, 27 May 2015 07:09:24 +0000,
Jie, Yang wrote:
> 
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai@suse.de]
> > Sent: Wednesday, May 27, 2015 2:19 PM
> > To: Jie, Yang
> > Cc: Sudip Mukherjee; broonie@kernel.org; alsa-devel@alsa-project.org;
> > linux-kernel@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory
> > footprint
> > 
> > At Wed, 27 May 2015 05:38:01 +0000,
> > Jie, Yang wrote:
> > >
> > > > -----Original Message-----
> > > > From: Sudip Mukherjee [mailto:sudipm.mukherjee@gmail.com]
> > > > Sent: Wednesday, May 27, 2015 12:50 PM
> > > > To: Jie, Yang
> > > > Cc: tiwai@suse.de; broonie@kernel.org; alsa-devel@alsa-project.org;
> > > > linux- kernel@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> > > > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced
> > > > memory footprint
> > > >
> > > > On Tue, May 26, 2015 at 09:13:57PM +0800, Jie Yang wrote:
> > > > > Disable sound proc fs, when CONFIG_SND_NO_PROC_FS is selected,
> > > > > which can save about 9KB memory size for reducing memory footprint
> > purpose.
> > > > > ---
> > > > missing Signed-off-by.
> > >
> > > Thanks for pointing out.
> > >
> > > Signed-off-by: Jie Yang <yang.jie@intel.com>
> > >
> > > Takashi, do I need to resend them?
> > 
> > Yes, but you seen to have missed my first comment.  Here again:
>  
> Sorry about the missing. :)
> 
> > 
> > ==========================================================
> > ======
> > > +menuconfig SND_REDUCED_MEMORY_FOOTPRINT
> > > +	bool "Reduced Memory Footprint Support"
> > > +	default n
> > > +	help
> > > +	  Say 'Y' to enable Reduced Memory Footprint Support, which may
> > > +	  reduce code size and data footprint as much as possible.
> > 
> > I'd like to move this into sound/core.
> > Also, the kconfig name appears a bit too lengthy to me.
> > ==========================================================
> > ======
> > 
> > And, after reading this again, I wonder whether we just take the existing
> > CONFIG_EXPERT for allowing the selection of more knobs like
> > CONFIG_SND_PROC_FS.
> > 
> > SND_PROC_FS
> > 	bool "Sound proc file" if EXPERT
>  
> Sounds good. Then we don't need 'SND_REDUCED_MEMORY_FOOTPRINT'
> any more? Or we can keep it as root menu of the set of items, just as below?
> (I changed it to SND_SMALL_FOOTPRINT, as your comment above)

I originally thought to select items from SND_SMALL_FOOTPRINT, but
this doesn't seem to work.  At least, "de"selecting isn't supported by
Kconfig (i.e. set SND_PROC_FS=n when SND_SMALL_FOOTPRINT=y).
We may have SND_NO_PROC_FS and select it, but it's too bad.

So, IMO, we can drop SND_SMALL_FOOTPRINT but let users choose each
knob when EXPERT=y.


Takashi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint
  2015-05-27  7:22           ` Takashi Iwai
@ 2015-05-27  7:40             ` Jie, Yang
  2015-05-27  7:46               ` Takashi Iwai
  0 siblings, 1 reply; 11+ messages in thread
From: Jie, Yang @ 2015-05-27  7:40 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Sudip Mukherjee, broonie, alsa-devel, linux-kernel, Girdwood,
	Liam R, Zhang, Vivian

> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Wednesday, May 27, 2015 3:23 PM
> To: Jie, Yang
> Cc: Sudip Mukherjee; broonie@kernel.org; alsa-devel@alsa-project.org;
> linux-kernel@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory
> footprint
> 
> At Wed, 27 May 2015 07:09:24 +0000,
> Jie, Yang wrote:
> >
> > > -----Original Message-----
> > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > Sent: Wednesday, May 27, 2015 2:19 PM
> > > To: Jie, Yang
> > > Cc: Sudip Mukherjee; broonie@kernel.org;
> > > alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org; Girdwood,
> > > Liam R; Zhang, Vivian
> > > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced
> > > memory footprint
> > >
> > > At Wed, 27 May 2015 05:38:01 +0000,
> > > Jie, Yang wrote:
> > > >
> > > > > -----Original Message-----
> > > > > From: Sudip Mukherjee [mailto:sudipm.mukherjee@gmail.com]
> > > > > Sent: Wednesday, May 27, 2015 12:50 PM
> > > > > To: Jie, Yang
> > > > > Cc: tiwai@suse.de; broonie@kernel.org;
> > > > > alsa-devel@alsa-project.org;
> > > > > linux- kernel@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> > > > > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for
> > > > > reduced memory footprint
> > > > >
> > > > > On Tue, May 26, 2015 at 09:13:57PM +0800, Jie Yang wrote:
> > > > > > Disable sound proc fs, when CONFIG_SND_NO_PROC_FS is
> selected,
> > > > > > which can save about 9KB memory size for reducing memory
> > > > > > footprint
> > > purpose.
> > > > > > ---
> > > > > missing Signed-off-by.
> > > >
> > > > Thanks for pointing out.
> > > >
> > > > Signed-off-by: Jie Yang <yang.jie@intel.com>
> > > >
> > > > Takashi, do I need to resend them?
> > >
> > > Yes, but you seen to have missed my first comment.  Here again:
> >
> > Sorry about the missing. :)
> >
> > >
> > >
> ==========================================================
> > > ======
> > > > +menuconfig SND_REDUCED_MEMORY_FOOTPRINT
> > > > +	bool "Reduced Memory Footprint Support"
> > > > +	default n
> > > > +	help
> > > > +	  Say 'Y' to enable Reduced Memory Footprint Support, which may
> > > > +	  reduce code size and data footprint as much as possible.
> > >
> > > I'd like to move this into sound/core.
> > > Also, the kconfig name appears a bit too lengthy to me.
> > >
> ==========================================================
> > > ======
> > >
> > > And, after reading this again, I wonder whether we just take the
> > > existing CONFIG_EXPERT for allowing the selection of more knobs like
> > > CONFIG_SND_PROC_FS.
> > >
> > > SND_PROC_FS
> > > 	bool "Sound proc file" if EXPERT
> >
> > Sounds good. Then we don't need 'SND_REDUCED_MEMORY_FOOTPRINT'
> > any more? Or we can keep it as root menu of the set of items, just as
> below?
> > (I changed it to SND_SMALL_FOOTPRINT, as your comment above)
> 
> I originally thought to select items from SND_SMALL_FOOTPRINT, but this
> doesn't seem to work.  At least, "de"selecting isn't supported by Kconfig (i.e.
> set SND_PROC_FS=n when SND_SMALL_FOOTPRINT=y).
> We may have SND_NO_PROC_FS and select it, but it's too bad.
> 
> So, IMO, we can drop SND_SMALL_FOOTPRINT but let users choose each
> knob when EXPERT=y.
 
Firstly, I used sound/Kconfig but not sound/core/Kconfig, because some
efforts for reducing footprint are based on sound/asoc/(e.g. dapm, dpcm,
...).

Secondly, if we drop SND_SMALL_FOOTPRINT, then we have to add
several(may up to ~10) knobs under the sound menu(Sound Card Support),
which looks messy and not neat.

~Keyon

> 
> 
> Takashi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint
  2015-05-27  7:40             ` Jie, Yang
@ 2015-05-27  7:46               ` Takashi Iwai
  2015-05-27  8:35                 ` Jie, Yang
  0 siblings, 1 reply; 11+ messages in thread
From: Takashi Iwai @ 2015-05-27  7:46 UTC (permalink / raw)
  To: Jie, Yang
  Cc: Sudip Mukherjee, broonie, alsa-devel, linux-kernel, Girdwood,
	Liam R, Zhang, Vivian

At Wed, 27 May 2015 07:40:24 +0000,
Jie, Yang wrote:
> 
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai@suse.de]
> > Sent: Wednesday, May 27, 2015 3:23 PM
> > To: Jie, Yang
> > Cc: Sudip Mukherjee; broonie@kernel.org; alsa-devel@alsa-project.org;
> > linux-kernel@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory
> > footprint
> > 
> > At Wed, 27 May 2015 07:09:24 +0000,
> > Jie, Yang wrote:
> > >
> > > > -----Original Message-----
> > > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > > Sent: Wednesday, May 27, 2015 2:19 PM
> > > > To: Jie, Yang
> > > > Cc: Sudip Mukherjee; broonie@kernel.org;
> > > > alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org; Girdwood,
> > > > Liam R; Zhang, Vivian
> > > > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced
> > > > memory footprint
> > > >
> > > > At Wed, 27 May 2015 05:38:01 +0000,
> > > > Jie, Yang wrote:
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Sudip Mukherjee [mailto:sudipm.mukherjee@gmail.com]
> > > > > > Sent: Wednesday, May 27, 2015 12:50 PM
> > > > > > To: Jie, Yang
> > > > > > Cc: tiwai@suse.de; broonie@kernel.org;
> > > > > > alsa-devel@alsa-project.org;
> > > > > > linux- kernel@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> > > > > > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for
> > > > > > reduced memory footprint
> > > > > >
> > > > > > On Tue, May 26, 2015 at 09:13:57PM +0800, Jie Yang wrote:
> > > > > > > Disable sound proc fs, when CONFIG_SND_NO_PROC_FS is
> > selected,
> > > > > > > which can save about 9KB memory size for reducing memory
> > > > > > > footprint
> > > > purpose.
> > > > > > > ---
> > > > > > missing Signed-off-by.
> > > > >
> > > > > Thanks for pointing out.
> > > > >
> > > > > Signed-off-by: Jie Yang <yang.jie@intel.com>
> > > > >
> > > > > Takashi, do I need to resend them?
> > > >
> > > > Yes, but you seen to have missed my first comment.  Here again:
> > >
> > > Sorry about the missing. :)
> > >
> > > >
> > > >
> > ==========================================================
> > > > ======
> > > > > +menuconfig SND_REDUCED_MEMORY_FOOTPRINT
> > > > > +	bool "Reduced Memory Footprint Support"
> > > > > +	default n
> > > > > +	help
> > > > > +	  Say 'Y' to enable Reduced Memory Footprint Support, which may
> > > > > +	  reduce code size and data footprint as much as possible.
> > > >
> > > > I'd like to move this into sound/core.
> > > > Also, the kconfig name appears a bit too lengthy to me.
> > > >
> > ==========================================================
> > > > ======
> > > >
> > > > And, after reading this again, I wonder whether we just take the
> > > > existing CONFIG_EXPERT for allowing the selection of more knobs like
> > > > CONFIG_SND_PROC_FS.
> > > >
> > > > SND_PROC_FS
> > > > 	bool "Sound proc file" if EXPERT
> > >
> > > Sounds good. Then we don't need 'SND_REDUCED_MEMORY_FOOTPRINT'
> > > any more? Or we can keep it as root menu of the set of items, just as
> > below?
> > > (I changed it to SND_SMALL_FOOTPRINT, as your comment above)
> > 
> > I originally thought to select items from SND_SMALL_FOOTPRINT, but this
> > doesn't seem to work.  At least, "de"selecting isn't supported by Kconfig (i.e.
> > set SND_PROC_FS=n when SND_SMALL_FOOTPRINT=y).
> > We may have SND_NO_PROC_FS and select it, but it's too bad.
> > 
> > So, IMO, we can drop SND_SMALL_FOOTPRINT but let users choose each
> > knob when EXPERT=y.
>  
> Firstly, I used sound/Kconfig but not sound/core/Kconfig, because some
> efforts for reducing footprint are based on sound/asoc/(e.g. dapm, dpcm,
> ...).

sound/core/Kconfig defines the core sound components and
configurations, so it's more appropriate.

> Secondly, if we drop SND_SMALL_FOOTPRINT, then we have to add
> several(may up to ~10) knobs under the sound menu(Sound Card Support),
> which looks messy and not neat.

The question is whether we want more selectable knobs.  If you got for
simplicity, SND_PROC_FS shouldn't be selectable either, but just give
SND_SMALL_FOOTPRINT selectable.


Takashi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint
  2015-05-27  7:46               ` Takashi Iwai
@ 2015-05-27  8:35                 ` Jie, Yang
  0 siblings, 0 replies; 11+ messages in thread
From: Jie, Yang @ 2015-05-27  8:35 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Sudip Mukherjee, broonie, alsa-devel, linux-kernel, Girdwood,
	Liam R, Zhang, Vivian

> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Wednesday, May 27, 2015 3:46 PM
> To: Jie, Yang
> Cc: Sudip Mukherjee; broonie@kernel.org; alsa-devel@alsa-project.org;
> linux-kernel@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory
> footprint
> 
> At Wed, 27 May 2015 07:40:24 +0000,
> Jie, Yang wrote:
> >
> > > -----Original Message-----
> > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > Sent: Wednesday, May 27, 2015 3:23 PM
> > > To: Jie, Yang
> > > Cc: Sudip Mukherjee; broonie@kernel.org;
> > > alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org; Girdwood,
> > > Liam R; Zhang, Vivian
> > > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced
> > > memory footprint
> > >
> > > At Wed, 27 May 2015 07:09:24 +0000,
> > > Jie, Yang wrote:
> > > >
> > > > > -----Original Message-----
> > > > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > > > Sent: Wednesday, May 27, 2015 2:19 PM
> > > > > To: Jie, Yang
> > > > > Cc: Sudip Mukherjee; broonie@kernel.org;
> > > > > alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org;
> > > > > Girdwood, Liam R; Zhang, Vivian
> > > > > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for
> > > > > reduced memory footprint
> > > > >
> > > > > At Wed, 27 May 2015 05:38:01 +0000, Jie, Yang wrote:
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Sudip Mukherjee [mailto:sudipm.mukherjee@gmail.com]
> > > > > > > Sent: Wednesday, May 27, 2015 12:50 PM
> > > > > > > To: Jie, Yang
> > > > > > > Cc: tiwai@suse.de; broonie@kernel.org;
> > > > > > > alsa-devel@alsa-project.org;
> > > > > > > linux- kernel@vger.kernel.org; Girdwood, Liam R; Zhang,
> > > > > > > Vivian
> > > > > > > Subject: Re: [PATCH v2 2/2] ALSA: set no sound proc fs for
> > > > > > > reduced memory footprint
> > > > > > >
> > > > > > > On Tue, May 26, 2015 at 09:13:57PM +0800, Jie Yang wrote:
> > > > > > > > Disable sound proc fs, when CONFIG_SND_NO_PROC_FS is
> > > selected,
> > > > > > > > which can save about 9KB memory size for reducing memory
> > > > > > > > footprint
> > > > > purpose.
> > > > > > > > ---
> > > > > > > missing Signed-off-by.
> > > > > >
> > > > > > Thanks for pointing out.
> > > > > >
> > > > > > Signed-off-by: Jie Yang <yang.jie@intel.com>
> > > > > >
> > > > > > Takashi, do I need to resend them?
> > > > >
> > > > > Yes, but you seen to have missed my first comment.  Here again:
> > > >
> > > > Sorry about the missing. :)
> > > >
> > > > >
> > > > >
> > >
> ==========================================================
> > > > > ======
> > > > > > +menuconfig SND_REDUCED_MEMORY_FOOTPRINT
> > > > > > +	bool "Reduced Memory Footprint Support"
> > > > > > +	default n
> > > > > > +	help
> > > > > > +	  Say 'Y' to enable Reduced Memory Footprint Support, which
> may
> > > > > > +	  reduce code size and data footprint as much as possible.
> > > > >
> > > > > I'd like to move this into sound/core.
> > > > > Also, the kconfig name appears a bit too lengthy to me.
> > > > >
> > >
> ==========================================================
> > > > > ======
> > > > >
> > > > > And, after reading this again, I wonder whether we just take the
> > > > > existing CONFIG_EXPERT for allowing the selection of more knobs
> > > > > like CONFIG_SND_PROC_FS.
> > > > >
> > > > > SND_PROC_FS
> > > > > 	bool "Sound proc file" if EXPERT
> > > >
> > > > Sounds good. Then we don't need
> 'SND_REDUCED_MEMORY_FOOTPRINT'
> > > > any more? Or we can keep it as root menu of the set of items, just
> > > > as
> > > below?
> > > > (I changed it to SND_SMALL_FOOTPRINT, as your comment above)
> > >
> > > I originally thought to select items from SND_SMALL_FOOTPRINT, but
> > > this doesn't seem to work.  At least, "de"selecting isn't supported by
> Kconfig (i.e.
> > > set SND_PROC_FS=n when SND_SMALL_FOOTPRINT=y).
> > > We may have SND_NO_PROC_FS and select it, but it's too bad.
> > >
> > > So, IMO, we can drop SND_SMALL_FOOTPRINT but let users choose each
> > > knob when EXPERT=y.
> >
> > Firstly, I used sound/Kconfig but not sound/core/Kconfig, because some
> > efforts for reducing footprint are based on sound/asoc/(e.g. dapm,
> > dpcm, ...).
> 
> sound/core/Kconfig defines the core sound components and configurations,
> so it's more appropriate.
 
OK.

> 
> > Secondly, if we drop SND_SMALL_FOOTPRINT, then we have to add
> > several(may up to ~10) knobs under the sound menu(Sound Card Support),
> > which looks messy and not neat.
> 
> The question is whether we want more selectable knobs.  If you got for
> simplicity, SND_PROC_FS shouldn't be selectable either, but just give
> SND_SMALL_FOOTPRINT selectable.
 
OK, then I will drop this SND_SMALL_FOOTPRINT and keep SND_PROC_FS,
and resend soon.

~Keyon

> 
> 
> Takashi

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-27  8:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-26 13:13 [PATCH 0/2] reducing memory footprint of ALSA Jie Yang
2015-05-26 13:13 ` [PATCH v2 1/2] ALSA: Kconfig: add config menu for reduced memory footprint Jie Yang
2015-05-26 13:13 ` [PATCH v2 2/2] ALSA: set no sound proc fs " Jie Yang
2015-05-27  4:49   ` Sudip Mukherjee
2015-05-27  5:38     ` Jie, Yang
2015-05-27  6:18       ` Takashi Iwai
2015-05-27  7:09         ` Jie, Yang
2015-05-27  7:22           ` Takashi Iwai
2015-05-27  7:40             ` Jie, Yang
2015-05-27  7:46               ` Takashi Iwai
2015-05-27  8:35                 ` Jie, Yang

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).