Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1453508 > unrolled thread
| Started by | Kevin Hilman <khilman@baylibre.com> |
|---|---|
| First post | 2016-08-02 01:50 +0200 |
| Last post | 2016-08-09 08:50 +0200 |
| Articles | 7 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] ASoC: simple-card: fix module load "unknown symbol" issue Kevin Hilman <khilman@baylibre.com> - 2016-08-02 01:50 +0200
Re: [PATCH] ASoC: simple-card: fix module load "unknown symbol" issue Kevin Hilman <khilman@baylibre.com> - 2016-08-02 04:50 +0200
Re: [PATCH] ASoC: simple-card-utils: add missing MODULE_xxx() Mark Brown <broonie@kernel.org> - 2016-08-02 20:20 +0200
Re: [PATCH] ASoC: simple-card-utils: add missing MODULE_xxx() Kevin Hilman <khilman@baylibre.com> - 2016-08-02 21:00 +0200
Re: [PATCH] ASoC: simple-card-utils: add missing MODULE_xxx() Mark Brown <broonie@kernel.org> - 2016-08-02 21:50 +0200
Re: [PATCH] ASoC: simple-card: fix module load "unknown symbol" issue Sekhar Nori <nsekhar@ti.com> - 2016-08-08 16:20 +0200
Re: [PATCH] ASoC: simple-card: fix module load "unknown symbol" issue Sekhar Nori <nsekhar@ti.com> - 2016-08-09 08:50 +0200
| From | Kevin Hilman <khilman@baylibre.com> |
|---|---|
| Date | 2016-08-02 01:50 +0200 |
| Subject | [PATCH] ASoC: simple-card: fix module load "unknown symbol" issue |
| Message-ID | <s1v85-4Pg-1@gated-at.bofh.it> |
An ASoC driver using simple-card, when built as a module gets the following error at module load time: [ 23.571873] simple_card_utils: Unknown symbol snd_soc_of_parse_daifmt (err 0) [ 23.712726] simple_card_utils: Unknown symbol snd_soc_of_parse_card_name (err 0) fix this by including simple-card-utils.o symbols in the module build its symols are resolved correctly. Tested on Davinci DA850-EVM using snd_soc_edma, snc_soc_davinci_mcasp, with all of ASoC built as modules. Cc: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com> --- sound/soc/generic/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/generic/Makefile b/sound/soc/generic/Makefile index 45602ca8536e..ff0c55eee4f7 100644 --- a/sound/soc/generic/Makefile +++ b/sound/soc/generic/Makefile @@ -2,4 +2,8 @@ obj-$(CONFIG_SND_SIMPLE_CARD_UTILS) := simple-card-utils.o snd-soc-simple-card-objs := simple-card.o +ifneq ($(CONFIG_SND_SIMPLE_CARD_UTILS),) +snd-soc-simple-card-objs += simple-card-utils.o +endif + obj-$(CONFIG_SND_SIMPLE_CARD) += snd-soc-simple-card.o -- 2.9.0
[toc] | [next] | [standalone]
| From | Kevin Hilman <khilman@baylibre.com> |
|---|---|
| Date | 2016-08-02 04:50 +0200 |
| Message-ID | <s1xWh-6Jw-1@gated-at.bofh.it> |
| In reply to | #1453508 |
On Mon, Aug 1, 2016 at 6:13 PM, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote: > > Hi Kevin > > Thank you for your patch > >> An ASoC driver using simple-card, when built as a module gets the >> following error at module load time: >> >> [ 23.571873] simple_card_utils: Unknown symbol snd_soc_of_parse_daifmt (err 0) >> [ 23.712726] simple_card_utils: Unknown symbol snd_soc_of_parse_card_name (err 0) >> >> fix this by including simple-card-utils.o symbols in the module build >> its symols are resolved correctly. >> >> Tested on Davinci DA850-EVM using snd_soc_edma, snc_soc_davinci_mcasp, >> with all of ASoC built as modules. >> >> Cc: Sekhar Nori <nsekhar@ti.com> >> Signed-off-by: Kevin Hilman <khilman@baylibre.com> >> --- > > Hmm... strange... > > simple-card-utils will be used not only simple-card in the future, > thus it should be build separately. > > And, snd_soc_of_parse_daifmt() and snd_soc_of_parse_card_name() are > already exported on soc-core.c ? > > I tried it as module, but no error for me The error I'm getting is not at build time, but at module load time. The various snd related modules are autoloaded by udev events, but during that time I see this: [ 23.571873] simple_card_utils: Unknown symbol snd_soc_of_parse_daifmt (err 0) [ 23.712726] simple_card_utils: Unknown symbol snd_soc_of_parse_card_name (err 0) and my patch fixes that problem so that the module symbols resolve at load time. Kevin
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-08-02 20:20 +0200 |
| Subject | Re: [PATCH] ASoC: simple-card-utils: add missing MODULE_xxx() |
| Message-ID | <s1Msj-88r-77@gated-at.bofh.it> |
| In reply to | #1453556 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Aug 02, 2016 at 03:22:08AM +0000, Kuninori Morimoto wrote:
> +MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");
> +MODULE_DESCRIPTION("ALSA SoC Simple Card Utils");
> +MODULE_LICENSE("GPL v2");
This lot is what is needed (well, just the MODULE_LICENSE).
> +MODULE_ALIAS("platform:asoc-simple-card-utils");
This is wrong, this isn't a driver but rather a library that's used by
other modules so it shouldn't have an alias. The aliases are there to
let modutils know which module to load for a device that it sees.
[toc] | [prev] | [next] | [standalone]
| From | Kevin Hilman <khilman@baylibre.com> |
|---|---|
| Date | 2016-08-02 21:00 +0200 |
| Subject | Re: [PATCH] ASoC: simple-card-utils: add missing MODULE_xxx() |
| Message-ID | <s1N4Z-8oW-11@gated-at.bofh.it> |
| In reply to | #1453556 |
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> writes: > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > > simple-card-utils might be used as module, but MODULE_xxx() > information was missed. This patch adds it. > Otherwise, we will have below error, and can't use it. > Specil thanks to Kevin. > >> insmod simple-card-utils.ko > simple_card_utils: module license 'unspecified' taints kernel. > Disabling lock debugging due to kernel taint > simple_card_utils: Unknown symbol snd_soc_of_parse_daifmt (err 0) > simple_card_utils: Unknown symbol snd_soc_of_parse_card_name (err 0) > insmod: can't insert 'simple-card-utils.ko': \ > unknown symbol in module, or unknown parameter > > Reported-by: Kevin Hilman <khilman@baylibre.com> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > --- > >>> Kevin > > Thank you for your report. I think this patch can solve your issue. > Can you check this ? Your patch works, but as Mark pointed out, I didn't think that this was the right fix as this isn't a module, but just library. Kevin
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-08-02 21:50 +0200 |
| Subject | Re: [PATCH] ASoC: simple-card-utils: add missing MODULE_xxx() |
| Message-ID | <s1NRn-zm-1@gated-at.bofh.it> |
| In reply to | #1455391 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Aug 02, 2016 at 11:50:48AM -0700, Kevin Hilman wrote: > Your patch works, but as Mark pointed out, I didn't think that this was > the right fix as this isn't a module, but just library. I think building the library as a module is fine, that way we can load it only in situations where it's used, it's just that it should be pulled in by the relevant driver.
[toc] | [prev] | [next] | [standalone]
| From | Sekhar Nori <nsekhar@ti.com> |
|---|---|
| Date | 2016-08-08 16:20 +0200 |
| Message-ID | <s3Tzk-2sm-19@gated-at.bofh.it> |
| In reply to | #1453508 |
On Tuesday 02 August 2016 05:06 AM, Kevin Hilman wrote: > An ASoC driver using simple-card, when built as a module gets the > following error at module load time: > > [ 23.571873] simple_card_utils: Unknown symbol snd_soc_of_parse_daifmt (err 0) > [ 23.712726] simple_card_utils: Unknown symbol snd_soc_of_parse_card_name (err 0) > > fix this by including simple-card-utils.o symbols in the module build > its symols are resolved correctly. > > Tested on Davinci DA850-EVM using snd_soc_edma, snc_soc_davinci_mcasp, > with all of ASoC built as modules. > > Cc: Sekhar Nori <nsekhar@ti.com> > Signed-off-by: Kevin Hilman <khilman@baylibre.com> Tested with audio on DaVinci DA850 EVM. Tested-by: Sekhar Nori <nsekhar@ti.com> Regards, Sekhar
[toc] | [prev] | [next] | [standalone]
| From | Sekhar Nori <nsekhar@ti.com> |
|---|---|
| Date | 2016-08-09 08:50 +0200 |
| Message-ID | <s491n-3ZT-1@gated-at.bofh.it> |
| In reply to | #1457831 |
On Tuesday 09 August 2016 05:56 AM, Kuninori Morimoto wrote:
>
> Hi Sekhar
>
>>> An ASoC driver using simple-card, when built as a module gets the
>>> following error at module load time:
>>>
>>> [ 23.571873] simple_card_utils: Unknown symbol snd_soc_of_parse_daifmt (err 0)
>>> [ 23.712726] simple_card_utils: Unknown symbol snd_soc_of_parse_card_name (err 0)
>>>
>>> fix this by including simple-card-utils.o symbols in the module build
>>> its symols are resolved correctly.
>>>
>>> Tested on Davinci DA850-EVM using snd_soc_edma, snc_soc_davinci_mcasp,
>>> with all of ASoC built as modules.
>>>
>>> Cc: Sekhar Nori <nsekhar@ti.com>
>>> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
>>
>> Tested with audio on DaVinci DA850 EVM.
>>
>> Tested-by: Sekhar Nori <nsekhar@ti.com>
>
> I think this issue was solved by this patch on Mark/fix/simple
>
> 1f85e118c81d15aa9e002604dfb69c823d4aac16
> ("ASoC: simple-card-utils: add missing MODULE_xxx()")
I see it in -next. Thanks!
Regards,
Sekhar
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web