RE: question about sound/soc/intel/boards/mfld_machine.c

2016-11-20 Thread Jie, Yang
> -Original Message-
> From: Julia Lawall [mailto:julia.law...@lip6.fr]
> Sent: Sunday, November 20, 2016 1:34 AM
> To: lgirdw...@gmail.com; broo...@kernel.org; pe...@perex.cz;
> ti...@suse.com; Jie, Yang <yang@intel.com>
> Cc: alsa-de...@alsa-project.org; linux-kernel@vger.kernel.org
> Subject: question about sound/soc/intel/boards/mfld_machine.c
> 
> Hello,
> 
> I wonder if the file sound/soc/intel/boards/mfld_machine.c is useful?
> Until:
> 
> commit e56c72d5f201044b14191c5b83a25e17f2d68ccf
> Author: Jie Yang <yang@intel.com>
> Date:   Thu Apr 2 15:37:02 2015 +0800
> 
> ASoC: Intel: create boards folder and move sst boards files in
> 
> it was in the directory sound/soc/intel and mentioned in
> sound/soc/intel/Makefile.  The above patch moved it to
> sound/soc/intel/boards/, but didn't adjust its Makefile entry.  The patch:
> 
> commit b97169da06992ef04081e66ed22bbdb23dbf6610
> Author: Jie Yang <yang@intel.com>
> Date:   Thu Apr 2 15:37:04 2015 +0800
> 
> ASoC: Intel: create atom folder and move atom platform files in
> 
> removed it from sound/soc/intel/Makefile, but didn't move it anywhere.
> As far as I can tell, there is currently no make information for the file in 
> the
> kernel.
> 
> Should the file be dropped?

Thanks for reporting, Julia. I believe this is missed during the folder
restruction. 

Hi Vinod, what do you think? If needed, I can add it to intel/Kconfig.

Thanks,
~Keyon

> 
> julia


RE: question about sound/soc/intel/boards/mfld_machine.c

2016-11-20 Thread Jie, Yang
> -Original Message-
> From: Julia Lawall [mailto:julia.law...@lip6.fr]
> Sent: Sunday, November 20, 2016 1:34 AM
> To: lgirdw...@gmail.com; broo...@kernel.org; pe...@perex.cz;
> ti...@suse.com; Jie, Yang 
> Cc: alsa-de...@alsa-project.org; linux-kernel@vger.kernel.org
> Subject: question about sound/soc/intel/boards/mfld_machine.c
> 
> Hello,
> 
> I wonder if the file sound/soc/intel/boards/mfld_machine.c is useful?
> Until:
> 
> commit e56c72d5f201044b14191c5b83a25e17f2d68ccf
> Author: Jie Yang 
> Date:   Thu Apr 2 15:37:02 2015 +0800
> 
> ASoC: Intel: create boards folder and move sst boards files in
> 
> it was in the directory sound/soc/intel and mentioned in
> sound/soc/intel/Makefile.  The above patch moved it to
> sound/soc/intel/boards/, but didn't adjust its Makefile entry.  The patch:
> 
> commit b97169da06992ef04081e66ed22bbdb23dbf6610
> Author: Jie Yang 
> Date:   Thu Apr 2 15:37:04 2015 +0800
> 
> ASoC: Intel: create atom folder and move atom platform files in
> 
> removed it from sound/soc/intel/Makefile, but didn't move it anywhere.
> As far as I can tell, there is currently no make information for the file in 
> the
> kernel.
> 
> Should the file be dropped?

Thanks for reporting, Julia. I believe this is missed during the folder
restruction. 

Hi Vinod, what do you think? If needed, I can add it to intel/Kconfig.

Thanks,
~Keyon

> 
> julia


RE: undefined reference to `snd_timer_interrupt'

2016-01-26 Thread Jie, Yang
>-Original Message-
>From: Takashi Iwai [mailto:ti...@suse.de]
>Sent: Wednesday, January 27, 2016 2:14 PM
>To: Wu, Fengguang
>Cc: Jie, Yang; kbuild-...@01.org; linux-kernel@vger.kernel.org
>Subject: Re: undefined reference to `snd_timer_interrupt'
>
>On Tue, 26 Jan 2016 23:16:55 +0100,
>kbuild test robot wrote:
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>master
>> head:   92e963f50fc74041b5e9e744c330dca48e04f08d
>> commit: 90bbaf66ee7b946952f1e82a0069639dea5fd893 ALSA: timer: add
>config item to export PCM timer disabling for expert
>> date:   3 months ago
>> config: x86_64-randconfig-s0-01270516 (attached as .config)
>> reproduce:
>> git checkout 90bbaf66ee7b946952f1e82a0069639dea5fd893
>> # save the attached .config to linux build tree
>> make ARCH=x86_64
>>
>> All errors (new ones prefixed by >>):
>>
>>sound/built-in.o: In function `snd_emu10k1_interrupt':
>> >> (.text+0x604c7): undefined reference to `snd_timer_interrupt'
>>sound/built-in.o: In function `snd_emu10k1_timer':
>> >> (.text+0x70d5d): undefined reference to `snd_timer_new'
>
>Fixed by the patch below.
 
Thanks, I also just worked out the exactly same patch and planning
to submit.  So now I can enjoy a cup of tea :-

thanks,
~Keyon
>
>
>thanks,
>
>Takashi
>
>-- 8< --
>From: Takashi Iwai 
>Subject: [PATCH] ALSA: Add missing dependency on CONFIG_SND_TIMER
>
>Since the build of PCM timer may be disabled via Kconfig now, each
>driver that provides a timer interface needs to set CONFIG_SND_TIMER
>explicitly.  Otherwise it may get a build error due to missing
>symbol.
>
>Fixes: 90bbaf66ee7b ('ALSA: timer: add config item to export PCM timer
>disabling for expert')
>Reported-by: kbuild test robot 
>Cc:  # v4.4+
>Signed-off-by: Takashi Iwai 
>---
> sound/isa/Kconfig   | 4 
> sound/pci/Kconfig   | 3 +++
> sound/sparc/Kconfig | 1 +
> 3 files changed, 8 insertions(+)
>
>diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
>index 0216475fc759..37adcc6cbe6b 100644
>--- a/sound/isa/Kconfig
>+++ b/sound/isa/Kconfig
>@@ -3,6 +3,7 @@
> config SND_WSS_LIB
> tristate
> select SND_PCM
>+  select SND_TIMER
>
> config SND_SB_COMMON
> tristate
>@@ -42,6 +43,7 @@ config SND_AD1816A
>   select SND_OPL3_LIB
>   select SND_MPU401_UART
>   select SND_PCM
>+  select SND_TIMER
>   help
> Say Y here to include support for Analog Devices SoundPort
> AD1816A or compatible sound chips.
>@@ -209,6 +211,7 @@ config SND_GUSCLASSIC
>   tristate "Gravis UltraSound Classic"
>   select SND_RAWMIDI
>   select SND_PCM
>+  select SND_TIMER
>   help
> Say Y here to include support for Gravis UltraSound Classic
> soundcards.
>@@ -221,6 +224,7 @@ config SND_GUSEXTREME
>   select SND_OPL3_LIB
>   select SND_MPU401_UART
>   select SND_PCM
>+  select SND_TIMER
>   help
> Say Y here to include support for Gravis UltraSound Extreme
> soundcards.
>diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
>index 656ce39bddbc..8f6594a7d37f 100644
>--- a/sound/pci/Kconfig
>+++ b/sound/pci/Kconfig
>@@ -155,6 +155,7 @@ config SND_AZT3328
>   select SND_PCM
>   select SND_RAWMIDI
>   select SND_AC97_CODEC
>+  select SND_TIMER
>   depends on ZONE_DMA
>   help
> Say Y here to include support for Aztech AZF3328 (PCI168)
>@@ -463,6 +464,7 @@ config SND_EMU10K1
>   select SND_HWDEP
>   select SND_RAWMIDI
>   select SND_AC97_CODEC
>+  select SND_TIMER
>   depends on ZONE_DMA
>   help
> Say Y to include support for Sound Blaster PCI 512, Live!,
>@@ -889,6 +891,7 @@ config SND_YMFPCI
>   select SND_OPL3_LIB
>   select SND_MPU401_UART
>   select SND_AC97_CODEC
>+  select SND_TIMER
>   help
> Say Y here to include support for Yamaha PCI audio chips -
> YMF724, YMF724F, YMF740, YMF740C, YMF744, YMF754.
>diff --git a/sound/sparc/Kconfig b/sound/sparc/Kconfig
>index d75deba5617d..dfcd38647606 100644
>--- a/sound/sparc/Kconfig
>+++ b/sound/sparc/Kconfig
>@@ -22,6 +22,7 @@ config SND_SUN_AMD7930
> config SND_SUN_CS4231
>   tristate "Sun CS4231"
>   select SND_PCM
>+  select SND_TIMER
>   help
> Say Y here to include support for CS4231 sound device on Sun.
>
>--
>2.7.0



RE: undefined reference to `snd_timer_interrupt'

2016-01-26 Thread Jie, Yang
>-Original Message-
>From: Takashi Iwai [mailto:ti...@suse.de]
>Sent: Wednesday, January 27, 2016 2:14 PM
>To: Wu, Fengguang
>Cc: Jie, Yang; kbuild-...@01.org; linux-kernel@vger.kernel.org
>Subject: Re: undefined reference to `snd_timer_interrupt'
>
>On Tue, 26 Jan 2016 23:16:55 +0100,
>kbuild test robot wrote:
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>master
>> head:   92e963f50fc74041b5e9e744c330dca48e04f08d
>> commit: 90bbaf66ee7b946952f1e82a0069639dea5fd893 ALSA: timer: add
>config item to export PCM timer disabling for expert
>> date:   3 months ago
>> config: x86_64-randconfig-s0-01270516 (attached as .config)
>> reproduce:
>> git checkout 90bbaf66ee7b946952f1e82a0069639dea5fd893
>> # save the attached .config to linux build tree
>> make ARCH=x86_64
>>
>> All errors (new ones prefixed by >>):
>>
>>sound/built-in.o: In function `snd_emu10k1_interrupt':
>> >> (.text+0x604c7): undefined reference to `snd_timer_interrupt'
>>sound/built-in.o: In function `snd_emu10k1_timer':
>> >> (.text+0x70d5d): undefined reference to `snd_timer_new'
>
>Fixed by the patch below.
 
Thanks, I also just worked out the exactly same patch and planning
to submit.  So now I can enjoy a cup of tea :-

thanks,
~Keyon
>
>
>thanks,
>
>Takashi
>
>-- 8< --
>From: Takashi Iwai <ti...@suse.de>
>Subject: [PATCH] ALSA: Add missing dependency on CONFIG_SND_TIMER
>
>Since the build of PCM timer may be disabled via Kconfig now, each
>driver that provides a timer interface needs to set CONFIG_SND_TIMER
>explicitly.  Otherwise it may get a build error due to missing
>symbol.
>
>Fixes: 90bbaf66ee7b ('ALSA: timer: add config item to export PCM timer
>disabling for expert')
>Reported-by: kbuild test robot <fengguang...@intel.com>
>Cc: <sta...@vger.kernel.org> # v4.4+
>Signed-off-by: Takashi Iwai <ti...@suse.de>
>---
> sound/isa/Kconfig   | 4 
> sound/pci/Kconfig   | 3 +++
> sound/sparc/Kconfig | 1 +
> 3 files changed, 8 insertions(+)
>
>diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
>index 0216475fc759..37adcc6cbe6b 100644
>--- a/sound/isa/Kconfig
>+++ b/sound/isa/Kconfig
>@@ -3,6 +3,7 @@
> config SND_WSS_LIB
> tristate
> select SND_PCM
>+  select SND_TIMER
>
> config SND_SB_COMMON
> tristate
>@@ -42,6 +43,7 @@ config SND_AD1816A
>   select SND_OPL3_LIB
>   select SND_MPU401_UART
>   select SND_PCM
>+  select SND_TIMER
>   help
> Say Y here to include support for Analog Devices SoundPort
> AD1816A or compatible sound chips.
>@@ -209,6 +211,7 @@ config SND_GUSCLASSIC
>   tristate "Gravis UltraSound Classic"
>   select SND_RAWMIDI
>   select SND_PCM
>+  select SND_TIMER
>   help
> Say Y here to include support for Gravis UltraSound Classic
> soundcards.
>@@ -221,6 +224,7 @@ config SND_GUSEXTREME
>   select SND_OPL3_LIB
>   select SND_MPU401_UART
>   select SND_PCM
>+  select SND_TIMER
>   help
> Say Y here to include support for Gravis UltraSound Extreme
> soundcards.
>diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
>index 656ce39bddbc..8f6594a7d37f 100644
>--- a/sound/pci/Kconfig
>+++ b/sound/pci/Kconfig
>@@ -155,6 +155,7 @@ config SND_AZT3328
>   select SND_PCM
>   select SND_RAWMIDI
>   select SND_AC97_CODEC
>+  select SND_TIMER
>   depends on ZONE_DMA
>   help
> Say Y here to include support for Aztech AZF3328 (PCI168)
>@@ -463,6 +464,7 @@ config SND_EMU10K1
>   select SND_HWDEP
>   select SND_RAWMIDI
>   select SND_AC97_CODEC
>+  select SND_TIMER
>   depends on ZONE_DMA
>   help
> Say Y to include support for Sound Blaster PCI 512, Live!,
>@@ -889,6 +891,7 @@ config SND_YMFPCI
>   select SND_OPL3_LIB
>   select SND_MPU401_UART
>   select SND_AC97_CODEC
>+  select SND_TIMER
>   help
> Say Y here to include support for Yamaha PCI audio chips -
> YMF724, YMF724F, YMF740, YMF740C, YMF744, YMF754.
>diff --git a/sound/sparc/Kconfig b/sound/sparc/Kconfig
>index d75deba5617d..dfcd38647606 100644
>--- a/sound/sparc/Kconfig
>+++ b/sound/sparc/Kconfig
>@@ -22,6 +22,7 @@ config SND_SUN_AMD7930
> config SND_SUN_CS4231
>   tristate "Sun CS4231"
>   select SND_PCM
>+  select SND_TIMER
>   help
> Say Y here to include support for CS4231 sound device on Sun.
>
>--
>2.7.0



[PATCH v2] ASoC: Intel: sst: only use sst-firmware when DW DMAC is available

2015-10-21 Thread Jie Yang
Currentlly, we use Synopsys DesignWare DMA Controller for
baytrail/haswell/broadwell ADSP firmware loading, but for
skylake, we don't use it, compiling sst-firmware.c may
introduce error when CONFIG_DW_DMAC_CORE is not enabled:

sound/built-in.o: In function `sst_dma_new':
(.text+0xd7b38): undefined reference to `dw_dma_probe'
sound/built-in.o: In function `sst_dma_free':
(.text+0xd7c0a): undefined reference to `dw_dma_remove'

Here we only compile sst-firmware when CONFIG_DW_DMAC_CORE
is selected, to fix the linking error issue.

Reported-by: Randy Dunlap 
Signed-off-by: Jie Yang 
---
 sound/soc/intel/common/Makefile  | 6 +-
 sound/soc/intel/common/sst-dsp.c | 2 ++
 sound/soc/intel/common/sst-dsp.h | 2 ++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/common/Makefile b/sound/soc/intel/common/Makefile
index f24154c..d910558 100644
--- a/sound/soc/intel/common/Makefile
+++ b/sound/soc/intel/common/Makefile
@@ -1,7 +1,11 @@
-snd-soc-sst-dsp-objs := sst-dsp.o sst-firmware.o
+snd-soc-sst-dsp-objs := sst-dsp.o
 snd-soc-sst-acpi-objs := sst-acpi.o
 snd-soc-sst-ipc-objs := sst-ipc.o
 
+ifneq ($(CONFIG_DW_DMAC_CORE),)
+snd-soc-sst-dsp-objs += sst-firmware.o
+endif
+
 obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o
 obj-$(CONFIG_SND_SOC_INTEL_SST_ACPI) += snd-soc-sst-acpi.o
 
diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c
index a627236..c9452e0 100644
--- a/sound/soc/intel/common/sst-dsp.c
+++ b/sound/soc/intel/common/sst-dsp.c
@@ -420,6 +420,7 @@ void sst_dsp_inbox_read(struct sst_dsp *sst, void *message, 
size_t bytes)
 }
 EXPORT_SYMBOL_GPL(sst_dsp_inbox_read);
 
+#if IS_ENABLED(CONFIG_DW_DMAC_CORE)
 struct sst_dsp *sst_dsp_new(struct device *dev,
struct sst_dsp_device *sst_dev, struct sst_pdata *pdata)
 {
@@ -484,6 +485,7 @@ void sst_dsp_free(struct sst_dsp *sst)
sst_dma_free(sst->dma);
 }
 EXPORT_SYMBOL_GPL(sst_dsp_free);
+#endif
 
 /* Module information */
 MODULE_AUTHOR("Liam Girdwood");
diff --git a/sound/soc/intel/common/sst-dsp.h b/sound/soc/intel/common/sst-dsp.h
index 1f45f18..859f0de 100644
--- a/sound/soc/intel/common/sst-dsp.h
+++ b/sound/soc/intel/common/sst-dsp.h
@@ -216,10 +216,12 @@ struct sst_pdata {
void *dsp;
 };
 
+#if IS_ENABLED(CONFIG_DW_DMAC_CORE)
 /* Initialization */
 struct sst_dsp *sst_dsp_new(struct device *dev,
struct sst_dsp_device *sst_dev, struct sst_pdata *pdata);
 void sst_dsp_free(struct sst_dsp *sst);
+#endif
 
 /* SHIM Read / Write */
 void sst_dsp_shim_write(struct sst_dsp *sst, u32 offset, u32 value);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] ASoC: Intel: sst: only use sst-firmware when DW DMAC is available

