2012-11-23 05:47:14

by Lothar Waßmann

[permalink] [raw]
Subject: [BUGFIX PATCH] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm

Due to a broken make rule, imx-pcm-dma.c or imx-pcm-fiq.c (whatever is
selected via Kconfig) will not be compiled when building as module,
resulting in a non-functional sound driver.

Signed-off-by: Lothar Waßmann <[email protected]>
---
sound/soc/fsl/Makefile | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile
index 515ba66..7bb5c38 100644
--- a/sound/soc/fsl/Makefile
+++ b/sound/soc/fsl/Makefile
@@ -36,8 +36,12 @@ obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o

obj-$(CONFIG_SND_SOC_IMX_PCM) += snd-soc-imx-pcm.o
snd-soc-imx-pcm-y := imx-pcm.o
-snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += imx-pcm-fiq.o
-snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_DMA) += imx-pcm-dma.o
+ifneq ($(CONFIG_SND_SOC_IMX_PCM_FIQ),)
+ snd-soc-imx-pcm-objs += imx-pcm-fiq.o
+endif
+ifneq ($(CONFIG_SND_SOC_IMX_PCM_DMA),)
+ snd-soc-imx-pcm-objs += imx-pcm-dma.o
+endif

# i.MX Machine Support
snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o
--
1.7.2.5


2012-11-23 02:05:23

by Mark Brown

[permalink] [raw]
Subject: Re: [BUGFIX PATCH] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm

On Thu, Nov 22, 2012 at 01:31:06PM +0100, Lothar Wa?mann wrote:

> obj-$(CONFIG_SND_SOC_IMX_PCM) += snd-soc-imx-pcm.o
> snd-soc-imx-pcm-y := imx-pcm.o
> -snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += imx-pcm-fiq.o
> -snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_DMA) += imx-pcm-dma.o
> +ifneq ($(CONFIG_SND_SOC_IMX_PCM_FIQ),)
> + snd-soc-imx-pcm-objs += imx-pcm-fiq.o
> +endif
> +ifneq ($(CONFIG_SND_SOC_IMX_PCM_DMA),)
> + snd-soc-imx-pcm-objs += imx-pcm-dma.o
> +endif

What is the actual bug here? This fix doesn't look obviously right, and
if we do need to move to -objs for some reason then the block ought to
be in the -objs section of the Makefile.


Attachments:
(No filename) (657.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-11-23 02:06:52

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] ASoC: mxs-saif: export mxs_saif_put_mclk,mxs_saif_get_mclk

On Thu, Nov 22, 2012 at 01:31:09PM +0100, Lothar Wa?mann wrote:
>
> Signed-off-by: Lothar Wa?mann <[email protected]>

Why?


Attachments:
(No filename) (130.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-11-23 05:46:19

by Lothar Waßmann

[permalink] [raw]
Subject: [PATCH] ASoC: mxs-saif: export mxs_saif_put_mclk,mxs_saif_get_mclk


Signed-off-by: Lothar Waßmann <[email protected]>
---
sound/soc/mxs/mxs-saif.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index c294fbb..f1d1f9e 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -229,6 +229,7 @@ int mxs_saif_put_mclk(unsigned int saif_id)
saif->mclk_in_use = 0;
return 0;
}
+EXPORT_SYMBOL_GPL(mxs_saif_put_mclk);

