* [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module
@ 2012-10-01 9:29 Peter Ujfalusi
2012-10-08 11:50 ` Péter Ujfalusi
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Peter Ujfalusi @ 2012-10-01 9:29 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown; +Cc: alsa-devel, Lars-Peter Clausen
soc-dmaengine-pcm library need to be part of the snd-soc-core in order to
be able to compile ASoC as modules when dmaengine is enabled on the platform.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
sound/soc/Makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/Makefile b/sound/soc/Makefile
index bcbf1d0..99f32f7 100644
--- a/sound/soc/Makefile
+++ b/sound/soc/Makefile
@@ -1,8 +1,9 @@
snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o
snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o
-snd-soc-dmaengine-pcm-objs := soc-dmaengine-pcm.o
-obj-$(CONFIG_SND_SOC_DMAENGINE_PCM) += snd-soc-dmaengine-pcm.o
+ifneq ($(CONFIG_SND_SOC_DMAENGINE_PCM),)
+snd-soc-core-objs += soc-dmaengine-pcm.o
+endif
obj-$(CONFIG_SND_SOC) += snd-soc-core.o
obj-$(CONFIG_SND_SOC) += codecs/
--
1.7.12
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module
2012-10-01 9:29 [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module Peter Ujfalusi
@ 2012-10-08 11:50 ` Péter Ujfalusi
2012-10-09 4:15 ` Mark Brown
2012-10-09 6:57 ` Mark Brown
2012-10-09 6:58 ` Mark Brown
2 siblings, 1 reply; 9+ messages in thread
From: Péter Ujfalusi @ 2012-10-08 11:50 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown; +Cc: alsa-devel, Lars-Peter Clausen
Hi Mark,
On 10/01/2012 12:29 PM, Peter Ujfalusi wrote:
> soc-dmaengine-pcm library need to be part of the snd-soc-core in order to
> be able to compile ASoC as modules when dmaengine is enabled on the platform.
Would it be possible to schedule this patch for 3.7? I'm sure if you build any
platform which uses dmaegine for audio and compile the audio as module you
will also have errors about missing symbols.
Thank you,
Péter
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> sound/soc/Makefile | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/Makefile b/sound/soc/Makefile
> index bcbf1d0..99f32f7 100644
> --- a/sound/soc/Makefile
> +++ b/sound/soc/Makefile
> @@ -1,8 +1,9 @@
> snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o
> snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o
>
> -snd-soc-dmaengine-pcm-objs := soc-dmaengine-pcm.o
> -obj-$(CONFIG_SND_SOC_DMAENGINE_PCM) += snd-soc-dmaengine-pcm.o
> +ifneq ($(CONFIG_SND_SOC_DMAENGINE_PCM),)
> +snd-soc-core-objs += soc-dmaengine-pcm.o
> +endif
>
> obj-$(CONFIG_SND_SOC) += snd-soc-core.o
> obj-$(CONFIG_SND_SOC) += codecs/
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module
2012-10-08 11:50 ` Péter Ujfalusi
@ 2012-10-09 4:15 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2012-10-09 4:15 UTC (permalink / raw)
To: Péter Ujfalusi; +Cc: alsa-devel, Lars-Peter Clausen, Liam Girdwood
On Mon, Oct 08, 2012 at 02:50:56PM +0300, Péter Ujfalusi wrote:
> On 10/01/2012 12:29 PM, Peter Ujfalusi wrote:
> > soc-dmaengine-pcm library need to be part of the snd-soc-core in order to
> > be able to compile ASoC as modules when dmaengine is enabled on the platform.
> Would it be possible to schedule this patch for 3.7? I'm sure if you build any
> platform which uses dmaegine for audio and compile the audio as module you
> will also have errors about missing symbols.
As ever this sort of contentless nag is annoying rather than helpful.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module
2012-10-01 9:29 [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module Peter Ujfalusi
2012-10-08 11:50 ` Péter Ujfalusi
@ 2012-10-09 6:57 ` Mark Brown
2012-10-09 6:58 ` Mark Brown
2 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2012-10-09 6:57 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, Lars-Peter Clausen, Liam Girdwood
On Mon, Oct 01, 2012 at 12:29:26PM +0300, Peter Ujfalusi wrote:
> soc-dmaengine-pcm library need to be part of the snd-soc-core in order to
> be able to compile ASoC as modules when dmaengine is enabled on the platform.
Applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module
2012-10-01 9:29 [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module Peter Ujfalusi
2012-10-08 11:50 ` Péter Ujfalusi
2012-10-09 6:57 ` Mark Brown
@ 2012-10-09 6:58 ` Mark Brown
2012-10-09 9:07 ` Péter Ujfalusi
2 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2012-10-09 6:58 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, Lars-Peter Clausen, Liam Girdwood
On Mon, Oct 01, 2012 at 12:29:26PM +0300, Peter Ujfalusi wrote:
> soc-dmaengine-pcm library need to be part of the snd-soc-core in order to
> be able to compile ASoC as modules when dmaengine is enabled on the platform.
I also meant to ask... what's the actual issue here?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module
2012-10-09 6:58 ` Mark Brown
@ 2012-10-09 9:07 ` Péter Ujfalusi
2012-10-09 9:08 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Péter Ujfalusi @ 2012-10-09 9:07 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Lars-Peter Clausen, Liam Girdwood
On 10/09/2012 08:58 AM, Mark Brown wrote:
> On Mon, Oct 01, 2012 at 12:29:26PM +0300, Peter Ujfalusi wrote:
>
>> soc-dmaengine-pcm library need to be part of the snd-soc-core in order to
>> be able to compile ASoC as modules when dmaengine is enabled on the platform.
>
> I also meant to ask... what's the actual issue here?
When we build sound as modules for OMAP which has been converted to dmaengine:
ERROR: "snd_hwparams_to_dma_slave_config" [sound/soc/omap/snd-soc-omap.ko]
undefined!
ERROR: "snd_dmaengine_pcm_pointer" [sound/soc/omap/snd-soc-omap.ko] undefined!
ERROR: "snd_dmaengine_pcm_open" [sound/soc/omap/snd-soc-omap.ko] undefined!
ERROR: "snd_dmaengine_pcm_close" [sound/soc/omap/snd-soc-omap.ko] undefined!
ERROR: "snd_dmaengine_pcm_get_chan" [sound/soc/omap/snd-soc-omap.ko] undefined!
ERROR: "snd_dmaengine_pcm_trigger" [sound/soc/omap/snd-soc-omap.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
--
Péter
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module
2012-10-09 9:07 ` Péter Ujfalusi
@ 2012-10-09 9:08 ` Mark Brown
2012-10-09 13:16 ` Péter Ujfalusi
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2012-10-09 9:08 UTC (permalink / raw)
To: Péter Ujfalusi; +Cc: alsa-devel, Lars-Peter Clausen, Liam Girdwood
On Tue, Oct 09, 2012 at 11:07:11AM +0200, Péter Ujfalusi wrote:
> When we build sound as modules for OMAP which has been converted to dmaengine:
> ERROR: "snd_hwparams_to_dma_slave_config" [sound/soc/omap/snd-soc-omap.ko]
> undefined!
> ERROR: "snd_dmaengine_pcm_pointer" [sound/soc/omap/snd-soc-omap.ko] undefined!
> ERROR: "snd_dmaengine_pcm_open" [sound/soc/omap/snd-soc-omap.ko] undefined!
> ERROR: "snd_dmaengine_pcm_close" [sound/soc/omap/snd-soc-omap.ko] undefined!
> ERROR: "snd_dmaengine_pcm_get_chan" [sound/soc/omap/snd-soc-omap.ko] undefined!
> ERROR: "snd_dmaengine_pcm_trigger" [sound/soc/omap/snd-soc-omap.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
What makes you believe that this is due to the code not being part of
the core module?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module
2012-10-09 9:08 ` Mark Brown
@ 2012-10-09 13:16 ` Péter Ujfalusi
2012-10-10 1:48 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Péter Ujfalusi @ 2012-10-09 13:16 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Lars-Peter Clausen, Liam Girdwood
On 10/09/2012 11:08 AM, Mark Brown wrote:
> What makes you believe that this is due to the code not being part of
> the core module?
the linker tells me.
Without this patch with mainline kernel from today (I used tegra to see if it
happens there as well):
make tegra_defconfig
scripts/config -d CONFIG_MMC # MMC does not compile for tegra
scripts/config -e CONFIG_SOUND -e CONFIG_SND -e CONFIG_SND_SOC
Fine
scripts/config -e CONFIG_SOUND -e CONFIG_SND -m CONFIG_SND_SOC
sound/built-in.o: In function `dmaengine_pcm_dma_complete':
/home/ujfalusi/work/kernel/kernel.org-torvalds-linux-2.6/sound/soc/soc-dmaengine-pcm.c:134:
undefined reference to `snd_pcm_period_elapsed'
sound/built-in.o: In function `snd_dmaengine_pcm_open':
/home/ujfalusi/work/kernel/kernel.org-torvalds-linux-2.6/sound/soc/soc-dmaengine-pcm.c:285:
undefined reference to `snd_pcm_hw_constraint_integer'
make: *** [vmlinux] Error 1
scripts/config -e CONFIG_SOUND -m CONFIG_SND -m CONFIG_SND_SOC
scripts/config -m CONFIG_SOUND -m CONFIG_SND -m CONFIG_SND_SOC
ERROR: "snd_hwparams_to_dma_slave_config"
[sound/soc/tegra/snd-soc-tegra-pcm.ko] undefined!
ERROR: "snd_dmaengine_pcm_pointer" [sound/soc/tegra/snd-soc-tegra-pcm.ko]
undefined!
ERROR: "snd_dmaengine_pcm_open" [sound/soc/tegra/snd-soc-tegra-pcm.ko] undefined!
ERROR: "snd_dmaengine_pcm_close" [sound/soc/tegra/snd-soc-tegra-pcm.ko] undefined!
ERROR: "snd_dmaengine_pcm_get_chan" [sound/soc/tegra/snd-soc-tegra-pcm.ko]
undefined!
ERROR: "snd_dmaengine_pcm_trigger" [sound/soc/tegra/snd-soc-tegra-pcm.ko]
undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
make: *** Waiting for unfinished jobs....
With the patch:
make tegra_defconfig
scripts/config -d CONFIG_MMC # MMC does not compile for tegra
scripts/config -e CONFIG_SOUND -e CONFIG_SND -e CONFIG_SND_SOC
scripts/config -e CONFIG_SOUND -e CONFIG_SND -m CONFIG_SND_SOC
scripts/config -e CONFIG_SOUND -m CONFIG_SND -m CONFIG_SND_SOC
scripts/config -m CONFIG_SOUND -m CONFIG_SND -m CONFIG_SND_SOC
is fine.
I guess it was due to the Kconfig/Makefile related to soc-dmaengine:
config SND_SOC_DMAENGINE_PCM
bool
snd-soc-dmaengine-pcm-objs := soc-dmaengine-pcm.o
obj-$(CONFIG_SND_SOC_DMAENGINE_PCM) += snd-soc-dmaengine-pcm.o
My guess is that in this way the soc-dmaengine-pcm.o would want itself to be
built in to the kernel but since the sound is in modules there is no place to
link this part of the code.
If I change the Kconfig from bool to tristate it will build
snd-soc-dmaengine-pcm.ko but since the soc-dmaengine-pcm.c does not have
module_init it is not really going to load.
I might be wrong.
--
Péter
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module
2012-10-09 13:16 ` Péter Ujfalusi
@ 2012-10-10 1:48 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2012-10-10 1:48 UTC (permalink / raw)
To: Péter Ujfalusi; +Cc: alsa-devel, Lars-Peter Clausen, Liam Girdwood
On Tue, Oct 09, 2012 at 03:16:15PM +0200, Péter Ujfalusi wrote:
> On 10/09/2012 11:08 AM, Mark Brown wrote:
> > What makes you believe that this is due to the code not being part of
> > the core module?
> the linker tells me.
No it doesn't.
> Without this patch with mainline kernel from today (I used tegra to see if it
> happens there as well):
> [sound/soc/tegra/snd-soc-tegra-pcm.ko] undefined!
> ERROR: "snd_dmaengine_pcm_pointer" [sound/soc/tegra/snd-soc-tegra-pcm.ko]
> undefined!
> I guess it was due to the Kconfig/Makefile related to soc-dmaengine:
All the above is telling you is that if you make this change the error
goes away. It doesn't explain what the problem is or why this change
fixes it.
> config SND_SOC_DMAENGINE_PCM
> bool
> snd-soc-dmaengine-pcm-objs := soc-dmaengine-pcm.o
> obj-$(CONFIG_SND_SOC_DMAENGINE_PCM) += snd-soc-dmaengine-pcm.o
> My guess is that in this way the soc-dmaengine-pcm.o would want itself to be
> built in to the kernel but since the sound is in modules there is no place to
> link this part of the code.
> If I change the Kconfig from bool to tristate it will build
Indeed, so this is getting warmer. The problem is that the way Kconfig
is set up is causing CONFIG_SND_SOC_DMAENGINE_PCM to come out as
something that doesn't get built as it's a bool selected by a module and
as you say one fix here is to make the dmaengine code a module by itself.
> snd-soc-dmaengine-pcm.ko but since the soc-dmaengine-pcm.c does not have
> module_init it is not really going to load.
> I might be wrong.
No, why would module_init() have anything to do with this? Is there
something that needs to be run at startup for soc-dmaengine?
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-10-10 1:56 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-01 9:29 [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module Peter Ujfalusi
2012-10-08 11:50 ` Péter Ujfalusi
2012-10-09 4:15 ` Mark Brown
2012-10-09 6:57 ` Mark Brown
2012-10-09 6:58 ` Mark Brown
2012-10-09 9:07 ` Péter Ujfalusi
2012-10-09 9:08 ` Mark Brown
2012-10-09 13:16 ` Péter Ujfalusi
2012-10-10 1:48 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).