2015-10-21 Thread Jie Yang
Currentlly, we use Synopsys DesignWare DMA Controller for
baytrail/haswell/broadwell ADSP firmware loading, but for
skylake, we don't use it, compiling sst-firmware.c may
introduce error when CONFIG_DW_DMAC_CORE is not enabled:

sound/built-in.o: In function `sst_dma_new':
(.text+0xd7b38): undefined reference to `dw_dma_probe'
sound/built-in.o: In function `sst_dma_free':
(.text+0xd7c0a): undefined reference to `dw_dma_remove'

Here we only compile sst-firmware when CONFIG_DW_DMAC_CORE
is selected, to fix the linking error issue.

Reported-by: Randy Dunlap 
Signed-off-by: Jie Yang 
---
 sound/soc/intel/common/Makefile  | 3 ++-
 sound/soc/intel/common/sst-dsp.c | 2 ++
 sound/soc/intel/common/sst-dsp.h | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/common/Makefile b/sound/soc/intel/common/Makefile
index f24154c..55342a1 100644
--- a/sound/soc/intel/common/Makefile
+++ b/sound/soc/intel/common/Makefile
@@ -1,4 +1,5 @@
-snd-soc-sst-dsp-objs := sst-dsp.o sst-firmware.o
+snd-soc-sst-dsp-objs := sst-dsp.o
+snd-soc-sst-dsp-$(CONFIG_DW_DMAC_CORE) += sst-firmware.o
 snd-soc-sst-acpi-objs := sst-acpi.o
 snd-soc-sst-ipc-objs := sst-ipc.o
 
diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c
index a627236..b5bbdf4 100644
--- a/sound/soc/intel/common/sst-dsp.c
+++ b/sound/soc/intel/common/sst-dsp.c
@@ -420,6 +420,7 @@ void sst_dsp_inbox_read(struct sst_dsp *sst, void *message, 
size_t bytes)
 }
 EXPORT_SYMBOL_GPL(sst_dsp_inbox_read);
 
+#ifdef CONFIG_DW_DMAC_CORE
 struct sst_dsp *sst_dsp_new(struct device *dev,
struct sst_dsp_device *sst_dev, struct sst_pdata *pdata)
 {
@@ -484,6 +485,7 @@ void sst_dsp_free(struct sst_dsp *sst)
sst_dma_free(sst->dma);
 }
 EXPORT_SYMBOL_GPL(sst_dsp_free);
+#endif
 
 /* Module information */
 MODULE_AUTHOR("Liam Girdwood");
diff --git a/sound/soc/intel/common/sst-dsp.h b/sound/soc/intel/common/sst-dsp.h
index 1f45f18..0b84c71 100644
--- a/sound/soc/intel/common/sst-dsp.h
+++ b/sound/soc/intel/common/sst-dsp.h
@@ -216,10 +216,12 @@ struct sst_pdata {
void *dsp;
 };
 
+#ifdef CONFIG_DW_DMAC_CORE
 /* Initialization */
 struct sst_dsp *sst_dsp_new(struct device *dev,
struct sst_dsp_device *sst_dev, struct sst_pdata *pdata);
 void sst_dsp_free(struct sst_dsp *sst);
+#endif
 
 /* SHIM Read / Write */
 void sst_dsp_shim_write(struct sst_dsp *sst, u32 offset, u32 value);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] ASoC: Intel: sst: only use sst-firmware when DW DMAC is available

2015-10-21 Thread Jie Yang
Currentlly, we use Synopsys DesignWare DMA Controller for
baytrail/haswell/broadwell ADSP firmware loading, but for
skylake, we don't use it, compiling sst-firmware.c may
introduce error when CONFIG_DW_DMAC_CORE is not enabled:

sound/built-in.o: In function `sst_dma_new':
(.text+0xd7b38): undefined reference to `dw_dma_probe'
sound/built-in.o: In function `sst_dma_free':
(.text+0xd7c0a): undefined reference to `dw_dma_remove'

Here we only compile sst-firmware when CONFIG_DW_DMAC_CORE
is selected, to fix the linking error issue.

Reported-by: Randy Dunlap <rdun...@infradead.org>
Signed-off-by: Jie Yang <yang@intel.com>
---
 sound/soc/intel/common/Makefile  | 6 +-
 sound/soc/intel/common/sst-dsp.c | 2 ++
 sound/soc/intel/common/sst-dsp.h | 2 ++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/common/Makefile b/sound/soc/intel/common/Makefile
index f24154c..d910558 100644
--- a/sound/soc/intel/common/Makefile
+++ b/sound/soc/intel/common/Makefile
@@ -1,7 +1,11 @@
-snd-soc-sst-dsp-objs := sst-dsp.o sst-firmware.o
+snd-soc-sst-dsp-objs := sst-dsp.o
 snd-soc-sst-acpi-objs := sst-acpi.o
 snd-soc-sst-ipc-objs := sst-ipc.o
 
+ifneq ($(CONFIG_DW_DMAC_CORE),)
+snd-soc-sst-dsp-objs += sst-firmware.o
+endif
+
 obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o
 obj-$(CONFIG_SND_SOC_INTEL_SST_ACPI) += snd-soc-sst-acpi.o
 
diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c
index a627236..c9452e0 100644
--- a/sound/soc/intel/common/sst-dsp.c
+++ b/sound/soc/intel/common/sst-dsp.c
@@ -420,6 +420,7 @@ void sst_dsp_inbox_read(struct sst_dsp *sst, void *message, 
size_t bytes)
 }
 EXPORT_SYMBOL_GPL(sst_dsp_inbox_read);
 
+#if IS_ENABLED(CONFIG_DW_DMAC_CORE)
 struct sst_dsp *sst_dsp_new(struct device *dev,
struct sst_dsp_device *sst_dev, struct sst_pdata *pdata)
 {
@@ -484,6 +485,7 @@ void sst_dsp_free(struct sst_dsp *sst)
sst_dma_free(sst->dma);
 }
 EXPORT_SYMBOL_GPL(sst_dsp_free);
+#endif
 
 /* Module information */
 MODULE_AUTHOR("Liam Girdwood");
diff --git a/sound/soc/intel/common/sst-dsp.h b/sound/soc/intel/common/sst-dsp.h
index 1f45f18..859f0de 100644
--- a/sound/soc/intel/common/sst-dsp.h
+++ b/sound/soc/intel/common/sst-dsp.h
@@ -216,10 +216,12 @@ struct sst_pdata {
void *dsp;
 };
 
+#if IS_ENABLED(CONFIG_DW_DMAC_CORE)
 /* Initialization */
 struct sst_dsp *sst_dsp_new(struct device *dev,
struct sst_dsp_device *sst_dev, struct sst_pdata *pdata);
 void sst_dsp_free(struct sst_dsp *sst);
+#endif
 
 /* SHIM Read / Write */
 void sst_dsp_shim_write(struct sst_dsp *sst, u32 offset, u32 value);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] ASoC: Intel: sst: only use sst-firmware when DW DMAC is available

2015-10-21 Thread Jie Yang
Currentlly, we use Synopsys DesignWare DMA Controller for
baytrail/haswell/broadwell ADSP firmware loading, but for
skylake, we don't use it, compiling sst-firmware.c may
introduce error when CONFIG_DW_DMAC_CORE is not enabled:

sound/built-in.o: In function `sst_dma_new':
(.text+0xd7b38): undefined reference to `dw_dma_probe'
sound/built-in.o: In function `sst_dma_free':
(.text+0xd7c0a): undefined reference to `dw_dma_remove'

Here we only compile sst-firmware when CONFIG_DW_DMAC_CORE
is selected, to fix the linking error issue.

Reported-by: Randy Dunlap <rdun...@infradead.org>
Signed-off-by: Jie Yang <yang@intel.com>
---
 sound/soc/intel/common/Makefile  | 3 ++-
 sound/soc/intel/common/sst-dsp.c | 2 ++
 sound/soc/intel/common/sst-dsp.h | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/common/Makefile b/sound/soc/intel/common/Makefile
index f24154c..55342a1 100644
--- a/sound/soc/intel/common/Makefile
+++ b/sound/soc/intel/common/Makefile
@@ -1,4 +1,5 @@
-snd-soc-sst-dsp-objs := sst-dsp.o sst-firmware.o
+snd-soc-sst-dsp-objs := sst-dsp.o
+snd-soc-sst-dsp-$(CONFIG_DW_DMAC_CORE) += sst-firmware.o
 snd-soc-sst-acpi-objs := sst-acpi.o
 snd-soc-sst-ipc-objs := sst-ipc.o
 
diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c
index a627236..b5bbdf4 100644
--- a/sound/soc/intel/common/sst-dsp.c
+++ b/sound/soc/intel/common/sst-dsp.c
@@ -420,6 +420,7 @@ void sst_dsp_inbox_read(struct sst_dsp *sst, void *message, 
size_t bytes)
 }
 EXPORT_SYMBOL_GPL(sst_dsp_inbox_read);
 
+#ifdef CONFIG_DW_DMAC_CORE
 struct sst_dsp *sst_dsp_new(struct device *dev,
struct sst_dsp_device *sst_dev, struct sst_pdata *pdata)
 {
@@ -484,6 +485,7 @@ void sst_dsp_free(struct sst_dsp *sst)
sst_dma_free(sst->dma);
 }
 EXPORT_SYMBOL_GPL(sst_dsp_free);
+#endif
 
 /* Module information */
 MODULE_AUTHOR("Liam Girdwood");
diff --git a/sound/soc/intel/common/sst-dsp.h b/sound/soc/intel/common/sst-dsp.h
index 1f45f18..0b84c71 100644
--- a/sound/soc/intel/common/sst-dsp.h
+++ b/sound/soc/intel/common/sst-dsp.h
@@ -216,10 +216,12 @@ struct sst_pdata {
void *dsp;
 };
 
+#ifdef CONFIG_DW_DMAC_CORE
 /* Initialization */
 struct sst_dsp *sst_dsp_new(struct device *dev,
struct sst_dsp_device *sst_dev, struct sst_pdata *pdata);
 void sst_dsp_free(struct sst_dsp *sst);
+#endif
 
 /* SHIM Read / Write */
 void sst_dsp_shim_write(struct sst_dsp *sst, u32 offset, u32 value);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: Problems loading firmware using built-in drivers with kernels that use initramfs.

2015-08-26 Thread Jie, Yang
> -Original Message-
> From: Liam Girdwood [mailto:liam.r.girdw...@linux.intel.com]
> Sent: Wednesday, August 26, 2015 4:07 PM
> To: Jie, Yang
> Cc: Takashi Iwai; Dmitry Torokhov; Luis R. Rodriguez;
> joonas.lahti...@linux.intel.com; Tom Gundersen; Ming Lei; Al Viro; Greg
> Kroah-Hartman; Kay Sievers; Linus Torvalds; David Woodhouse; Luis
> Rodriguez; lkml; yalin wang
> Subject: Re: Problems loading firmware using built-in drivers with kernels
> that use initramfs.
> 
> On Wed, 2015-08-26 at 07:17 +0100, Jie, Yang wrote:
> > > -Original Message-
> > > From: Takashi Iwai [mailto:ti...@suse.de]
> > > Sent: Wednesday, August 26, 2015 1:33 PM
> > > To: Jie, Yang
> > > Cc: Dmitry Torokhov; Luis R. Rodriguez; Girdwood, Liam R;
> > > joonas.lahti...@linux.intel.com; Tom Gundersen; Ming Lei; Al Viro;
> > > Greg Kroah-Hartman; Kay Sievers; Linus Torvalds; David Woodhouse;
> > > Luis Rodriguez; lkml
> > > Subject: Re: Problems loading firmware using built-in drivers with
> > > kernels that use initramfs.
> > >
> > > It's possible -- and even with the normal request_firmware(), in
> > > theory.  The missing piece is that you need to inform the helper to retry
> the f/w loading.
> > > Currently the direct f/w loader assumes that the file is there and
> > > returns error if not present.
> > >
> > > If we implement a retry, another question is how to trigger it, i.e.
> > > how the helper can know when a fs is mounted a new file is present.
> >
> > Got it, thanks Takashi and all.
> >
> > So looks we should(and already done for most audio firmware) implement
> > it as Dmitry and Linus proposed, that is to make sure
> > request_firmware() calls are not in driver's probe() paths.
> >
> > Yalin help posted sample code for this implementation(to request
> > firmware in device node open) and actually I also did similar for
> > Broadwell ADSP driver and will send out later, thank you all.
> 
> Keyon, we have a similar situation to that of the FPGA example that Linus
> described when the DSP driver uses topology data. i.e. the audio driver will
> have no PCM devices that can be opened (to initiate the FW
> loading) until after the FW is loaded. The topology data is part of the FW and
> contains the PCMs, kcontrols, graphs etc. i.e. a PCM device is created for
> every PCM description found in the FW topology data.
> 
> I think the options are to either :-
> 
> 1) Don not support audio DSP drivers using topology data as built-in drivers.
> Audio is not really a critical system required for booting anyway.
> 
> 2) Create a default PCM for every driver that has topology data on the
> assumption that every sound card will at least 1 PCM. This PCM can then be
> re-configured when the FW is loaded.

Yep, this case is quite similar with what Linus described.
 
Is it possible that we can probe pcm device after firmware is loaded for this
case?

What I am thinking about is postponing all firmware related(e.g. pcm probing,
dma/dsp/ipc initialization, ...) code to that rootfs is ready and FW is loaded.

~Keyon

> 
> Liam
> 



RE: Problems loading firmware using built-in drivers with kernels that use initramfs.

2015-08-26 Thread Jie, Yang
> -Original Message-
> From: Takashi Iwai [mailto:ti...@suse.de]
> Sent: Wednesday, August 26, 2015 1:33 PM
> To: Jie, Yang
> Cc: Dmitry Torokhov; Luis R. Rodriguez; Girdwood, Liam R;
> joonas.lahti...@linux.intel.com; Tom Gundersen; Ming Lei; Al Viro; Greg
> Kroah-Hartman; Kay Sievers; Linus Torvalds; David Woodhouse; Luis
> Rodriguez; lkml
> Subject: Re: Problems loading firmware using built-in drivers with kernels
> that use initramfs.
> 
> On Wed, 26 Aug 2015 07:12:46 +0200,
> Jie, Yang wrote:
> >
> > > -Original Message-
> > > From: Dmitry Torokhov [mailto:dmitry.torok...@gmail.com]
> > > Sent: Wednesday, August 26, 2015 3:58 AM
> > > To: Takashi Iwai
> > > Cc: Luis R. Rodriguez; Girdwood, Liam R; Jie, Yang;
> > > joonas.lahti...@linux.intel.com; Tom Gundersen; Ming Lei; Al Viro;
> > > Greg Kroah-Hartman; Kay Sievers; Linus Torvalds; David Woodhouse;
> > > Luis Rodriguez; lkml
> > > Subject: Re: Problems loading firmware using built-in drivers with
> > > kernels that use initramfs.
> > >
> > > On Tue, Aug 25, 2015 at 12:46 PM, Takashi Iwai  wrote:
> > > > On Tue, 25 Aug 2015 21:34:08 +0200, Luis R. Rodriguez wrote:
> > > >>
> > > >> On Tue, Aug 25, 2015 at 10:17:00AM +0100, David Woodhouse wrote:
> > > >> > Luis, did you tell me the other day that you made the kernel
> > > >> > get firmware directly from the file system? This regression
> > > >> > would be yours
> > > then?
> > > >>
> > > >> I didn't implement that, Linus did in 2012 (see commit
> > > >> abb139e75c2c titled
> > > >> "firmware: teach the kernel to load firmware files directly from
> > > >> the filesystem"). But we used to fallback to a userspace helper
> > > >> when the fw was not present and then Takashi made this optional
> > > >> via commit 7b1269f778782d titled "firmware: Make user-mode helper
> optional".
> > > >> Takashi noted in the Kconfig "The user-mode helper is no longer
> > > >> required unless you have a special firmware file that resides in
> > > >> a non-standard path". It was not clarified why that's true
> > > >> though, or what you'd need to do to ensure that the fw would be
> > > >> available. It would be good for us to elaborate on that.
> > > >
> > > > The recent udev already dropped the firmware loading feature.
> > >
> > > Note that even when we had udev helper to load the firmware it was
> > > not always reliable depending on the exact point where we requested
> firmware.
> > > If request happened in probe() path before we mounted root fs then
> > > we'd never get it loaded because we'd be waiting for devices settle
> > > before mounting rootfs.
> >
> > For request in probe(), is it possible to use
> > request_firmware_nowait() to wait rootfs mounted or timeout in another
> thread?
> >
> > It looks usermodehelper_disabled is 0(at probe()) at this case then no
> > waiting occurs here in our testing.
> 
> It's possible -- and even with the normal request_firmware(), in theory.  The
> missing piece is that you need to inform the helper to retry the f/w loading.
> Currently the direct f/w loader assumes that the file is there and returns
> error if not present.
> 
> If we implement a retry, another question is how to trigger it, i.e. how the
> helper can know when a fs is mounted a new file is present.
 
Got it, thanks Takashi and all.

So looks we should(and already done for most audio firmware) implement it 
as Dmitry and Linus proposed, that is to make sure request_firmware() calls
are not in driver's probe() paths.

Yalin help posted sample code for this implementation(to request firmware
in device node open) and actually I also did similar for Broadwell ADSP driver
and will send out later, thank you all.

Thanks,
~Keyon

> 
> 
> Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: Problems loading firmware using built-in drivers with kernels that use initramfs.

2015-08-26 Thread Jie, Yang
 -Original Message-
 From: Takashi Iwai [mailto:ti...@suse.de]
 Sent: Wednesday, August 26, 2015 1:33 PM
 To: Jie, Yang
 Cc: Dmitry Torokhov; Luis R. Rodriguez; Girdwood, Liam R;
 joonas.lahti...@linux.intel.com; Tom Gundersen; Ming Lei; Al Viro; Greg
 Kroah-Hartman; Kay Sievers; Linus Torvalds; David Woodhouse; Luis
 Rodriguez; lkml
 Subject: Re: Problems loading firmware using built-in drivers with kernels
 that use initramfs.
 
 On Wed, 26 Aug 2015 07:12:46 +0200,
 Jie, Yang wrote:
 
   -Original Message-
   From: Dmitry Torokhov [mailto:dmitry.torok...@gmail.com]
   Sent: Wednesday, August 26, 2015 3:58 AM
   To: Takashi Iwai
   Cc: Luis R. Rodriguez; Girdwood, Liam R; Jie, Yang;
   joonas.lahti...@linux.intel.com; Tom Gundersen; Ming Lei; Al Viro;
   Greg Kroah-Hartman; Kay Sievers; Linus Torvalds; David Woodhouse;
   Luis Rodriguez; lkml
   Subject: Re: Problems loading firmware using built-in drivers with
   kernels that use initramfs.
  
   On Tue, Aug 25, 2015 at 12:46 PM, Takashi Iwai ti...@suse.de wrote:
On Tue, 25 Aug 2015 21:34:08 +0200, Luis R. Rodriguez wrote:
   
On Tue, Aug 25, 2015 at 10:17:00AM +0100, David Woodhouse wrote:
 Luis, did you tell me the other day that you made the kernel
 get firmware directly from the file system? This regression
 would be yours
   then?
   
I didn't implement that, Linus did in 2012 (see commit
abb139e75c2c titled
firmware: teach the kernel to load firmware files directly from
the filesystem). But we used to fallback to a userspace helper
when the fw was not present and then Takashi made this optional
via commit 7b1269f778782d titled firmware: Make user-mode helper
 optional.
Takashi noted in the Kconfig The user-mode helper is no longer
required unless you have a special firmware file that resides in
a non-standard path. It was not clarified why that's true
though, or what you'd need to do to ensure that the fw would be
available. It would be good for us to elaborate on that.
   
The recent udev already dropped the firmware loading feature.
  
   Note that even when we had udev helper to load the firmware it was
   not always reliable depending on the exact point where we requested
 firmware.
   If request happened in probe() path before we mounted root fs then
   we'd never get it loaded because we'd be waiting for devices settle
   before mounting rootfs.
 
  For request in probe(), is it possible to use
  request_firmware_nowait() to wait rootfs mounted or timeout in another
 thread?
 
  It looks usermodehelper_disabled is 0(at probe()) at this case then no
  waiting occurs here in our testing.
 
 It's possible -- and even with the normal request_firmware(), in theory.  The
 missing piece is that you need to inform the helper to retry the f/w loading.
 Currently the direct f/w loader assumes that the file is there and returns
 error if not present.
 
 If we implement a retry, another question is how to trigger it, i.e. how the
 helper can know when a fs is mounted a new file is present.
 
Got it, thanks Takashi and all.

So looks we should(and already done for most audio firmware) implement it 
as Dmitry and Linus proposed, that is to make sure request_firmware() calls
are not in driver's probe() paths.

Yalin help posted sample code for this implementation(to request firmware
in device node open) and actually I also did similar for Broadwell ADSP driver
and will send out later, thank you all.

Thanks,
~Keyon

 
 
 Takashi
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: Problems loading firmware using built-in drivers with kernels that use initramfs.

2015-08-26 Thread Jie, Yang
 -Original Message-
 From: Liam Girdwood [mailto:liam.r.girdw...@linux.intel.com]
 Sent: Wednesday, August 26, 2015 4:07 PM
 To: Jie, Yang
 Cc: Takashi Iwai; Dmitry Torokhov; Luis R. Rodriguez;
 joonas.lahti...@linux.intel.com; Tom Gundersen; Ming Lei; Al Viro; Greg
 Kroah-Hartman; Kay Sievers; Linus Torvalds; David Woodhouse; Luis
 Rodriguez; lkml; yalin wang
 Subject: Re: Problems loading firmware using built-in drivers with kernels
 that use initramfs.
 
 On Wed, 2015-08-26 at 07:17 +0100, Jie, Yang wrote:
   -Original Message-
   From: Takashi Iwai [mailto:ti...@suse.de]
   Sent: Wednesday, August 26, 2015 1:33 PM
   To: Jie, Yang
   Cc: Dmitry Torokhov; Luis R. Rodriguez; Girdwood, Liam R;
   joonas.lahti...@linux.intel.com; Tom Gundersen; Ming Lei; Al Viro;
   Greg Kroah-Hartman; Kay Sievers; Linus Torvalds; David Woodhouse;
   Luis Rodriguez; lkml
   Subject: Re: Problems loading firmware using built-in drivers with
   kernels that use initramfs.
  
   It's possible -- and even with the normal request_firmware(), in
   theory.  The missing piece is that you need to inform the helper to retry
 the f/w loading.
   Currently the direct f/w loader assumes that the file is there and
   returns error if not present.
  
   If we implement a retry, another question is how to trigger it, i.e.
   how the helper can know when a fs is mounted a new file is present.
 
  Got it, thanks Takashi and all.
 
  So looks we should(and already done for most audio firmware) implement
  it as Dmitry and Linus proposed, that is to make sure
  request_firmware() calls are not in driver's probe() paths.
 
  Yalin help posted sample code for this implementation(to request
  firmware in device node open) and actually I also did similar for
  Broadwell ADSP driver and will send out later, thank you all.
 
 Keyon, we have a similar situation to that of the FPGA example that Linus
 described when the DSP driver uses topology data. i.e. the audio driver will
 have no PCM devices that can be opened (to initiate the FW
 loading) until after the FW is loaded. The topology data is part of the FW and
 contains the PCMs, kcontrols, graphs etc. i.e. a PCM device is created for
 every PCM description found in the FW topology data.
 
 I think the options are to either :-
 
 1) Don not support audio DSP drivers using topology data as built-in drivers.
 Audio is not really a critical system required for booting anyway.
 
 2) Create a default PCM for every driver that has topology data on the
 assumption that every sound card will at least 1 PCM. This PCM can then be
 re-configured when the FW is loaded.

Yep, this case is quite similar with what Linus described.
 
Is it possible that we can probe pcm device after firmware is loaded for this
case?

What I am thinking about is postponing all firmware related(e.g. pcm probing,
dma/dsp/ipc initialization, ...) code to that rootfs is ready and FW is loaded.

~Keyon

 
 Liam
 



RE: Problems loading firmware using built-in drivers with kernels that use initramfs.

2015-08-25 Thread Jie, Yang
> -Original Message-
> From: Dmitry Torokhov [mailto:dmitry.torok...@gmail.com]
> Sent: Wednesday, August 26, 2015 3:58 AM
> To: Takashi Iwai
> Cc: Luis R. Rodriguez; Girdwood, Liam R; Jie, Yang;
> joonas.lahti...@linux.intel.com; Tom Gundersen; Ming Lei; Al Viro; Greg
> Kroah-Hartman; Kay Sievers; Linus Torvalds; David Woodhouse; Luis
> Rodriguez; lkml
> Subject: Re: Problems loading firmware using built-in drivers with kernels
> that use initramfs.
> 
> On Tue, Aug 25, 2015 at 12:46 PM, Takashi Iwai  wrote:
> > On Tue, 25 Aug 2015 21:34:08 +0200,
> > Luis R. Rodriguez wrote:
> >>
> >> On Tue, Aug 25, 2015 at 10:17:00AM +0100, David Woodhouse wrote:
> >> > Luis, did you tell me the other day that you made the kernel get
> >> > firmware directly from the file system? This regression would be yours
> then?
> >>
> >> I didn't implement that, Linus did in 2012 (see commit abb139e75c2c
> >> titled
> >> "firmware: teach the kernel to load firmware files directly from the
> >> filesystem"). But we used to fallback to a userspace helper when the
> >> fw was not present and then Takashi made this optional via commit
> >> 7b1269f778782d titled "firmware: Make user-mode helper optional".
> >> Takashi noted in the Kconfig "The user-mode helper is no longer
> >> required unless you have a special firmware file that resides in a
> >> non-standard path". It was not clarified why that's true though, or
> >> what you'd need to do to ensure that the fw would be available. It
> >> would be good for us to elaborate on that.
> >
> > The recent udev already dropped the firmware loading feature.
> 
> Note that even when we had udev helper to load the firmware it was not
> always reliable depending on the exact point where we requested firmware.
> If request happened in probe() path before we mounted root fs then we'd
> never get it loaded because we'd be waiting for devices settle before
> mounting rootfs.

For request in probe(), is it possible to use request_firmware_nowait() to
wait rootfs mounted or timeout in another thread?

It looks usermodehelper_disabled is 0(at probe()) at this case then no waiting 
occurs
here in our testing.

Thanks,
~Keyon

> 
> Either build firmware in the kernel or ramdisk (so it is always available), or
> make sure request_firmware() calls are not in driver's
> probe() paths.
> 
> Thanks.
> 
> --
> Dmitry


RE: Problems loading firmware using built-in drivers with kernels that use initramfs.

2015-08-25 Thread Jie, Yang
 -Original Message-
 From: Dmitry Torokhov [mailto:dmitry.torok...@gmail.com]
 Sent: Wednesday, August 26, 2015 3:58 AM
 To: Takashi Iwai
 Cc: Luis R. Rodriguez; Girdwood, Liam R; Jie, Yang;
 joonas.lahti...@linux.intel.com; Tom Gundersen; Ming Lei; Al Viro; Greg
 Kroah-Hartman; Kay Sievers; Linus Torvalds; David Woodhouse; Luis
 Rodriguez; lkml
 Subject: Re: Problems loading firmware using built-in drivers with kernels
 that use initramfs.
 
 On Tue, Aug 25, 2015 at 12:46 PM, Takashi Iwai ti...@suse.de wrote:
  On Tue, 25 Aug 2015 21:34:08 +0200,
  Luis R. Rodriguez wrote:
 
  On Tue, Aug 25, 2015 at 10:17:00AM +0100, David Woodhouse wrote:
   Luis, did you tell me the other day that you made the kernel get
   firmware directly from the file system? This regression would be yours
 then?
 
  I didn't implement that, Linus did in 2012 (see commit abb139e75c2c
  titled
  firmware: teach the kernel to load firmware files directly from the
  filesystem). But we used to fallback to a userspace helper when the
  fw was not present and then Takashi made this optional via commit
  7b1269f778782d titled firmware: Make user-mode helper optional.
  Takashi noted in the Kconfig The user-mode helper is no longer
  required unless you have a special firmware file that resides in a
  non-standard path. It was not clarified why that's true though, or
  what you'd need to do to ensure that the fw would be available. It
  would be good for us to elaborate on that.
 
  The recent udev already dropped the firmware loading feature.
 
 Note that even when we had udev helper to load the firmware it was not
 always reliable depending on the exact point where we requested firmware.
 If request happened in probe() path before we mounted root fs then we'd
 never get it loaded because we'd be waiting for devices settle before
 mounting rootfs.

For request in probe(), is it possible to use request_firmware_nowait() to
wait rootfs mounted or timeout in another thread?

It looks usermodehelper_disabled is 0(at probe()) at this case then no waiting 
occurs
here in our testing.

Thanks,
~Keyon

 
 Either build firmware in the kernel or ramdisk (so it is always available), or
 make sure request_firmware() calls are not in driver's
 probe() paths.
 
 Thanks.
 
 --
 Dmitry


[PATCH RESEND v3 1/2] ALSA: Kconfig: add config item SND_PROC_FS for expert

2015-05-27 Thread Jie Yang
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 SND_PROC_FS item for expert, we can unselect it to
disable sound proc FS and reduce memory footprint.

Signed-off-by: Jie Yang 
---
 sound/core/Kconfig | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/sound/core/Kconfig b/sound/core/Kconfig
index 63cc2e9..88e0bc4 100644
--- a/sound/core/Kconfig
+++ b/sound/core/Kconfig
@@ -176,9 +176,18 @@ config SND_SUPPORT_OLD_API
  Say Y here to support the obsolete ALSA PCM API (ver.0.9.0 rc3
  or older).
 
+config SND_PROC_FS
+bool "Sound Proc FS Support" if EXPERT
+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.
+
 config SND_VERBOSE_PROCFS
bool "Verbose procfs contents"
-   depends on PROC_FS
+   depends on SND_PROC_FS
default y
help
  Say Y here to include code for verbose procfs contents (provides
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH RESEND v3 0/2] reducing memory footprint of ALSA

2015-05-27 Thread Jie Yang
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...

We plan to enable those reducing items only for EXPERT, and
add knobs in sound/core/Kconfig.

These first two patches is a start, adding SND_PROC_FS to config
disable/enable ALSA proc FS, this disabling can save about 9KB
code size on x86_64 platform.

Changes in v3:
1. drop SND_REDUCED_MEMORY_FOOTPRINT and make configuration
available only for EXPERT;
2. move the configure into sound/core/Kconfig;
3. Add missing Signed-off-by for PATCH 2/2.

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

Jie Yang (2):
  ALSA: Kconfig: add config item SND_PROC_FS for expert
  ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS

 include/sound/info.h   |  8 
 sound/core/Kconfig | 11 ++-
 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, 62 insertions(+), 53 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH RESEND v3 2/2] ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS

2015-05-27 Thread Jie Yang
We may disable proc fs only for sound part, to reduce ALSA
memory footprint. So add CONFIG_SND_PROC_FS and replace the
old CONFIG_PROC_FSs in alsa code.

With sound proc fs disabled, we can save about 9KB memory
size on X86_64 platform.

Signed-off-by: Jie Yang 
---
 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

RE: [PATCH v3 1/2] ALSA: Kconfig: add config item SND_PROC_FS for expert

2015-05-27 Thread Jie, Yang
> -Original Message-
> From: Takashi Iwai [mailto:ti...@suse.de]
> Sent: Wednesday, May 27, 2015 5:56 PM
> To: Jie, Yang
> Cc: broo...@kernel.org; alsa-de...@alsa-project.org; linux-
> ker...@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> Subject: Re: [PATCH v3 1/2] ALSA: Kconfig: add config item SND_PROC_FS for
> expert
> 
> At Wed, 27 May 2015 17:10:17 +0800,
> Jie Yang wrote:
> >
> > 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 SND_PROC_FS item for expert, we can unselect it to disable
> > sound proc FS and reduce memory footprint.
> >
> > Signed-off-by: Jie Yang 
> > ---
> >  sound/core/Kconfig | 9 +
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/sound/core/Kconfig b/sound/core/Kconfig index
> > 63cc2e9..4542554 100644
> > --- a/sound/core/Kconfig
> > +++ b/sound/core/Kconfig
> > @@ -225,4 +225,13 @@ config SND_DMA_SGBUF
> > def_bool y
> > depends on X86
> >
> > +config SND_PROC_FS
> > +bool "Sound Proc FS Support" if EXPERT
> > +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/seq/Kconfig"
> 
> There is SND_VERBOSE_PROCFS that also depends on PROC_FS.
> You should change it as well to depend on SND_PROC_FS.
 
OK, will change it also.

~Keyon

> 
> 
> Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v3 1/2] ALSA: Kconfig: add config item SND_PROC_FS for expert

2015-05-27 Thread Jie Yang
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 SND_PROC_FS item for expert, we can unselect it to
disable sound proc FS and reduce memory footprint.

Signed-off-by: Jie Yang 
---
 sound/core/Kconfig | 9 +
 1 file changed, 9 insertions(+)

diff --git a/sound/core/Kconfig b/sound/core/Kconfig
index 63cc2e9..4542554 100644
--- a/sound/core/Kconfig
+++ b/sound/core/Kconfig
@@ -225,4 +225,13 @@ config SND_DMA_SGBUF
def_bool y
depends on X86
 
+config SND_PROC_FS
+bool "Sound Proc FS Support" if EXPERT
+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/seq/Kconfig"
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v3 0/2] reducing memory footprint of ALSA

2015-05-27 Thread Jie Yang
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...

We plan to enable those reducing items only for EXPERT, and
add knobs in sound/core/Kconfig.

These first two patches is a start, adding SND_PROC_FS to config
disable/enable ALSA proc FS, this disabling can save about 9KB
code size on x86_64 platform.

Changes in v3:
1. drop SND_REDUCED_MEMORY_FOOTPRINT and make configuration
available only for EXPERT;
2. move the configure into sound/core/Kconfig;
3. Add missing Signed-off-by for PATCH 2/2.

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

Jie Yang (2):
  ALSA: Kconfig: add config item SND_PROC_FS for expert
  ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS

 include/sound/info.h   | 8 
 sound/core/Kconfig | 9 +
 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, 61 insertions(+), 52 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v3 2/2] ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS

2015-05-27 Thread Jie Yang
We may disable proc fs only for sound part, to reduce ALSA
memory footprint. So add CONFIG_SND_PROC_FS and replace the
old CONFIG_PROC_FSs in alsa code.

With sound proc fs disabled, we can save about 9KB memory
size on X86_64 platform.

Signed-off-by: Jie Yang 
---
 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

RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-27 Thread Jie, Yang
> -Original Message-
> From: Takashi Iwai [mailto:ti...@suse.de]
> Sent: Wednesday, May 27, 2015 3:46 PM
> To: Jie, Yang
> Cc: Sudip Mukherjee; broo...@kernel.org; alsa-de...@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 +,
> Jie, Yang wrote:
> >
> > > -Original Message-
> > > From: Takashi Iwai [mailto:ti...@suse.de]
> > > Sent: Wednesday, May 27, 2015 3:23 PM
> > > To: Jie, Yang
> > > Cc: Sudip Mukherjee; broo...@kernel.org;
> > > alsa-de...@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 +,
> > > Jie, Yang wrote:
> > > >
> > > > > -Original Message-
> > > > > From: Takashi Iwai [mailto:ti...@suse.de]
> > > > > Sent: Wednesday, May 27, 2015 2:19 PM
> > > > > To: Jie, Yang
> > > > > Cc: Sudip Mukherjee; broo...@kernel.org;
> > > > > alsa-de...@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 +, Jie, Yang wrote:
> > > > > >
> > > > > > > -Original Message-
> > > > > > > From: Sudip Mukherjee [mailto:sudipm.mukher...@gmail.com]
> > > > > > > Sent: Wednesday, May 27, 2015 12:50 PM
> > > > > > > To: Jie, Yang
> > > > > > > Cc: ti...@suse.de; broo...@kernel.org;
> > > > > > > alsa-de...@alsa-project.org;
> > > > > > > linux- ker...@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 
> > > > > >
> > > > > > 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 cha

RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-27 Thread Jie, Yang
> -Original Message-
> From: Takashi Iwai [mailto:ti...@suse.de]
> Sent: Wednesday, May 27, 2015 3:23 PM
> To: Jie, Yang
> Cc: Sudip Mukherjee; broo...@kernel.org; alsa-de...@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 +,
> Jie, Yang wrote:
> >
> > > -Original Message-
> > > From: Takashi Iwai [mailto:ti...@suse.de]
> > > Sent: Wednesday, May 27, 2015 2:19 PM
> > > To: Jie, Yang
> > > Cc: Sudip Mukherjee; broo...@kernel.org;
> > > alsa-de...@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 +,
> > > Jie, Yang wrote:
> > > >
> > > > > -Original Message-
> > > > > From: Sudip Mukherjee [mailto:sudipm.mukher...@gmail.com]
> > > > > Sent: Wednesday, May 27, 2015 12:50 PM
> > > > > To: Jie, Yang
> > > > > Cc: ti...@suse.de; broo...@kernel.org;
> > > > > alsa-de...@alsa-project.org;
> > > > > linux- ker...@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 
> > > >
> > > > 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-27 Thread Jie, Yang
> -Original Message-
> From: Takashi Iwai [mailto:ti...@suse.de]
> Sent: Wednesday, May 27, 2015 2:19 PM
> To: Jie, Yang
> Cc: Sudip Mukherjee; broo...@kernel.org; alsa-de...@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 +,
> Jie, Yang wrote:
> >
> > > -Original Message-
> > > From: Sudip Mukherjee [mailto:sudipm.mukher...@gmail.com]
> > > Sent: Wednesday, May 27, 2015 12:50 PM
> > > To: Jie, Yang
> > > Cc: ti...@suse.de; broo...@kernel.org; alsa-de...@alsa-project.org;
> > > linux- ker...@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 
> >
> > 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH RESEND v3 0/2] reducing memory footprint of ALSA

2015-05-27 Thread Jie Yang
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...

We plan to enable those reducing items only for EXPERT, and
add knobs in sound/core/Kconfig.

These first two patches is a start, adding SND_PROC_FS to config
disable/enable ALSA proc FS, this disabling can save about 9KB
code size on x86_64 platform.

Changes in v3:
1. drop SND_REDUCED_MEMORY_FOOTPRINT and make configuration
available only for EXPERT;
2. move the configure into sound/core/Kconfig;
3. Add missing Signed-off-by for PATCH 2/2.

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

Jie Yang (2):
  ALSA: Kconfig: add config item SND_PROC_FS for expert
  ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS

 include/sound/info.h   |  8 
 sound/core/Kconfig | 11 ++-
 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, 62 insertions(+), 53 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-27 Thread Jie, Yang
 -Original Message-
 From: Takashi Iwai [mailto:ti...@suse.de]
 Sent: Wednesday, May 27, 2015 3:46 PM
 To: Jie, Yang
 Cc: Sudip Mukherjee; broo...@kernel.org; alsa-de...@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 +,
 Jie, Yang wrote:
 
   -Original Message-
   From: Takashi Iwai [mailto:ti...@suse.de]
   Sent: Wednesday, May 27, 2015 3:23 PM
   To: Jie, Yang
   Cc: Sudip Mukherjee; broo...@kernel.org;
   alsa-de...@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 +,
   Jie, Yang wrote:
   
 -Original Message-
 From: Takashi Iwai [mailto:ti...@suse.de]
 Sent: Wednesday, May 27, 2015 2:19 PM
 To: Jie, Yang
 Cc: Sudip Mukherjee; broo...@kernel.org;
 alsa-de...@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 +, Jie, Yang wrote:
 
   -Original Message-
   From: Sudip Mukherjee [mailto:sudipm.mukher...@gmail.com]
   Sent: Wednesday, May 27, 2015 12:50 PM
   To: Jie, Yang
   Cc: ti...@suse.de; broo...@kernel.org;
   alsa-de...@alsa-project.org;
   linux- ker...@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@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, deselecting 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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v3 2/2] ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS

2015-05-27 Thread Jie Yang
We may disable proc fs only for sound part, to reduce ALSA
memory footprint. So add CONFIG_SND_PROC_FS and replace the
old CONFIG_PROC_FSs in alsa code.

With sound proc fs disabled, we can save about 9KB memory
size on X86_64 platform.

Signed-off-by: Jie Yang yang@intel.com
---
 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

[PATCH v3 1/2] ALSA: Kconfig: add config item SND_PROC_FS for expert

2015-05-27 Thread Jie Yang
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 SND_PROC_FS item for expert, we can unselect it to
disable sound proc FS and reduce memory footprint.

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

diff --git a/sound/core/Kconfig b/sound/core/Kconfig
index 63cc2e9..4542554 100644
--- a/sound/core/Kconfig
+++ b/sound/core/Kconfig
@@ -225,4 +225,13 @@ config SND_DMA_SGBUF
def_bool y
depends on X86
 
+config SND_PROC_FS
+bool Sound Proc FS Support if EXPERT
+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/seq/Kconfig
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v3 1/2] ALSA: Kconfig: add config item SND_PROC_FS for expert

2015-05-27 Thread Jie, Yang
 -Original Message-
 From: Takashi Iwai [mailto:ti...@suse.de]
 Sent: Wednesday, May 27, 2015 5:56 PM
 To: Jie, Yang
 Cc: broo...@kernel.org; alsa-de...@alsa-project.org; linux-
 ker...@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
 Subject: Re: [PATCH v3 1/2] ALSA: Kconfig: add config item SND_PROC_FS for
 expert
 
 At Wed, 27 May 2015 17:10:17 +0800,
 Jie Yang wrote:
 
  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 SND_PROC_FS item for expert, we can unselect it to disable
  sound proc FS and reduce memory footprint.
 
  Signed-off-by: Jie Yang yang@intel.com
  ---
   sound/core/Kconfig | 9 +
   1 file changed, 9 insertions(+)
 
  diff --git a/sound/core/Kconfig b/sound/core/Kconfig index
  63cc2e9..4542554 100644
  --- a/sound/core/Kconfig
  +++ b/sound/core/Kconfig
  @@ -225,4 +225,13 @@ config SND_DMA_SGBUF
  def_bool y
  depends on X86
 
  +config SND_PROC_FS
  +bool Sound Proc FS Support if EXPERT
  +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/seq/Kconfig
 
 There is SND_VERBOSE_PROCFS that also depends on PROC_FS.
 You should change it as well to depend on SND_PROC_FS.
 
OK, will change it also.

~Keyon

 
 
 Takashi
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH RESEND v3 2/2] ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS

2015-05-27 Thread Jie Yang
We may disable proc fs only for sound part, to reduce ALSA
memory footprint. So add CONFIG_SND_PROC_FS and replace the
old CONFIG_PROC_FSs in alsa code.

With sound proc fs disabled, we can save about 9KB memory
size on X86_64 platform.

Signed-off-by: Jie Yang yang@intel.com
---
 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

[PATCH RESEND v3 1/2] ALSA: Kconfig: add config item SND_PROC_FS for expert

2015-05-27 Thread Jie Yang
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 SND_PROC_FS item for expert, we can unselect it to
disable sound proc FS and reduce memory footprint.

Signed-off-by: Jie Yang yang@intel.com
---
 sound/core/Kconfig | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/sound/core/Kconfig b/sound/core/Kconfig
index 63cc2e9..88e0bc4 100644
--- a/sound/core/Kconfig
+++ b/sound/core/Kconfig
@@ -176,9 +176,18 @@ config SND_SUPPORT_OLD_API
  Say Y here to support the obsolete ALSA PCM API (ver.0.9.0 rc3
  or older).
 
+config SND_PROC_FS
+bool Sound Proc FS Support if EXPERT
+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.
+
 config SND_VERBOSE_PROCFS
bool Verbose procfs contents
-   depends on PROC_FS
+   depends on SND_PROC_FS
default y
help
  Say Y here to include code for verbose procfs contents (provides
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v3 0/2] reducing memory footprint of ALSA

2015-05-27 Thread Jie Yang
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...

We plan to enable those reducing items only for EXPERT, and
add knobs in sound/core/Kconfig.

These first two patches is a start, adding SND_PROC_FS to config
disable/enable ALSA proc FS, this disabling can save about 9KB
code size on x86_64 platform.

Changes in v3:
1. drop SND_REDUCED_MEMORY_FOOTPRINT and make configuration
available only for EXPERT;
2. move the configure into sound/core/Kconfig;
3. Add missing Signed-off-by for PATCH 2/2.

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

Jie Yang (2):
  ALSA: Kconfig: add config item SND_PROC_FS for expert
  ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS

 include/sound/info.h   | 8 
 sound/core/Kconfig | 9 +
 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, 61 insertions(+), 52 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-27 Thread Jie, Yang
 -Original Message-
 From: Takashi Iwai [mailto:ti...@suse.de]
 Sent: Wednesday, May 27, 2015 2:19 PM
 To: Jie, Yang
 Cc: Sudip Mukherjee; broo...@kernel.org; alsa-de...@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 +,
 Jie, Yang wrote:
 
   -Original Message-
   From: Sudip Mukherjee [mailto:sudipm.mukher...@gmail.com]
   Sent: Wednesday, May 27, 2015 12:50 PM
   To: Jie, Yang
   Cc: ti...@suse.de; broo...@kernel.org; alsa-de...@alsa-project.org;
   linux- ker...@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@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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-27 Thread Jie, Yang
 -Original Message-
 From: Takashi Iwai [mailto:ti...@suse.de]
 Sent: Wednesday, May 27, 2015 3:23 PM
 To: Jie, Yang
 Cc: Sudip Mukherjee; broo...@kernel.org; alsa-de...@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 +,
 Jie, Yang wrote:
 
   -Original Message-
   From: Takashi Iwai [mailto:ti...@suse.de]
   Sent: Wednesday, May 27, 2015 2:19 PM
   To: Jie, Yang
   Cc: Sudip Mukherjee; broo...@kernel.org;
   alsa-de...@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 +,
   Jie, Yang wrote:
   
 -Original Message-
 From: Sudip Mukherjee [mailto:sudipm.mukher...@gmail.com]
 Sent: Wednesday, May 27, 2015 12:50 PM
 To: Jie, Yang
 Cc: ti...@suse.de; broo...@kernel.org;
 alsa-de...@alsa-project.org;
 linux- ker...@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@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, deselecting 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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-26 Thread Jie, Yang
> -Original Message-
> From: Sudip Mukherjee [mailto:sudipm.mukher...@gmail.com]
> Sent: Wednesday, May 27, 2015 12:50 PM
> To: Jie, Yang
> Cc: ti...@suse.de; broo...@kernel.org; alsa-de...@alsa-project.org; linux-
> ker...@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 

Takashi, do I need to resend them?

Thanks,
~Keyon

> 
> regards
> sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-26 Thread Jie Yang
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
@@ -,7 +,7 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss 
*mixer, struct snd_mix
return 

[PATCH 1/2] ALSA: Kconfig: add config menu for reduced memory footprint

2015-05-26 Thread Jie Yang
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 
---
 sound/Kconfig | 16 
 1 file changed, 16 insertions(+)

diff --git a/sound/Kconfig b/sound/Kconfig
index 5a240e0..6760dfa 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"
+   depends on PROC_FS && !SND_REDUCED_MEMORY_FOOTPRINT
+   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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 1/2] ALSA: Kconfig: add config menu for reduced memory footprint

2015-05-26 Thread Jie Yang
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 
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/2] reducing memory footprint of ALSA

2015-05-26 Thread Jie Yang
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.

Comments are welcomed.

~Keyon

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-26 Thread Jie Yang
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
@@ -,7 +,7 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss 
*mixer, struct snd_mix
return 

RE: [PATCH 1/2] ALSA: Kconfig: add config menu for reduced memory footprint

2015-05-26 Thread Jie, Yang
> -Original Message-
> From: Takashi Iwai [mailto:ti...@suse.de]
> Sent: Tuesday, May 26, 2015 8:39 PM
> To: Jie, Yang
> Cc: broo...@kernel.org; alsa-de...@alsa-project.org; linux-
> ker...@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> Subject: Re: [PATCH 1/2] ALSA: Kconfig: add config menu for reduced
> memory footprint
> 
> At Tue, 26 May 2015 12:32:43 +,
> Jie, Yang wrote:
> >
> > > -Original Message-
> > > From: Takashi Iwai [mailto:ti...@suse.de]
> > > Sent: Tuesday, May 26, 2015 7:05 PM
> > > To: Jie, Yang
> > > Cc: broo...@kernel.org; alsa-de...@alsa-project.org; linux-
> > > ker...@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> > > Subject: Re: [PATCH 1/2] ALSA: Kconfig: add config menu for reduced
> > > memory footprint
> > >
> > > At Tue, 26 May 2015 19:04:24 +0800,
> > > Jie Yang wrote:
> > > >
> > > > 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 
> > > > ---
> > > >  sound/Kconfig | 16 
> > > >  1 file changed, 16 insertions(+)
> > > >
> > > > diff --git a/sound/Kconfig b/sound/Kconfig index 5a240e0..6760dfa
> > > > 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.
> > >
> > > I'd like to move this into sound/core.
> > > Also, the kconfig name appears a bit too lengthy to me.
> > >
> > > > +config SND_PROC_FS
> > > > +   bool "Sound Proc FS Support"
> > > > +   depends on PROC_FS && !SND_REDUCED_MEMORY_FOOTPRINT
> > >
> > > This should be
> > >   bool "Sound Proc FS Support"
> > > if !SND_REDUCED_MEMORY_FOOTPRINT
> > >   depends on PROC_FS
> > >
> > > In this way, this prompt would appear only when
> > > SND_REDUCED_MEMORY_FOOTPRINT is set, i.e. only for experts.
> >
> > Takashi, I tested and found same for these two way, the prompt will
> > appear only when PROC_FS=y and SND_REDUCED_MEMORY_FOOTPRINT
> is *not*
> > set. BTW, seems here we should use without '!'?
> >
> > bool "Sound Proc FS Support" if
> SND_REDUCED_MEMORY_FOOTPRINT
> 
> Yes.  It was my typo.  An expression 'type "prompt" if xxx' means that the
> prompt appears only if xxx is true.
 
Got it, thanks. Will update and resend the patch soon.

~Keyon

> 
> 
> Takashi
> 
> > depends on PROC_FS
> >
> > ~Keyon
> > >
> > >
> > > thanks,
> > >
> > > Takashi
> > >
> > > > +   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
> > > >
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 1/2] ALSA: Kconfig: add config menu for reduced memory footprint

2015-05-26 Thread Jie, Yang
> -Original Message-
> From: Takashi Iwai [mailto:ti...@suse.de]
> Sent: Tuesday, May 26, 2015 7:05 PM
> To: Jie, Yang
> Cc: broo...@kernel.org; alsa-de...@alsa-project.org; linux-
> ker...@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
> Subject: Re: [PATCH 1/2] ALSA: Kconfig: add config menu for reduced
> memory footprint
> 
> At Tue, 26 May 2015 19:04:24 +0800,
> Jie Yang wrote:
> >
> > 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 
> > ---
> >  sound/Kconfig | 16 
> >  1 file changed, 16 insertions(+)
> >
> > diff --git a/sound/Kconfig b/sound/Kconfig index 5a240e0..6760dfa
> > 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.
> 
> I'd like to move this into sound/core.
> Also, the kconfig name appears a bit too lengthy to me.
> 
> > +config SND_PROC_FS
> > +   bool "Sound Proc FS Support"
> > +   depends on PROC_FS && !SND_REDUCED_MEMORY_FOOTPRINT
> 
> This should be
>   bool "Sound Proc FS Support"
> if !SND_REDUCED_MEMORY_FOOTPRINT
>   depends on PROC_FS
> 
> In this way, this prompt would appear only when
> SND_REDUCED_MEMORY_FOOTPRINT is set, i.e. only for experts.
 
Takashi, I tested and found same for these two way, the prompt will
appear only when PROC_FS=y and SND_REDUCED_MEMORY_FOOTPRINT
is *not* set. BTW, seems here we should use without '!'?

bool "Sound Proc FS Support" if SND_REDUCED_MEMORY_FOOTPRINT
depends on PROC_FS

~Keyon
> 
> 
> thanks,
> 
> Takashi
> 
> > +   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
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/2] reducing memory footprint of ALSA

2015-05-26 Thread Jie Yang
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-26 Thread Jie, Yang
 -Original Message-
 From: Sudip Mukherjee [mailto:sudipm.mukher...@gmail.com]
 Sent: Wednesday, May 27, 2015 12:50 PM
 To: Jie, Yang
 Cc: ti...@suse.de; broo...@kernel.org; alsa-de...@alsa-project.org; linux-
 ker...@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@intel.com

Takashi, do I need to resend them?

Thanks,
~Keyon

 
 regards
 sudip
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/2] reducing memory footprint of ALSA

2015-05-26 Thread Jie Yang
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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-26 Thread Jie Yang
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
@@ -,7 +,7 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss 
*mixer, struct snd_mix
return 0;
 }
 

[PATCH v2 1/2] ALSA: Kconfig: add config menu for reduced memory footprint

2015-05-26 Thread Jie Yang
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@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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/2] reducing memory footprint of ALSA

2015-05-26 Thread Jie Yang
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.

Comments are welcomed.

~Keyon

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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] ALSA: Kconfig: add config menu for reduced memory footprint

2015-05-26 Thread Jie Yang
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@intel.com
---
 sound/Kconfig | 16 
 1 file changed, 16 insertions(+)

diff --git a/sound/Kconfig b/sound/Kconfig
index 5a240e0..6760dfa 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
+   depends on PROC_FS  !SND_REDUCED_MEMORY_FOOTPRINT
+   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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 1/2] ALSA: Kconfig: add config menu for reduced memory footprint

2015-05-26 Thread Jie, Yang
 -Original Message-
 From: Takashi Iwai [mailto:ti...@suse.de]
 Sent: Tuesday, May 26, 2015 7:05 PM
 To: Jie, Yang
 Cc: broo...@kernel.org; alsa-de...@alsa-project.org; linux-
 ker...@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
 Subject: Re: [PATCH 1/2] ALSA: Kconfig: add config menu for reduced
 memory footprint
 
 At Tue, 26 May 2015 19:04:24 +0800,
 Jie Yang wrote:
 
  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@intel.com
  ---
   sound/Kconfig | 16 
   1 file changed, 16 insertions(+)
 
  diff --git a/sound/Kconfig b/sound/Kconfig index 5a240e0..6760dfa
  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.
 
 I'd like to move this into sound/core.
 Also, the kconfig name appears a bit too lengthy to me.
 
  +config SND_PROC_FS
  +   bool Sound Proc FS Support
  +   depends on PROC_FS  !SND_REDUCED_MEMORY_FOOTPRINT
 
 This should be
   bool Sound Proc FS Support
 if !SND_REDUCED_MEMORY_FOOTPRINT
   depends on PROC_FS
 
 In this way, this prompt would appear only when
 SND_REDUCED_MEMORY_FOOTPRINT is set, i.e. only for experts.
 
Takashi, I tested and found same for these two way, the prompt will
appear only when PROC_FS=y and SND_REDUCED_MEMORY_FOOTPRINT
is *not* set. BTW, seems here we should use without '!'?

bool Sound Proc FS Support if SND_REDUCED_MEMORY_FOOTPRINT
depends on PROC_FS

~Keyon
 
 
 thanks,
 
 Takashi
 
  +   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
 
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 1/2] ALSA: Kconfig: add config menu for reduced memory footprint

2015-05-26 Thread Jie, Yang
 -Original Message-
 From: Takashi Iwai [mailto:ti...@suse.de]
 Sent: Tuesday, May 26, 2015 8:39 PM
 To: Jie, Yang
 Cc: broo...@kernel.org; alsa-de...@alsa-project.org; linux-
 ker...@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
 Subject: Re: [PATCH 1/2] ALSA: Kconfig: add config menu for reduced
 memory footprint
 
 At Tue, 26 May 2015 12:32:43 +,
 Jie, Yang wrote:
 
   -Original Message-
   From: Takashi Iwai [mailto:ti...@suse.de]
   Sent: Tuesday, May 26, 2015 7:05 PM
   To: Jie, Yang
   Cc: broo...@kernel.org; alsa-de...@alsa-project.org; linux-
   ker...@vger.kernel.org; Girdwood, Liam R; Zhang, Vivian
   Subject: Re: [PATCH 1/2] ALSA: Kconfig: add config menu for reduced
   memory footprint
  
   At Tue, 26 May 2015 19:04:24 +0800,
   Jie Yang wrote:
   
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@intel.com
---
 sound/Kconfig | 16 
 1 file changed, 16 insertions(+)
   
diff --git a/sound/Kconfig b/sound/Kconfig index 5a240e0..6760dfa
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.
  
   I'd like to move this into sound/core.
   Also, the kconfig name appears a bit too lengthy to me.
  
+config SND_PROC_FS
+   bool Sound Proc FS Support
+   depends on PROC_FS  !SND_REDUCED_MEMORY_FOOTPRINT
  
   This should be
 bool Sound Proc FS Support
   if !SND_REDUCED_MEMORY_FOOTPRINT
 depends on PROC_FS
  
   In this way, this prompt would appear only when
   SND_REDUCED_MEMORY_FOOTPRINT is set, i.e. only for experts.
 
  Takashi, I tested and found same for these two way, the prompt will
  appear only when PROC_FS=y and SND_REDUCED_MEMORY_FOOTPRINT
 is *not*
  set. BTW, seems here we should use without '!'?
 
  bool Sound Proc FS Support if
 SND_REDUCED_MEMORY_FOOTPRINT
 
 Yes.  It was my typo.  An expression 'type prompt if xxx' means that the
 prompt appears only if xxx is true.
 
Got it, thanks. Will update and resend the patch soon.

~Keyon

 
 
 Takashi
 
  depends on PROC_FS
 
  ~Keyon
  
  
   thanks,
  
   Takashi
  
+   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
   
 
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] ALSA: set no sound proc fs for reduced memory footprint

2015-05-26 Thread Jie Yang
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
@@ -,7 +,7 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss 
*mixer, struct snd_mix
return 0;
 }
 

RE: [PATCH 2/6] MAINTAINERS: Update sound soc intel patterns

2015-05-05 Thread Jie, Yang
> -Original Message-
> From: Joe Perches [mailto:j...@perches.com]
> Sent: Wednesday, May 06, 2015 12:33 AM
> To: Andrew Morton; linux-kernel@vger.kernel.org
> Cc: Jie, Yang
> Subject: [PATCH 2/6] MAINTAINERS: Update sound soc intel patterns
> 
> commit 2106241a6803 ("ASoC: Intel: create common folder and move
> common files in") moved the files around.  Update the patterns.
> 
> Signed-off-by: Joe Perches 
 
Acked-by: Jie Yang 

Thanks.

> cc: Jie Yang 
> ---
>  MAINTAINERS | 9 -
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e278814..bbfb324 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -5101,11 +5101,10 @@ INTEL ASoC BDW/HSW DRIVERS
>  M:   Jie Yang 
>  L:   alsa-de...@alsa-project.org
>  S:   Supported
> -F:   sound/soc/intel/sst-haswell*
> -F:   sound/soc/intel/sst-dsp*
> -F:   sound/soc/intel/sst-firmware.c
> -F:   sound/soc/intel/broadwell.c
> -F:   sound/soc/intel/haswell.c
> +F:   sound/soc/intel/common/sst-dsp*
> +F:   sound/soc/intel/common/sst-firmware.c
> +F:   sound/soc/intel/boards/broadwell.c
> +F:   sound/soc/intel/haswell/
> 
>  INTEL C600 SERIES SAS CONTROLLER DRIVER
>  M:   Intel SCU Linux support 
> --
> 2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 2/6] MAINTAINERS: Update sound soc intel patterns

2015-05-05 Thread Jie, Yang
 -Original Message-
 From: Joe Perches [mailto:j...@perches.com]
 Sent: Wednesday, May 06, 2015 12:33 AM
 To: Andrew Morton; linux-kernel@vger.kernel.org
 Cc: Jie, Yang
 Subject: [PATCH 2/6] MAINTAINERS: Update sound soc intel patterns
 
 commit 2106241a6803 (ASoC: Intel: create common folder and move
 common files in) moved the files around.  Update the patterns.
 
 Signed-off-by: Joe Perches j...@perches.com
 
Acked-by: Jie Yang yang@intel.com

Thanks.

 cc: Jie Yang yang@intel.com
 ---
  MAINTAINERS | 9 -
  1 file changed, 4 insertions(+), 5 deletions(-)
 
 diff --git a/MAINTAINERS b/MAINTAINERS
 index e278814..bbfb324 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -5101,11 +5101,10 @@ INTEL ASoC BDW/HSW DRIVERS
  M:   Jie Yang yang@linux.intel.com
  L:   alsa-de...@alsa-project.org
  S:   Supported
 -F:   sound/soc/intel/sst-haswell*
 -F:   sound/soc/intel/sst-dsp*
 -F:   sound/soc/intel/sst-firmware.c
 -F:   sound/soc/intel/broadwell.c
 -F:   sound/soc/intel/haswell.c
 +F:   sound/soc/intel/common/sst-dsp*
 +F:   sound/soc/intel/common/sst-firmware.c
 +F:   sound/soc/intel/boards/broadwell.c
 +F:   sound/soc/intel/haswell/
 
  INTEL C600 SERIES SAS CONTROLLER DRIVER
  M:   Intel SCU Linux support intel-linux-...@intel.com
 --
 2.1.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] linux-firmware: update firmware for Intel Broadwell SST DSP

2015-02-05 Thread Jie Yang
Update firmware intel/IntcSST2.bin from Version 8.4.1.68 to 8.4.1.77
Fix for freeing capture stream just after resetting it.

Signed-off-by: Jie Yang 
---
 WHENCE |   1 +
 intel/IntcSST2.bin | Bin 260256 -> 260320 bytes
 2 files changed, 1 insertion(+)

diff --git a/WHENCE b/WHENCE
index 7f2d6bf..6cb0778 100644
--- a/WHENCE
+++ b/WHENCE
@@ -2646,6 +2646,7 @@ Licence: Redistributable. See LICENCE.it913x for details
 Driver: snd_soc_sst_acpi
 
 File: intel/IntcSST2.bin
+Version: 8.4.1.77
 
 License: Redistributable. See LICENCE.IntcSST2 for details
 
diff --git a/intel/IntcSST2.bin b/intel/IntcSST2.bin
index 
69ac37e78582dc5971b56eb598f43821958a9a59..e11cb61f4a00bf32a304781e3e9b1f32775285e1
 100644