/*
* Get MCLK and set clock rate, then enable it
@@ -282,6 +283,7 @@ int mxs_saif_get_mclk(unsigned int saif_id, unsigned int mclk,

return 0;
}
+EXPORT_SYMBOL_GPL(mxs_saif_get_mclk);

/*
* SAIF DAI format configuration.
--
1.7.2.5

2012-11-23 05:46:29

by Lothar Waßmann

[permalink] [raw]
Subject: [PATCH] ASoC: dmaengine_pcm: set MODULE_LICENSE


Signed-off-by: Lothar Waßmann <[email protected]>
---
sound/soc/soc-dmaengine-pcm.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-dmaengine-pcm.c b/sound/soc/soc-dmaengine-pcm.c
index bbc1257..111b7d92 100644
--- a/sound/soc/soc-dmaengine-pcm.c
+++ b/sound/soc/soc-dmaengine-pcm.c
@@ -317,3 +317,5 @@ int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream)
return 0;
}
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_close);
+
+MODULE_LICENSE("GPL");
--
1.7.2.5

2012-11-23 05:46:18

by Lothar Waßmann

[permalink] [raw]
Subject: [BUGFIX PATCH] ASoC: imx-sgtl5000: prevent module from being unloaded when in use

set the 'onwer' field of the registered snd_soc_card object to prevent
removal of the module when its resources are in use.

Signed-off-by: Lothar Waßmann <[email protected]>
---
sound/soc/fsl/imx-sgtl5000.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index 199408e..3d9b1c4 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/sound/soc/fsl/imx-sgtl5000.c
@@ -162,6 +162,7 @@ static int __devinit imx_sgtl5000_probe(struct platform_device *pdev)
if (ret)
goto clk_fail;
data->card.num_links = 1;
+ data->card.owner = THIS_MODULE;
data->card.dai_link = &data->dai;
data->card.dapm_widgets = imx_sgtl5000_dapm_widgets;
data->card.num_dapm_widgets = ARRAY_SIZE(imx_sgtl5000_dapm_widgets);
--
1.7.2.5

2012-11-23 05:46:49

by Lothar Waßmann

[permalink] [raw]
Subject: [PATCH] ASoC: imx: add MODULE_LICENSE("GPL")

also set MODULE_AUTHOR and MODULE_DESCRIPTION

Signed-off-by: Lothar Waßmann <[email protected]>
---
sound/soc/fsl/imx-pcm.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/sound/soc/fsl/imx-pcm.c b/sound/soc/fsl/imx-pcm.c
index 93dc360..d5cd9ef 100644
--- a/sound/soc/fsl/imx-pcm.c
+++ b/sound/soc/fsl/imx-pcm.c
@@ -103,3 +103,7 @@ void imx_pcm_free(struct snd_pcm *pcm)
}
}
EXPORT_SYMBOL_GPL(imx_pcm_free);
+
+MODULE_DESCRIPTION("Freescale i.MX PCM driver");
+MODULE_AUTHOR("Sascha Hauer <[email protected]>");
+MODULE_LICENSE("GPL");
--
1.7.2.5

2012-11-23 07:00:05

by Lothar Waßmann

[permalink] [raw]
Subject: Re: [BUGFIX PATCH] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm

Hi,

Mark Brown writes:
> On Thu, Nov 22, 2012 at 01:31:06PM +0100, Lothar Waßmann wrote:
>
> > obj-$(CONFIG_SND_SOC_IMX_PCM) += snd-soc-imx-pcm.o
> > snd-soc-imx-pcm-y := imx-pcm.o
> > -snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += imx-pcm-fiq.o
> > -snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_DMA) += imx-pcm-dma.o
> > +ifneq ($(CONFIG_SND_SOC_IMX_PCM_FIQ),)
> > + snd-soc-imx-pcm-objs += imx-pcm-fiq.o
> > +endif
> > +ifneq ($(CONFIG_SND_SOC_IMX_PCM_DMA),)
> > + snd-soc-imx-pcm-objs += imx-pcm-dma.o
> > +endif
>
> What is the actual bug here? This fix doesn't look obviously right, and
> if we do need to move to -objs for some reason then the block ought to
> be in the -objs section of the Makefile.
>
As I mentioned in the part of my email that you didn't quote, if the
sound driver is being compiled as module, the files imx-pcm-fiq.c or
imx-pcm-dma.c which should be compiled as part of imx-pcm.o will not
be touched by the compiler:
CONFIG_SND_SOC_IMX_PCM=m
CONFIG_SND_SOC_IMX_PCM_DMA=m
CONFIG_SND_SOC_IMX_AUDMUX=m
CONFIG_SND_SOC_IMX_SGTL5000=m
GEN /usr/local/src/arm/projects/imx53/Release/rel-next/.build-snd-bugfix/Makefile
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
GEN /projects/imx53/Release/rel-next/.build-snd-bugfix/Makefile
CHK include/generated/uapi/linux/version.h
Using /usr/local/src/arm/projects/imx53/Release/rel-next/linux-next as source for kernel
CHK include/generated/utsrelease.h
make[2]: `include/generated/mach-types.h' is up to date.
CALL /usr/local/src/arm/projects/imx53/Release/rel-next/linux-next/scripts/checksyscalls.sh
LD sound/core/built-in.o
CC [M] sound/core/compress_offload.o
LD sound/soc/built-in.o
CC [M] sound/soc/soc-core.o
CC [M] sound/soc/soc-dapm.o
CC [M] sound/soc/soc-jack.o
CC [M] sound/core/memalloc.o
CC [M] sound/core/pcm.o
CC [M] sound/soc/soc-cache.o
CC [M] sound/core/pcm_native.o
CC [M] sound/core/pcm_lib.o
CC [M] sound/soc/soc-utils.o
CC [M] sound/core/pcm_timer.o
CC [M] sound/soc/soc-pcm.o
CC [M] sound/soc/soc-compress.o
CC [M] sound/soc/soc-io.o
CC [M] sound/soc/soc-dmaengine-pcm.o
CC [M] sound/core/pcm_misc.o
CC [M] sound/core/pcm_memory.o
CC [M] sound/core/timer.o
LD sound/soc/codecs/built-in.o
CC [M] sound/soc/codecs/sgtl5000.o
LD sound/soc/fsl/built-in.o
CC [M] sound/soc/fsl/fsl_ssi.o
CC [M] sound/soc/fsl/fsl_utils.o
CC [M] sound/soc/fsl/imx-audmux.o
LD [M] sound/soc/codecs/snd-soc-sgtl5000.o
CC [M] sound/soc/fsl/imx-pcm.o
CC [M] sound/soc/fsl/imx-sgtl5000.o
LD [M] sound/soc/snd-soc-core.o
LD [M] sound/core/snd-timer.o
LD [M] sound/core/snd-hrtimer.o
LD [M] sound/core/snd-pcm.o
LD [M] sound/core/snd-page-alloc.o
LD [M] sound/core/snd-compress.o
LD [M] sound/soc/fsl/snd-soc-fsl-ssi.o
LD [M] sound/soc/fsl/snd-soc-fsl-utils.o
LD [M] sound/soc/fsl/snd-soc-imx-audmux.o
LD [M] sound/soc/fsl/snd-soc-imx-pcm.o
LD [M] sound/soc/fsl/snd-soc-imx-sgtl5000.o
LD sound/built-in.o


With the following config:
CONFIG_SND_SOC_IMX_PCM=y
CONFIG_SND_SOC_IMX_PCM_DMA=y
CONFIG_SND_SOC_IMX_AUDMUX=y
CONFIG_SND_SOC_IMX_SGTL5000=y
GEN /usr/local/src/arm/projects/imx53/Release/rel-next/.build-snd-bugfix/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
GEN /usr/local/src/arm/projects/imx53/Release/rel-next/.build-snd-bugfix/Makefile
CHK include/generated/uapi/linux/version.h
Using /usr/local/src/arm/projects/imx53/Release/rel-next/linux-next as source for kernel
CHK include/generated/utsrelease.h
make[2]: `include/generated/mach-types.h' is up to date.
CALL /usr/local/src/arm/projects/imx53/Release/rel-next/linux-next/scripts/checksyscalls.sh
CC sound/soc/soc-core.o
CC sound/soc/soc-dapm.o
CC sound/soc/soc-jack.o
CC sound/soc/soc-cache.o
CC sound/soc/soc-utils.o
CC sound/soc/soc-pcm.o
CC sound/soc/soc-compress.o
CC sound/soc/soc-io.o
CC sound/soc/soc-dmaengine-pcm.o
LD sound/soc/atmel/built-in.o
LD sound/soc/au1x/built-in.o
LD sound/soc/blackfin/built-in.o
LD sound/soc/cirrus/built-in.o
CC sound/soc/codecs/sgtl5000.o
LD sound/soc/davinci/built-in.o
LD sound/soc/dwc/built-in.o
CC sound/soc/fsl/fsl_ssi.o
LD sound/soc/generic/built-in.o
LD sound/soc/jz4740/built-in.o
LD sound/soc/kirkwood/built-in.o
LD sound/soc/mid-x86/built-in.o
LD sound/soc/mxs/built-in.o
LD sound/soc/nuc900/built-in.o
LD sound/soc/omap/built-in.o
CC sound/soc/fsl/fsl_utils.o
LD sound/soc/pxa/built-in.o
LD sound/soc/s6000/built-in.o
LD sound/soc/samsung/built-in.o
LD sound/soc/sh/built-in.o
LD sound/soc/tegra/built-in.o
CC sound/soc/fsl/imx-audmux.o
LD sound/soc/txx9/built-in.o
CC sound/soc/fsl/imx-pcm.o
LD sound/soc/ux500/built-in.o
CC sound/soc/fsl/imx-pcm-dma.o
^^^^^^^^^^^^^^^^^^^^^^^^^^^
LD sound/soc/codecs/snd-soc-sgtl5000.o
LD sound/soc/codecs/built-in.o
CC sound/soc/fsl/imx-sgtl5000.o
LD sound/soc/snd-soc-core.o
LD sound/soc/fsl/snd-soc-fsl-ssi.o
LD sound/soc/fsl/snd-soc-fsl-utils.o
LD sound/soc/fsl/snd-soc-imx-audmux.o
LD sound/soc/fsl/snd-soc-imx-pcm.o
LD sound/soc/fsl/snd-soc-imx-sgtl5000.o
LD sound/soc/fsl/built-in.o
LD sound/soc/built-in.o


Lothar Waßmann
--
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

http://www.karo-electronics.de | [email protected]
___________________________________________________________

2012-11-23 07:21:30

by Lothar Waßmann

[permalink] [raw]
Subject: Re: [PATCH] ASoC: mxs-saif: export mxs_saif_put_mclk,mxs_saif_get_mclk

Hi,

> On Thu, Nov 22, 2012 at 01:31:09PM +0100, Lothar Waßmann wrote:
> >
> > Signed-off-by: Lothar Waßmann <[email protected]>
>
> Why?
>
I thought that was obvious... To be able to compile the mxs sound
driver as module.


Lothar Waßmann
--
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

http://www.karo-electronics.de | [email protected]
___________________________________________________________

2012-11-23 08:13:15

by Mark Brown

[permalink] [raw]
Subject: Re: [BUGFIX PATCH] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm

On Fri, Nov 23, 2012 at 07:59:56AM +0100, Lothar Wa?mann wrote:
> Mark Brown writes:

> > What is the actual bug here? This fix doesn't look obviously right, and
> > if we do need to move to -objs for some reason then the block ought to
> > be in the -objs section of the Makefile.

> As I mentioned in the part of my email that you didn't quote, if the
> sound driver is being compiled as module, the files imx-pcm-fiq.c or
> imx-pcm-dma.c which should be compiled as part of imx-pcm.o will not
> be touched by the compiler:

That's more detailed than your previous mail but you're still only
describing the symptom, not the what the actual error is or how it's
fixed...


Attachments:
(No filename) (673.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-11-23 09:12:27

by Lothar Waßmann

[permalink] [raw]
Subject: [PATCH v2] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm

Due to a broken make rule, sound/soc/fsl/imx-pcm-dma.c or
sound/soc/fsl/imx-pcm-fiq.c (whatever is selected via Kconfig) will
not be compiled into imx-pcm.o when building as module, i.e.:
CONFIG_SND_SOC_IMX_PCM=m
CONFIG_SND_SOC_IMX_PCM_DMA=m
resulting in a non-functional sound driver.

This gives the error messages:
| 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
when loading the driver instead of what's to be expected:
| imx-sgtl5000 sound.1: sgtl5000 <-> 63fcc000.ssi mapping ok

Signed-off-by: Lothar Waßmann <[email protected]>
---
sound/soc/fsl/Makefile | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile
index 515ba66..afd3479 100644
--- a/sound/soc/fsl/Makefile
+++ b/sound/soc/fsl/Makefile
@@ -30,14 +30,18 @@ obj-$(CONFIG_SND_MPC52xx_SOC_EFIKA) += efika-audio-fabric.o
# i.MX Platform Support
snd-soc-imx-ssi-objs := imx-ssi.o
snd-soc-imx-audmux-objs := imx-audmux.o
+snd-soc-imx-pcm-objs := imx-pcm.o
+ifneq ($(CONFIG_SND_SOC_IMX_PCM_FIQ),)
+ snd-soc-imx-pcm-objs += imx-pcm-fiq.o
+endif
+ifneq ($(CONFIG_SND_SOC_IMX_PCM_DMA),)
+ snd-soc-imx-pcm-objs += imx-pcm-dma.o
+endif

obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o
obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o

obj-$(CONFIG_SND_SOC_IMX_PCM) += snd-soc-imx-pcm.o
-snd-soc-imx-pcm-y := imx-pcm.o
-snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += imx-pcm-fiq.o
-snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_DMA) += imx-pcm-dma.o

# i.MX Machine Support
snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o
--
1.7.2.5

2012-11-23 10:08:57

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v2] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm

On Fri, Nov 23, 2012 at 10:12:13AM +0100, Lothar Wa?mann wrote:
> Due to a broken make rule, sound/soc/fsl/imx-pcm-dma.c or
> sound/soc/fsl/imx-pcm-fiq.c (whatever is selected via Kconfig) will
> not be compiled into imx-pcm.o when building as module, i.e.:

What I've been trying to do is get you to tell me what the problem is
with the Makefile rule, it's really not clear to me what the issue is or
why your change is better. I can see the practical results but nothing
about how they came to be which makes it very hard to tell if this is a
good fix.

This is a common issue with stuff you send, there's lots of analysis
missing so it's hard to understand the thought process behind the
change.


Attachments:
(No filename) (700.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-11-23 10:21:52

by Lothar Waßmann

[permalink] [raw]
Subject: Re: [PATCH v2] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm

Hi,

Mark Brown writes:
> On Fri, Nov 23, 2012 at 10:12:13AM +0100, Lothar Waßmann wrote:
> > Due to a broken make rule, sound/soc/fsl/imx-pcm-dma.c or
> > sound/soc/fsl/imx-pcm-fiq.c (whatever is selected via Kconfig) will
> > not be compiled into imx-pcm.o when building as module, i.e.:
>
> What I've been trying to do is get you to tell me what the problem is
> with the Makefile rule, it's really not clear to me what the issue is or
> why your change is better. I can see the practical results but nothing
> about how they came to be which makes it very hard to tell if this is a
> good fix.
>
I already included the actual error messages I got when loading the
sound module.
I also mentioned, that in case of module build some source files
aren't being compiled with those rules. What else do you expect?


Lothar Waßmann
--
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

http://www.karo-electronics.de | [email protected]
___________________________________________________________

2012-11-23 11:48:06

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v2] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm

On Fri, Nov 23, 2012 at 11:21:42AM +0100, Lothar Wa?mann wrote:

> I already included the actual error messages I got when loading the
> sound module.
> I also mentioned, that in case of module build some source files
> aren't being compiled with those rules. What else do you expect?

The why part of things - what is the reason there was a problem and how
does your change address it? What is it that you believe your patch
does to address the problem?


Attachments:
(No filename) (456.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-11-23 14:40:55

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] ASoC: imx: add MODULE_LICENSE("GPL")

On Thu, Nov 22, 2012 at 01:31:07PM +0100, Lothar Wa?mann wrote:
> also set MODULE_AUTHOR and MODULE_DESCRIPTION

Applied, thanks. But as ever please do write better changelogs, for
example "Add MODULE_ information" or something as the subject.


Attachments:
(No filename) (245.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-11-23 14:42:20

by Mark Brown

[permalink] [raw]
Subject: Re: [BUGFIX PATCH] ASoC: imx-sgtl5000: prevent module from being unloaded when in use

On Thu, Nov 22, 2012 at 01:31:08PM +0100, Lothar Wa?mann wrote:
> set the 'onwer' field of the registered snd_soc_card object to prevent
> removal of the module when its resources are in use.

Applied, thanks.


Attachments:
(No filename) (210.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-11-23 14:46:07

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] ASoC: mxs-saif: export mxs_saif_put_mclk,mxs_saif_get_mclk

On Fri, Nov 23, 2012 at 08:21:22AM +0100, Lothar Wa?mann wrote:
> > On Thu, Nov 22, 2012 at 01:31:09PM +0100, Lothar Wa?mann wrote:

> > Why?

> I thought that was obvious... To be able to compile the mxs sound
> driver as module.

Do you want to add new users of these functions, or are there existing
users which currently fail to link when built as modules?


Attachments:
(No filename) (361.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-11-26 08:50:07

by Lothar Waßmann

[permalink] [raw]
Subject: Re: [PATCH] ASoC: mxs-saif: export mxs_saif_put_mclk,mxs_saif_get_mclk

Hi,

Mark Brown writes:
> On Fri, Nov 23, 2012 at 08:21:22AM +0100, Lothar Waßmann wrote:
> > > On Thu, Nov 22, 2012 at 01:31:09PM +0100, Lothar Waßmann wrote:
>
> > > Why?
>
> > I thought that was obvious... To be able to compile the mxs sound
> > driver as module.
>
> Do you want to add new users of these functions, or are there existing
> users which currently fail to link when built as modules?
>
The existing MXS sound driver fails to build as module
(CONFIG_SND_SOC_MXS_SGTL5000=m) without this patch.


Lothar Waßmann
--
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

http://www.karo-electronics.de | [email protected]
___________________________________________________________

2012-11-26 08:50:54

by Lothar Waßmann

[permalink] [raw]
Subject: [PATCH v3] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm

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 <[email protected]>
---
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

2012-11-27 19:36:55

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v2] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm

On Fri, Nov 23, 2012 at 10:12:13AM +0100, Lothar Wa?mann wrote:
> Due to a broken make rule, sound/soc/fsl/imx-pcm-dma.c or
> sound/soc/fsl/imx-pcm-fiq.c (whatever is selected via Kconfig) will
> not be compiled into imx-pcm.o when building as module, i.e.:
> CONFIG_SND_SOC_IMX_PCM=m
> CONFIG_SND_SOC_IMX_PCM_DMA=m
> resulting in a non-functional sound driver.

Applied, thanks.


Attachments:
(No filename) (380.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-11-27 19:37:28

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v2] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm

On Fri, Nov 23, 2012 at 10:12:13AM +0100, Lothar Wa?mann wrote:
> Due to a broken make rule, sound/soc/fsl/imx-pcm-dma.c or
> sound/soc/fsl/imx-pcm-fiq.c (whatever is selected via Kconfig) will
> not be compiled into imx-pcm.o when building as module, i.e.:
> CONFIG_SND_SOC_IMX_PCM=m
> CONFIG_SND_SOC_IMX_PCM_DMA=m
> resulting in a non-functional sound driver.

Sorry, replied to the wrong version here - I did apply v3.


Attachments:
(No filename) (422.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments