public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, "Shawn Guo" <shawn.guo@linaro.org>,
	linux-kernel@vger.kernel.org,
	"Lothar Waßmann" <LW@KARO-electronics.de>
Subject: [PATCH v3] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm
Date: Mon, 26 Nov 2012 09:50:47 +0100	[thread overview]
Message-ID: <1353919847-8395-1-git-send-email-LW@KARO-electronics.de> (raw)
In-Reply-To: <20121123114603.GF4529@opensource.wolfsonmicro.com>

Hi Mark,

thanks your insisting on a better description for the patch, I found a
more appropriate solution for the problem: 

Compiling the SoC Audio driver for Freescale i.MX as a module
(CONFIG_SND_SOC_IMX_PCM=m) results in a non-functional sound driver
indicated by the error message:
| imx-sgtl5000 sound.1: platform imx-pcm-audio not registered
| imx-sgtl5000 sound.1: snd_soc_register_card failed (-517)
| platform sound.1: Driver imx-sgtl5000 requests probe deferral
instead of the message:
| imx-sgtl5000 sound.1:  sgtl5000 <-> 63fcc000.ssi mapping ok
that is to be expected upon loading the snd-soc-imx-pcm.ko module.

The build log reveals, that the file imx-pcm-dma.o (or imx-pcm-fiq.o
depending on the kernel configuration), which should be linked
together with imx-pcm.o into snd-imx-pcm.ko, is not being compiled in
this case.

The make rules for these files shows that the target object imx-pcm.o
is assigned to the variable snd-soc-imx-pcm-y while
imx-pcm-{dma,fiq}.o are added to to
snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_DMA) and
snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_FIQ) which resolve to
snd-soc-imx-pcm-m in this case.

According to Documentation/kbuild/modules.txt:
|When the module is built from multiple sources, an additional line is
|needed listing the files:
|
|        <module_name>-y := <src1>.o <src2>.o ...
Thus the type of the config variables CONFIG_SND_SOC_IMX_PCM_DMA and
CONFIG_SND_SOC_IMX_PCM_FIQ should be 'bool' instead of 'tristate' to
resolve to 'y' when selected.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
---
 sound/soc/fsl/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 10fd172..3b98159 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -112,12 +112,12 @@ config SND_SOC_IMX_PCM
 	tristate
 
 config SND_SOC_IMX_PCM_FIQ
-	tristate
+	bool
 	select FIQ
 	select SND_SOC_IMX_PCM
 
 config SND_SOC_IMX_PCM_DMA
-	tristate
+	bool
 	select SND_SOC_DMAENGINE_PCM
 	select SND_SOC_IMX_PCM
 
-- 
1.7.2.5


  reply	other threads:[~2012-11-26  8:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22 12:31 [BUGFIX PATCH] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm Lothar Waßmann
2012-11-22 12:31 ` [PATCH] ASoC: imx: add MODULE_LICENSE("GPL") Lothar Waßmann
2012-11-23 14:40   ` Mark Brown
2012-11-22 12:31 ` [BUGFIX PATCH] ASoC: imx-sgtl5000: prevent module from being unloaded when in use Lothar Waßmann
2012-11-23 14:42   ` Mark Brown
2012-11-22 12:31 ` [PATCH] ASoC: mxs-saif: export mxs_saif_put_mclk,mxs_saif_get_mclk Lothar Waßmann
2012-11-23  2:06   ` Mark Brown
2012-11-23  7:21     ` Lothar Waßmann
2012-11-23 14:45       ` Mark Brown
2012-11-26  8:49         ` Lothar Waßmann
2012-11-22 12:31 ` [PATCH] ASoC: dmaengine_pcm: set MODULE_LICENSE Lothar Waßmann
2012-11-23  2:05 ` [BUGFIX PATCH] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm Mark Brown
2012-11-23  6:59   ` Lothar Waßmann
2012-11-23  8:13     ` Mark Brown
2012-11-23  9:12       ` [PATCH v2] " Lothar Waßmann
2012-11-23 10:08         ` Mark Brown
2012-11-23 10:21           ` Lothar Waßmann
2012-11-23 11:47             ` Mark Brown
2012-11-26  8:50               ` Lothar Waßmann [this message]
2012-11-27 19:36         ` Mark Brown
2012-11-27 19:37         ` 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=1353919847-8395-1-git-send-email-LW@KARO-electronics.de \
    --to=lw@karo-electronics.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox