All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
	Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH] ASoC: dmaengine: Correct Makefile when sound is built as module
Date: Tue, 09 Oct 2012 15:16:15 +0200	[thread overview]
Message-ID: <5074239F.9050302@ti.com> (raw)
In-Reply-To: <20121009090857.GD8237@opensource.wolfsonmicro.com>

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

  reply	other threads:[~2012-10-09 13:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-10-10  1:48         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5074239F.9050302@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lars@metafoo.de \
    --cc=lrg@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.