GIT binary patch
delta 35726
zcmZTQ30zZ0^VuW>2oK~8w?O16AS%HV#UrQ)-guu?g3ntk+QXZpEk+R95C
z1q3z014NXdASf!}g=a;5UU+~gf};7)CeW|_{``KAw>vv~%eOi^ts;SiKp^;p6Ocoyw;0_^rH9*B-$H^}w~@f{4iX$*9w7+5tNm(@$Zq{cp&-i~
zu;DM%P9V64>qXs!wu$)?u?(R@*wd`f{Px^PfyI;vfjBQxFbm%6;XyBj0t)i!khX<)
zE4(S_)naOdz!CB;@LsbrLJ$Gz$>9-#5%7$Mv>(9Ziv)trP__v2$vE4rXGk5S46h6Z
z!}kWmJxFIl=}veaLRuh*k83<85EPJ_&`Jfo4P69+c7s6h1Y1i6+C3+=4T8qQP-FeH
z2*DdXUD7w89iZt8A_Q5hA_RWZBLuBbLK?F;5Ghz=hoFXGI6S9Zu4A1fcxWJi1qTcU
zk-!kw7$6kX!BYZH7CbxQSr1S8Yk^=Pyd$EzkNH5<56?F56Fmspv6ul}
z#X>o}VPFEkNx%Sr`$3*sV;qLSGZE^Jh!Ct?1dM{GWQFNT+6Tw^o?jU$<0e=+K
zjexWxq$BWC^L3Wv0b($GG8ACOq6eCcf3UcOX5smkGtokP#L~;ZdOjk=B7wI+un2G+
zV}TK$MF^Hcx!S;q3yX4NkxLXok%blo`Ro{zz?2u>}utO
zDsYIES9G!t2}+`2wqjtUF%g2>&{l;lFc?NuvQj9pT?Z0>)#39@cyG5ky(H+12!XlF
z-iX#UFw2mh{5en;^?v0>A3L1Ar2vRa51b@ByYL4yN2*E;JXf?#M5$3e9~d#
zIeG&<2n1q5<|QIZ9}M@f9p{T$Z7G`tWgb2Z*rKXvFSO>Jn3k8Rl0pI@u?F0B3
z97Q>Fy#mmMfLQ_hcmmR`@Qwr>71#&_W_NHRmDIhxd-U;-vBy6q6n#uB`p6Z1Tqr`kL~KjDF0f~3zq)bebdJeMDlAKPU^|9GPge08&`hHJlBbVo@4
zg)i6*L^?FGsg=ANws9de1yzu~3tV58JOssrlU;zCma`-siXl#bVmYA1U%DIeCka
zKVIYVK)%RYa>)=Wnf%DX)?1+FR_gxvmWi>ZNXY_FENOMz*l&-TOeyDX;uug6}I48UYszOJr
zHKF*5`+iS_v1ubHhgMkYTieR7cQj51;oTlfQ9L!G|zsXuf2v!WjW@QM6=$j
z!fY8@W_NVFg*sEF`&#

[PATCH] linux-firmware: update firmware for Intel Broadwell SST DSP

2015-02-05 Thread Jie Yang
Update firmware intel/IntcSST2.bin from Version 8.4.1.68 to 8.4.1.77
Fix for freeing capture stream just after resetting it.

Signed-off-by: Jie Yang yang@intel.com
---
 WHENCE |   1 +
 intel/IntcSST2.bin | Bin 260256 - 260320 bytes
 2 files changed, 1 insertion(+)

diff --git a/WHENCE b/WHENCE
index 7f2d6bf..6cb0778 100644
--- a/WHENCE
+++ b/WHENCE
@@ -2646,6 +2646,7 @@ Licence: Redistributable. See LICENCE.it913x for details
 Driver: snd_soc_sst_acpi
 
 File: intel/IntcSST2.bin
+Version: 8.4.1.77
 
 License: Redistributable. See LICENCE.IntcSST2 for details
 
diff --git a/intel/IntcSST2.bin b/intel/IntcSST2.bin
index 
69ac37e78582dc5971b56eb598f43821958a9a59..e11cb61f4a00bf32a304781e3e9b1f32775285e1
 100644
GIT binary patch
delta 35726
zcmZTQ30zZ0^VuW2oK~8w?O16AS%HV#UrQ)-guu?g3ntk+QXZpEkiRuwVPY+R95C
z1q3z014NXdASf!}g=a;5UU+~gf};7)CeW|_{``KAwvv~%RnU?Cic|Hgnz)WzC
zeOi^ts;SiKp^;p6Ocoyw;0_^rH9*B-$H^}w~@f{4iX$*9w7+5tNm(@$Zq{cp-i~
zu;DM%P9V64qXs!wu$)?u?(R@*wd`f{Px^PfyI;vfjBQxFbm%6;XyBj0t)i!khX)
zE4(S_)naOdz!CB;@LsbrLJ$Gz$9-#5%7$Mv(9Ziv)trP__v2$vE4rXGk5S46h6Z
z!}kWmJxFIl=}veaLRuh*k8385EPJ_`Jfo4P69+c7s6h1Y1i6+C3+=4T8qQP-FeH
z2*DdXUD7w89iZt8A_Q5hA_RWZBLuBbLK?F;5Ghz=hoFXGI6S9Zu4A1fcxWJi1qTcU
zk-!kw7$6kX!BYZH7CbxQSr1S8Yk^=PydTVg2x3O0X$EzkNH556?F56Fmspv6ul}
z#Xo}VPFEkNx%Sr`$3*sV;qLSGZE^Jh!Ct?1dM{GWQFNTWaG+6Tw^o?jU$0e=+K
zjexWxq$BWC^L3Wv0b($GG8ACOq6eCcf3UcOX5smkGtokP#L~;ZdOjk=B7wI+un2G+
zV}TK$MF^Hcxq!S;q3yS%W`XPK{a*xkau5K?=P67DE3KFviFTfj2zKA4|8LP5nS
zpc5X8vG9x*3jE-i1z8zw|GVdhmd!0C@BSb5iH%Ow!sk;2b=MzDI)0sgQ=}5adV9
zfL6D|7=b4MRm~;g2RA68G4MEDHOCqxr+)$0OX4NkxLXok%blo`Ro{zz?2u}utO
zDsYIES9G!t2}+`2wqjtUF%g2{l;lFc?NuvQj9pT?Z0)#39@cyG5ky(H+12!XlF
z-iX#UFw2mh{5en;^?v0NLQA3L1Ar2vRa51b@ByYL4yN2*E;JXf?#M5$3e9R~d#
zIeG2n1q5|QIZ9}M@f9psVJ{T$Z7G`tWgb2Z*rKXvFSOJn3k8Rl0pI@u?F0B3
z97QFy#mmMfLQ_hcmmR`@Qwr71#_W_NHRmDIhxd-U;-vBy6q6n#uB`p6Z1Tq!|
z;t_r1W9*TS2}dFKv$@UmrTM+BeGxir`kL~KjDF0f~3zq)bebdJeMDlAKPULS6AC
z+aPp1CUZo!k%`XfII}!PI#7GA9NZg+XcE#_AHej(8=^|9GPge08`hHJlBbVo@4
zg)i6*Lq^?FGsg=ANws9de1yzu~3tV58JOssrlU;zCma`-siXl#bVmYA1U%DIeCka
zKVIYVK)%RYa)=Wnf%DX)?1+FR_gxvmWiZNABm8M#K4|D~%pa-VEX*?TscFs^GR
zS(l$MsJRuo%ys-ke8}zPfZ^8RRRYXY_FENOMz*l-TOeyDX;uug6}I48UYszOJr
zHKF*5`+iS_v1ubHhgMkYTieR7cQj51;oTlfQ9LDoQQn!G|zsXuf2v!WjW@QM6=$j
z!fY8@W_NVFg*sEFK!AItnu`hH+bcVMjU#`#CSipBg|uVA@jo``wwwRoM7rY-
zCJ;AzIw4mq=^E%Hv-WKCSgybM0cb(OU5aGOxH#f*Fq(w8AqxP)4ZkXt=f`ycV^#E
z1wQrWZ4!;4O;MNLsvI2%~XZ5RY7$v=v*(F6od7w}EeIzd_!gVYZ-jez3ZvJx
z3?{HNnR(MennM813U`gWARaM$9~CPrr|x*Jg0#D@HapyNO;tmC)_4XtQeK3a^Twy
zYPlQDdFKgJ@3dwJnN0l2+q2*A-l-%=h+DO#Uk!Xm4yQFH5TV-b}=OgTpvcX)%
zy3+BQ@{S%Z^AGVP9~t@?FZR*;)=^ZjXJfF+O|5cKt6X(ljmL8Ox)CTKvpmm=zJ`a$
zzn!*#R;!%zgiN*phLPg6`ne|EWFhKJmu!{=c%N-e@hnuMf2x?j!takky*X4$6SG
z1ZaXDf*rc8M0yGZHnUws-{P)BtXy^)$MJ%|-Z8x9+GATl-cc6~621XPZri)K7+
z1x{_(Wxipuu#66tb@MD1O^~jaZ;0N2=1JGeMQfuGKOKKYk3f6y9$JQe$4BWw-n%H$
zZ04WLE-EXPvZ~qr?(4|lgy2htbWL+W1H^%fhVK74@7Brb9Z;N6Q_6YhJM5+y2o24
zQN#4X1Zn|9^Iom`UbD;G0^!#};XxP}Am7EXs~uDqj}842?gxGcaE-v^)UF)V1K
zv7hYJlOf?9{4aWB0#l)|L_diTUy9c_7ZVizMkll~e9`VI12*D*?dtqIN0QZDHn
zVk}PZ8-iBjV!uHi%b~dDP7CE4ZYf9$u+L7FwRNH`#diKaXff{V|Fz`;GBB$vBmlR
zzGxn^Ph;W;~oKH=mZ6fHR81-vmY@%To77aEJ(0#eaKyrZWlx{tGa`klse9x(9
zAodFMMg8%pKyTC+GlBjn2%oqhf7_@V_U18d%u7TEyFA8gJQyju`pN*)!@Xp
zQb{X_uo(Y9I`f1HS#P%qnajAk*9s)Vp}i;ev!lY~@)`A^2ix~i?OAqsAN-Ac-?*
zB5Jv}_8a*T%NpxG6Q3fMIcNvKH2*$dW)0#9Guf)Rb%rud|!tKYTjDaNZ*znX(Tx
zZ+MEHIlcKO@VLH;SL8*{TM;GMmKlWIFa^lPh{_BR9+PHY{h_(Q%C{}d!cukhX=
z8g0WL0;aKz7lYCxW{jpKfESLHD0KqViV;?!g;I?bS=F5o0Sw5A!`vv_2VLlj-n
zE8)I65YXN3Z?9ZmE?_qNIeih-9oeC8SNs_Xu8t;`CPBpf^d`or5W{;`+TwDl-Tw
zqdLZN(uxauQ$SZlg*la;)|`go^L2u$u(HFjaUtu6INVz0F|HWAVE`P#mV0kC@U0_
z$_@~7+=}xAPTFB?u|1Ncne$g8)$RHDopM(KZWdbL02(hwcogOC^A)^BWg253!j
z)0~w=iX`_8TthRn2e@}xx`-tdU#HkS;*wzwtfK?3xRehD8)Vd`=Ysca{sT;FnqRu
z@6cUVV1bg_3}jv5{%B^V5dIyOM4E?RH+VdoH-tIG7vmaT?Yt{EC6w)l5%@ei$8A
z44CVfY8C$C?-3__(F`ao}W43oiK2eFL(ZRmYa7@JRRx#4^i_edri56kqY(YPIr_m
z@#CgG!xT=YZJ94;~0AP%zjlde*@?l)=5U}lLV-LAkVLy~8i^cE(11P1D;tp_
z4I@cM84}4O0|jAG(g9R_y{XXWwg0qlZ%B3t6pytY6ih#@1C+;^RX*snWl2*Cce%V
zdaJ!P?Op#dG!uR_!S4_F7Vg^7uT!2e@AE$!;)bR-bS2znCP@6nNhe_x!q@b(u7t1j
zcu9!Zw8W~z_!$k%}tWCh8uq`N}AqQ70NnA{mUlGzF@%X?slEx{gCd3FNDtV=wX%A
zXb2svE%B^t*Az+_fh9FJo`C5|128JKZ++!wiFd%HI*p%xYSWw+!uVQD;IMjPr-a
zdOBN4o*1}{CjOEM8f+8g0AJAuyU9OvcjJYn})s`NMjlxWh)UiLRuhUUFAX}?J#
zM}oz=iVgwdkJloaxP8b=M9yy9kTyU$~iO@bgPJ!oak6P8#FCaZY^3|5ArGXxUW
zDFN*4l=C-IPSR8mT@jTeE$xIg7FcTOrCF{I~VAYqAvAgc6JL^$%2Ws84xXyowk+z
z$2Lz4?$mX6*;pG$pg^!l^Z1?o(KQH9p;U=}t7)jk)1IUs^00e~#acUyZmEcSmY;
znT(p4SxeuRW;sf({;iqxEh!-;^Sb6H6eL{-I#lku%(bConHy5F_?qfn(A1H7p!lZz
z1I=}5u*#iCoQW5jYfxT(=I?ejSEZot`)Tm3AjQ4HJu0#HJ7E~mpjPkYo+C94M1o@
zdLyV$kX5#Qh)fkpTggV6%8qqhTnl|CZhn$ddd!NY-5`UfDh4okPK=Csr#!X`65
zo3!!K0IT16yk%s7@58S2t**tQJ5rDFBmVSe7I;vvJ(MWyQoc?08h1CRxG4{$LB}-
zP(@P7GXu1k*}@#hts^I(12}w?Z(Mh5H9-;^GQwu(%oiSCzU)faNVI@~%evQ)L!u
zo^+4YdT^~((=Fl_B9A7l|Bf=BdI;i0Z4IgU-64g(phQdZ%#%|3J+*rC`K54b5~
zo|zE2okOQME5MfG|M!|02qGL#}~YmL)yxm7VtPbm@ls#ltM#%47q@ygL|as$%
z{#CjtrO?=UW-gN{1m1#U-7d{Qhyw0jh^3ix#udWYxE?AHLCplBSzwqinmQk+Gb
zQ5qI^3lA9ctF%~}C(*=s=1B

RE: [PATCH] soc: intel: sst-haswell-ipc: Remove some unused functions

2015-01-03 Thread Jie, Yang

Hi Rickard,

Thanks for your checking.

I have just confirmed that those functions really not used currently, although 
they may be needed for advanced developing. 
So, I have no objection if you remove them now.

Liam, what's your opinion?

~Keyon

> -Original Message-
> From: Rickard Strandqvist [mailto:rickard_strandqv...@spectrumdigital.se]
> Sent: Sunday, January 04, 2015 8:35 AM
> To: Liam Girdwood; Mark Brown
> Cc: Rickard Strandqvist; Jaroslav Kysela; Takashi Iwai; Jie, Yang; Jarkko 
> Nikula;
> Dan Carpenter; Christian Engelmayer; Piskorski, Pawel;
> alsa-de...@alsa-project.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] soc: intel: sst-haswell-ipc: Remove some unused functions
> 
> Removes some functions that are not used anywhere:
> sst_hsw_stream_unmute() sst_hsw_stream_mute() msg_set_stage_type()
> sst_hsw_dx_get_state() sst_hsw_dx_set_state()
> sst_hsw_stream_set_write_position()
> sst_hsw_stream_get_vol_reg() sst_hsw_stream_get_peak_reg()
> sst_hsw_stream_get_pointer_reg() sst_hsw_stream_get_read_reg()
> sst_hsw_stream_get_mixer_id() sst_hsw_stream_get_hw_id()
> sst_hsw_mixer_set_volume_curve() sst_hsw_mixer_unmute()
> sst_hsw_mixer_mute()
> sst_hsw_stream_set_volume_curve()
> 
> This was partially found by using a static code analysis program called
> cppcheck.
> 
> Signed-off-by: Rickard Strandqvist 
> ---
>  sound/soc/intel/sst-haswell-ipc.c |  226 
> -
>  sound/soc/intel/sst-haswell-ipc.h |   34 --
>  2 files changed, 260 deletions(-)
> 
> diff --git a/sound/soc/intel/sst-haswell-ipc.c 
> b/sound/soc/intel/sst-haswell-ipc.c
> index b629151..26f856c 100644
> --- a/sound/soc/intel/sst-haswell-ipc.c
> +++ b/sound/soc/intel/sst-haswell-ipc.c
> @@ -333,12 +333,6 @@ static inline u32 msg_get_stage_type(u32 msg)
>   return (msg & IPC_STG_TYPE_MASK) >>  IPC_STG_TYPE_SHIFT;  }
> 
> -static inline u32 msg_set_stage_type(u32 msg, u32 type) -{
> - return (msg & ~IPC_STG_TYPE_MASK) +
> - (type << IPC_STG_TYPE_SHIFT);
> -}
> -
>  static inline u32 msg_get_stream_id(u32 msg)  {
>   return (msg & IPC_STR_ID_MASK) >>  IPC_STR_ID_SHIFT; @@ -965,45
> +959,6 @@ int sst_hsw_fw_get_version(struct sst_hsw *hsw,  }
> 
>  /* Mixer Controls */
> -int sst_hsw_stream_mute(struct sst_hsw *hsw, struct sst_hsw_stream
> *stream,
> - u32 stage_id, u32 channel)
> -{
> - int ret;
> -
> - ret = sst_hsw_stream_get_volume(hsw, stream, stage_id, channel,
> - >mute_volume[channel]);
> - if (ret < 0)
> - return ret;
> -
> - ret = sst_hsw_stream_set_volume(hsw, stream, stage_id, channel, 0);
> - if (ret < 0) {
> - dev_err(hsw->dev, "error: can't unmute stream %d channel %d\n",
> - stream->reply.stream_hw_id, channel);
> - return ret;
> - }
> -
> - stream->mute[channel] = 1;
> - return 0;
> -}
> -
> -int sst_hsw_stream_unmute(struct sst_hsw *hsw, struct sst_hsw_stream
> *stream,
> - u32 stage_id, u32 channel)
> -
> -{
> - int ret;
> -
> - stream->mute[channel] = 0;
> - ret = sst_hsw_stream_set_volume(hsw, stream, stage_id, channel,
> - stream->mute_volume[channel]);
> - if (ret < 0) {
> - dev_err(hsw->dev, "error: can't unmute stream %d channel %d\n",
> - stream->reply.stream_hw_id, channel);
> - return ret;
> - }
> -
> - return 0;
> -}
> -
>  int sst_hsw_stream_get_volume(struct sst_hsw *hsw, struct
> sst_hsw_stream *stream,
>   u32 stage_id, u32 channel, u32 *volume)  { @@ -1017,17 +972,6 @@ int
> sst_hsw_stream_get_volume(struct sst_hsw *hsw, struct sst_hsw_stream
> *stream
>   return 0;
>  }
> 
> -int sst_hsw_stream_set_volume_curve(struct sst_hsw *hsw,
> - struct sst_hsw_stream *stream, u64 curve_duration,
> - enum sst_hsw_volume_curve curve)
> -{
> - /* curve duration in steps of 100ns */
> - stream->vol_req.curve_duration = curve_duration;
> - stream->vol_req.curve_type = curve;
> -
> - return 0;
> -}
> -
>  /* stream volume */
>  int sst_hsw_stream_set_volume(struct sst_hsw *hsw,
>   struct sst_hsw_stream *stream, u32 stage_id, u32 channel, u32 volume)
> @@ -1065,42 +1009,6 @@ int sst_hsw_stream_set_volume(struct sst_hsw
> *hsw,
>   return 0;
>  }
> 
> -int sst_hsw_mixer_mute(struct sst_hsw *hsw, u32 stage_id, u32 channel) -{
> - int ret;
> -
> - ret = sst_hsw_mixer_get_volume(hsw, stage_id, channel,
> - >mute_volume[channel]);
> - 

RE: [PATCH] soc: intel: sst-haswell-ipc: Remove some unused functions

2015-01-03 Thread Jie, Yang

Hi Rickard,

Thanks for your checking.

I have just confirmed that those functions really not used currently, although 
they may be needed for advanced developing. 
So, I have no objection if you remove them now.

Liam, what's your opinion?

~Keyon

 -Original Message-
 From: Rickard Strandqvist [mailto:rickard_strandqv...@spectrumdigital.se]
 Sent: Sunday, January 04, 2015 8:35 AM
 To: Liam Girdwood; Mark Brown
 Cc: Rickard Strandqvist; Jaroslav Kysela; Takashi Iwai; Jie, Yang; Jarkko 
 Nikula;
 Dan Carpenter; Christian Engelmayer; Piskorski, Pawel;
 alsa-de...@alsa-project.org; linux-kernel@vger.kernel.org
 Subject: [PATCH] soc: intel: sst-haswell-ipc: Remove some unused functions
 
 Removes some functions that are not used anywhere:
 sst_hsw_stream_unmute() sst_hsw_stream_mute() msg_set_stage_type()
 sst_hsw_dx_get_state() sst_hsw_dx_set_state()
 sst_hsw_stream_set_write_position()
 sst_hsw_stream_get_vol_reg() sst_hsw_stream_get_peak_reg()
 sst_hsw_stream_get_pointer_reg() sst_hsw_stream_get_read_reg()
 sst_hsw_stream_get_mixer_id() sst_hsw_stream_get_hw_id()
 sst_hsw_mixer_set_volume_curve() sst_hsw_mixer_unmute()
 sst_hsw_mixer_mute()
 sst_hsw_stream_set_volume_curve()
 
 This was partially found by using a static code analysis program called
 cppcheck.
 
 Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se
 ---
  sound/soc/intel/sst-haswell-ipc.c |  226 
 -
  sound/soc/intel/sst-haswell-ipc.h |   34 --
  2 files changed, 260 deletions(-)
 
 diff --git a/sound/soc/intel/sst-haswell-ipc.c 
 b/sound/soc/intel/sst-haswell-ipc.c
 index b629151..26f856c 100644
 --- a/sound/soc/intel/sst-haswell-ipc.c
 +++ b/sound/soc/intel/sst-haswell-ipc.c
 @@ -333,12 +333,6 @@ static inline u32 msg_get_stage_type(u32 msg)
   return (msg  IPC_STG_TYPE_MASK)   IPC_STG_TYPE_SHIFT;  }
 
 -static inline u32 msg_set_stage_type(u32 msg, u32 type) -{
 - return (msg  ~IPC_STG_TYPE_MASK) +
 - (type  IPC_STG_TYPE_SHIFT);
 -}
 -
  static inline u32 msg_get_stream_id(u32 msg)  {
   return (msg  IPC_STR_ID_MASK)   IPC_STR_ID_SHIFT; @@ -965,45
 +959,6 @@ int sst_hsw_fw_get_version(struct sst_hsw *hsw,  }
 
  /* Mixer Controls */
 -int sst_hsw_stream_mute(struct sst_hsw *hsw, struct sst_hsw_stream
 *stream,
 - u32 stage_id, u32 channel)
 -{
 - int ret;
 -
 - ret = sst_hsw_stream_get_volume(hsw, stream, stage_id, channel,
 - stream-mute_volume[channel]);
 - if (ret  0)
 - return ret;
 -
 - ret = sst_hsw_stream_set_volume(hsw, stream, stage_id, channel, 0);
 - if (ret  0) {
 - dev_err(hsw-dev, error: can't unmute stream %d channel %d\n,
 - stream-reply.stream_hw_id, channel);
 - return ret;
 - }
 -
 - stream-mute[channel] = 1;
 - return 0;
 -}
 -
 -int sst_hsw_stream_unmute(struct sst_hsw *hsw, struct sst_hsw_stream
 *stream,
 - u32 stage_id, u32 channel)
 -
 -{
 - int ret;
 -
 - stream-mute[channel] = 0;
 - ret = sst_hsw_stream_set_volume(hsw, stream, stage_id, channel,
 - stream-mute_volume[channel]);
 - if (ret  0) {
 - dev_err(hsw-dev, error: can't unmute stream %d channel %d\n,
 - stream-reply.stream_hw_id, channel);
 - return ret;
 - }
 -
 - return 0;
 -}
 -
  int sst_hsw_stream_get_volume(struct sst_hsw *hsw, struct
 sst_hsw_stream *stream,
   u32 stage_id, u32 channel, u32 *volume)  { @@ -1017,17 +972,6 @@ int
 sst_hsw_stream_get_volume(struct sst_hsw *hsw, struct sst_hsw_stream
 *stream
   return 0;
  }
 
 -int sst_hsw_stream_set_volume_curve(struct sst_hsw *hsw,
 - struct sst_hsw_stream *stream, u64 curve_duration,
 - enum sst_hsw_volume_curve curve)
 -{
 - /* curve duration in steps of 100ns */
 - stream-vol_req.curve_duration = curve_duration;
 - stream-vol_req.curve_type = curve;
 -
 - return 0;
 -}
 -
  /* stream volume */
  int sst_hsw_stream_set_volume(struct sst_hsw *hsw,
   struct sst_hsw_stream *stream, u32 stage_id, u32 channel, u32 volume)
 @@ -1065,42 +1009,6 @@ int sst_hsw_stream_set_volume(struct sst_hsw
 *hsw,
   return 0;
  }
 
 -int sst_hsw_mixer_mute(struct sst_hsw *hsw, u32 stage_id, u32 channel) -{
 - int ret;
 -
 - ret = sst_hsw_mixer_get_volume(hsw, stage_id, channel,
 - hsw-mute_volume[channel]);
 - if (ret  0)
 - return ret;
 -
 - ret = sst_hsw_mixer_set_volume(hsw, stage_id, channel, 0);
 - if (ret  0) {
 - dev_err(hsw-dev, error: failed to unmute mixer channel %d\n,
 - channel);
 - return ret;
 - }
 -
 - hsw-mute[channel] = 1;
 - return 0;
 -}
 -
 -int sst_hsw_mixer_unmute(struct sst_hsw *hsw, u32 stage_id, u32 channel) -{
 - int ret;
 -
 - ret = sst_hsw_mixer_set_volume(hsw, stage_id, channel,
 - hsw-mixer_info.volume_register_address[channel]);
 - if (ret  0

RE: Do you know who maintains firmware upstreaming for linux now?

2014-11-30 Thread Jie, Yang

> -Original Message-
> From: Kyle McMartin [mailto:k...@infradead.org]
> Sent: Monday, December 01, 2014 9:41 AM
> To: Jie, Yang
> Cc: linux-firmw...@kernel.org; linux-kernel@vger.kernel.org;
> b...@decadent.org.uk; k...@infradead.org; Woodhouse, David;
> k...@kernel.org; Girdwood, Liam R; Li, Jocelyn; Lin, Mengdong; Chehab, John;
> Hindman, Gavin; Strasser, Kevin; Accardi, Kristen C; Schlobohm, Bruce; Nikula,
> Jarkko
> Subject: Re: Do you know who maintains firmware upstreaming for linux now?
> 
> On Fri, Nov 28, 2014 at 11:51:16AM +, Jie, Yang wrote:
> >
> > Hi, All,
> >
> > Could someone clarify who maintains firmware upstreaming to Linux at the
> moment?
> >
> > We are working on upstream a firmware binary and its license to
> git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git,
> We've sent the patch to linux-firmw...@kernel.org but got no reply for
> several(4~5) weeks.
> > I can imagine that maintainers may be very busy, and not sure if Ben/Kyle
> have been on vacation, or can someone else help to review and apply our
> firmware patch?
> >
> 
> Sorry, we've just been busy, and I figured someone would pick up my 
> slacking...
> I'll get to it tonight.
> 
> regards, Kyle
[Keyon] Happy to know that you are available, Kyle, thanks for your taking time 
to help.

Regards,
~Keyon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: Do you know who maintains firmware upstreaming for linux now?

2014-11-30 Thread Jie, Yang

 -Original Message-
 From: Kyle McMartin [mailto:k...@infradead.org]
 Sent: Monday, December 01, 2014 9:41 AM
 To: Jie, Yang
 Cc: linux-firmw...@kernel.org; linux-kernel@vger.kernel.org;
 b...@decadent.org.uk; k...@infradead.org; Woodhouse, David;
 k...@kernel.org; Girdwood, Liam R; Li, Jocelyn; Lin, Mengdong; Chehab, John;
 Hindman, Gavin; Strasser, Kevin; Accardi, Kristen C; Schlobohm, Bruce; Nikula,
 Jarkko
 Subject: Re: Do you know who maintains firmware upstreaming for linux now?
 
 On Fri, Nov 28, 2014 at 11:51:16AM +, Jie, Yang wrote:
 
  Hi, All,
 
  Could someone clarify who maintains firmware upstreaming to Linux at the
 moment?
 
  We are working on upstream a firmware binary and its license to
 git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git,
 We've sent the patch to linux-firmw...@kernel.org but got no reply for
 several(4~5) weeks.
  I can imagine that maintainers may be very busy, and not sure if Ben/Kyle
 have been on vacation, or can someone else help to review and apply our
 firmware patch?
 
 
 Sorry, we've just been busy, and I figured someone would pick up my 
 slacking...
 I'll get to it tonight.
 
 regards, Kyle
[Keyon] Happy to know that you are available, Kyle, thanks for your taking time 
to help.

Regards,
~Keyon
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Do you know who maintains firmware upstreaming for linux now?

2014-11-28 Thread Jie, Yang

Hi, All,

Could someone clarify who maintains firmware upstreaming to Linux at the moment?

We are working on upstream a firmware binary and its license to 
git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git, 
We've sent the patch to linux-firmw...@kernel.org but got no reply for 
several(4~5) weeks.
I can imagine that maintainers may be very busy, and not sure if Ben/Kyle have 
been on vacation, or can someone else help to review and apply our firmware 
patch? 

Thanks for your help.

Regards,
~Keyon


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Do you know who maintains firmware upstreaming for linux now?

2014-11-28 Thread Jie, Yang

Hi, All,

Could someone clarify who maintains firmware upstreaming to Linux at the moment?

We are working on upstream a firmware binary and its license to 
git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git, 
We've sent the patch to linux-firmw...@kernel.org but got no reply for 
several(4~5) weeks.
I can imagine that maintainers may be very busy, and not sure if Ben/Kyle have 
been on vacation, or can someone else help to review and apply our firmware 
patch? 

Thanks for your help.

Regards,
~Keyon


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] ACPI / LPSS: add lpss device for Wildcat Point PCH

2014-07-31 Thread Jie Yang
INT3438 is the ADSP device on Wildcat Point platform
with 2 DW DMA engines built In. The DMA engines are
used for DSP FW loading and audio data transferring.
These DMA engine probing need the clock, without it,
probing may failed and can't go forward.

Add lpss device "INT3438" for Wildcat Point PCH, to
provide clock for its ADSP DMA engine probing.

Signed-off-by: Jie Yang 
---
 drivers/acpi/acpi_lpss.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 9cb65b0..ce06149 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -113,6 +113,14 @@ static void lpss_i2c_setup(struct lpss_private_data *pdata)
writel(val, pdata->mmio_base + offset);
 }
 
+static struct lpss_device_desc wpt_dev_desc = {
+   .clk_required = true,
+   .prv_offset = 0x800,
+   .ltr_required = true,
+   .clk_divider = true,
+   .clk_gate = true,
+};
+
 static struct lpss_device_desc lpt_dev_desc = {
.clk_required = true,
.prv_offset = 0x800,
@@ -226,6 +234,8 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = 
{
{ "INT3436", LPSS_ADDR(lpt_sdio_dev_desc) },
{ "INT3437", },
 
+   { "INT3438", LPSS_ADDR(wpt_dev_desc) },
+
{ }
 };
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] ACPI / LPSS: add lpss device for wpt

2014-07-31 Thread Jie Yang
Add lpss device "INT3438" for wpt, which also require
clock before the dma engine who is built in ADSP
probing. Otherwise, the probing may faild.

Signed-off-by: Jie Yang 
---
 drivers/acpi/acpi_lpss.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 9cb65b0..ce06149 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -113,6 +113,14 @@ static void lpss_i2c_setup(struct lpss_private_data *pdata)
writel(val, pdata->mmio_base + offset);
 }
 
+static struct lpss_device_desc wpt_dev_desc = {
+   .clk_required = true,
+   .prv_offset = 0x800,
+   .ltr_required = true,
+   .clk_divider = true,
+   .clk_gate = true,
+};
+
 static struct lpss_device_desc lpt_dev_desc = {
.clk_required = true,
.prv_offset = 0x800,
@@ -226,6 +234,8 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = 
{
{ "INT3436", LPSS_ADDR(lpt_sdio_dev_desc) },
{ "INT3437", },
 
+   { "INT3438", LPSS_ADDR(wpt_dev_desc) },
+
{ }
 };
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] ACPI / LPSS: add lpss device for wpt

2014-07-31 Thread Jie Yang
Add lpss device INT3438 for wpt, which also require
clock before the dma engine who is built in ADSP
probing. Otherwise, the probing may faild.

Signed-off-by: Jie Yang yang@intel.com
---
 drivers/acpi/acpi_lpss.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 9cb65b0..ce06149 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -113,6 +113,14 @@ static void lpss_i2c_setup(struct lpss_private_data *pdata)
writel(val, pdata-mmio_base + offset);
 }
 
+static struct lpss_device_desc wpt_dev_desc = {
+   .clk_required = true,
+   .prv_offset = 0x800,
+   .ltr_required = true,
+   .clk_divider = true,
+   .clk_gate = true,
+};
+
 static struct lpss_device_desc lpt_dev_desc = {
.clk_required = true,
.prv_offset = 0x800,
@@ -226,6 +234,8 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = 
{
{ INT3436, LPSS_ADDR(lpt_sdio_dev_desc) },
{ INT3437, },
 
+   { INT3438, LPSS_ADDR(wpt_dev_desc) },
+
{ }
 };
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] ACPI / LPSS: add lpss device for Wildcat Point PCH

2014-07-31 Thread Jie Yang
INT3438 is the ADSP device on Wildcat Point platform
with 2 DW DMA engines built In. The DMA engines are
used for DSP FW loading and audio data transferring.
These DMA engine probing need the clock, without it,
probing may failed and can't go forward.

Add lpss device INT3438 for Wildcat Point PCH, to
provide clock for its ADSP DMA engine probing.

Signed-off-by: Jie Yang yang@intel.com
---
 drivers/acpi/acpi_lpss.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 9cb65b0..ce06149 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -113,6 +113,14 @@ static void lpss_i2c_setup(struct lpss_private_data *pdata)
writel(val, pdata-mmio_base + offset);
 }
 
+static struct lpss_device_desc wpt_dev_desc = {
+   .clk_required = true,
+   .prv_offset = 0x800,
+   .ltr_required = true,
+   .clk_divider = true,
+   .clk_gate = true,
+};
+
 static struct lpss_device_desc lpt_dev_desc = {
.clk_required = true,
.prv_offset = 0x800,
@@ -226,6 +234,8 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = 
{
{ INT3436, LPSS_ADDR(lpt_sdio_dev_desc) },
{ INT3437, },
 
+   { INT3438, LPSS_ADDR(wpt_dev_desc) },
+
{ }
 };
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/