ASoC: SOF: build compression interface into snd_sof.ko
PATCH 1/1 ASoC: SOF: build compression interface into snd_sof.ko
From: Arnd Bergmann <[email protected]>
With CONFIG_SND_SOC_SOF_COMPRESS=m, the compression code is not built into a the main SOF driver when that is built-in:
x86_64-linux-ld: sound/soc/sof/ipc.o: in function `ipc_stream_message':
ipc.c:(.text+0x5a2): undefined reference to `snd_sof_compr_fragment_elapsed'
x86_64-linux-ld: sound/soc/sof/topology.o: in function `sof_dai_load':
topology.c:(.text+0x32d1): undefined reference to `snd_sof_compr_init_elapsed_work'
x86_64-linux-ld: topology.c:(.text+0x32e1): undefined reference to `snd_sof_compr_init_elapsed_work'
Make this a 'bool' symbol so it just decides whether the code gets built at all.
--- sound/soc/sof/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/Kconfig +1 -1
@@ -47,7 +47,7 @@ config SND_SOC_SOF_OF Say Y if you need this option. If unsure select "N". config SND_SOC_SOF_COMPRESS - tristate + bool select SND_SOC_COMPRESS config SND_SOC_SOF_DEBUG_PROBES
Signature · 1 line
2.29.2
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
With
CONFIG_SND_SOC_SOF_COMPRESS=m, the compression code is not built into a the main SOF driver when that is built-in:x86_64-linux-ld:
sound/soc/sof/ipc.o: in function `ipc_stream_message':
ipc.c:(.text+0x5a2): undefined reference to `snd_sof_compr_fragment_elapsed'
x86_64-linux-ld:sound/soc/sof/topology.o: in function `sof_dai_load':
topology.c:(.text+0x32d1): undefined reference to `snd_sof_compr_init_elapsed_work'
x86_64-linux-ld: topology.c:(.text+0x32e1): undefined reference to `snd_sof_compr_init_elapsed_work'
Quoted 5 lines
Make this a 'bool' symbol so it just decides whether the code gets built at all.
Fixes 858f7a5c45ca ("ASoC: SOF: Introduce fragment elapsed notification API")Signed-off-by Arnd Bergmann <[email protected]>
It's Monday morning and my memory is still foggy but I think we fixed this problem with https://github.com/thesofproject/linux/pull/3180,
where we changed the Kconfigs for i.MX. We haven't sent this update upstream for some reason.
Arnd, can you share the configuration that breaks with the existing upstream code, I can check if the problem still exists.
Thanks!
Quoted 18 lines · Pierre-Louis Bossart
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
With
CONFIG_SND_SOC_SOF_COMPRESS=m, the compression code is not built into a the main SOF driver when that is built-in:x86_64-linux-ld:
sound/soc/sof/ipc.o: in function `ipc_stream_message':
ipc.c:(.text+0x5a2): undefined reference to `snd_sof_compr_fragment_elapsed'
x86_64-linux-ld:sound/soc/sof/topology.o: in function `sof_dai_load':
topology.c:(.text+0x32d1): undefined reference to `snd_sof_compr_init_elapsed_work'
x86_64-linux-ld: topology.c:(.text+0x32e1): undefined reference to `snd_sof_compr_init_elapsed_work'Quoted 5 lines
Make this a 'bool' symbol so it just decides whether the code gets built at all.
Fixes 858f7a5c45ca ("ASoC: SOF: Introduce fragment elapsed notification API")Signed-off-by Arnd Bergmann <[email protected]>
Quoted 7 lines
It's Monday morning and my memory is still foggy but I think we fixed
this problem with https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fthesofproject%2Flinux%2Fpull%2F3180&data=04%7C01%7Cdaniel.baluta%40nxp.com%7C25ac869cfd1040f1be1708d9a2bd3460%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637719755777370422%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=E4K2DPkpLX2SgVJ1K99Qs3uz7l7mS96gIzYlJw9akbg%3D&reserved=0,
where we changed the Kconfigs for i.MX. We haven't sent this update
upstream for some reason.Arnd, can you share the configuration that breaks with the existing upstream code, I can check if the problem still exists.
Maybe someone forgot :) to send https://github.com/thesofproject/linux/pull/3180/commits/7122edc88d13db8ba835bdb20f7444ae535f9ffa upstream.
I think that's me.
Arnd can you run your scripts with https://github.com/thesofproject/linux/pull/3180/commits/7122edc88d13db8ba835bdb20f7444ae535f9ffa. I also attached the patch
if it's easier to apply.
From 8393b756c476a513fc69016d701f22899724fb73 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <[email protected]>
Date: Mon, 27 Sep 2021 13:54:38 -0500
Subject: [PATCH] ASoC: SOF: i.MX: simplify Kconfig
Follow the Intel example and simplify the Kconfig
a) start from the end-product for 'select' chains
b) use 'depends on' to filter out configurations.
c) use snd-sof-of as a common module without any 'select'
--- sound/soc/sof/Kconfig | 4 +++- sound/soc/sof/Makefile | 2 +- sound/soc/sof/imx/Kconfig | 46 +++++++++++---------------------------- 3 files changed, 17 insertions(+), 35 deletions(-)
sound/soc/sof/Kconfig +3 -1
@@ -40,12 +40,14 @@ config SND_SOC_SOF_ACPI_DEV config SND_SOC_SOF_OF tristate "SOF OF enumeration support" depends on OF || COMPILE_TEST - select SND_SOC_SOF help This adds support for Device Tree enumeration. This option is required to enable i.MX8 devices. Say Y if you need this option. If unsure select "N". +config SND_SOC_SOF_OF_DEV + tristate + config SND_SOC_SOF_COMPRESS tristate select SND_SOC_COMPRESS
sound/soc/sof/Makefile +1 -1
@@ -17,7 +17,7 @@ obj-$(CONFIG_SND_SOC_SOF_NOCODEC) += snd-sof-nocodec.o obj-$(CONFIG_SND_SOC_SOF_ACPI_DEV) += snd-sof-acpi.o -obj-$(CONFIG_SND_SOC_SOF_OF) += snd-sof-of.o +obj-$(CONFIG_SND_SOC_SOF_OF_DEV) += snd-sof-of.o obj-$(CONFIG_SND_SOC_SOF_PCI_DEV) += snd-sof-pci.o obj-$(CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL) += intel/
sound/soc/sof/imx/Kconfig +13 -33
66 lines not on this page · raw message
Signature · 1 line
2.27.0
Quoted 6 lines · Daniel Baluta
Quoted 5 lines · Pierre-Louis Bossart
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Fixes 858f7a5c45ca ("ASoC: SOF: Introduce fragment elapsed notification API")Signed-off-by Arnd Bergmann <[email protected]>
Quoted 7 lines
Quoted 7 lines
It's Monday morning and my memory is still foggy but I think we fixed
this problem with https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fthesofproject%2Flinux%2Fpull%2F3180&data=04%7C01%7Cdaniel.baluta%40nxp.com%7C25ac869cfd1040f1be1708d9a2bd3460%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637719755777370422%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=E4K2DPkpLX2SgVJ1K99Qs3uz7l7mS96gIzYlJw9akbg%3D&reserved=0,
where we changed the Kconfigs for i.MX. We haven't sent this update
upstream for some reason.Arnd, can you share the configuration that breaks with the existing upstream code, I can check if the problem still exists.
Quoted 9 lines
Maybe someone forgot :) to send
https://github.com/thesofproject/linux/pull/3180/commits/7122edc88d13db8ba835bdb20f7444ae535f9ffa
upstream.I think that's me.
Arnd can you run your scripts with
https://github.com/thesofproject/linux/pull/3180/commits/7122edc88d13db8ba835bdb20f7444ae535f9ffa.
I also attached the patch
I added that to my randconfig tree now. I did a cherry-pick of that commit, I tried a 'git merge'
first, but that pulled in a lot of other stuff that conflicts with linux-next.
Your patch does not fix the link error though, I'm fairly sure we need my one-liner
on top still. In this case, SND_SOC_SOF=y gets selected by SND_SOC_SOF_INTEL_COMMON=y, while SND_SOC_SOF_COMPRESS=m gets selected by SND_SOC_SOF_IMX_COMMON=m, and then ignored because the Makefile only cares about =y objects built into the common module.
Arnd
Pierre-Louis Bossart
Tested-byQuoted 12 lines · Arnd Bergmann
Quoted 11 lines · Daniel Baluta
Quoted 10 lines · Pierre-Louis Bossart
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Fixes 858f7a5c45ca ("ASoC: SOF: Introduce fragment elapsed notification API")Signed-off-by Arnd Bergmann <[email protected]>It's Monday morning and my memory is still foggy but I think we fixed
this problem with https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fthesofproject%2Flinux%2Fpull%2F3180&data=04%7C01%7Cdaniel.baluta%40nxp.com%7C25ac869cfd1040f1be1708d9a2bd3460%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637719755777370422%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=E4K2DPkpLX2SgVJ1K99Qs3uz7l7mS96gIzYlJw9akbg%3D&reserved=0,
where we changed the Kconfigs for i.MX. We haven't sent this update
upstream for some reason.
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Arnd, can you share the configuration that breaks with the existing upstream code, I can check if the problem still exists.
Ack, the problem still exists and is fixed by this patch
On a related note, with this randconfig we have a separate problem on an AMD patch on the SOF tree
ERROR: modpost: "snd_amd_acp_find_config" [sound/soc/amd/snd-acp-config] is a static EXPORT_SYMBOL
That wasn't detected earlier, any idea what Kconfig option I need to enable to filter this out?
Quoted 11 lines · Pierre-Louis Bossart
Quoted 1 line · Arnd Bergmann
On Mon, Nov 8, 2021 at 3:13 PM Daniel Baluta <[email protected]> wrote:
On a related note, with this randconfig we have a separate problem on an AMD patch on the SOF tree
ERROR: modpost: "
snd_amd_acp_find_config" [sound/soc/amd/snd-acp-config] is a staticEXPORT_SYMBOLThat wasn't detected earlier, any idea what
Kconfigoption I need to enable to filter this out?
I don't see that symbol on linux-next at all, so this must be a bug that is specific to the
current SOF tree. The message tells you that snd_amd_acp_find_config should not be exported at all since it's static, or it should not be marked static because it
is used by other modules. IOW having a symbol that is both static and exported means it's not usable from built-in drivers.
Arnd
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
With
CONFIG_SND_SOC_SOF_COMPRESS=m, the compression code is not built into a the main SOF driver when that is built-in:x86_64-linux-ld:
sound/soc/sof/ipc.o: in function `ipc_stream_message':
ipc.c:(.text+0x5a2): undefined reference to `snd_sof_compr_fragment_elapsed'
x86_64-linux-ld:sound/soc/sof/topology.o: in function `sof_dai_load':
topology.c:(.text+0x32d1): undefined reference to `snd_sof_compr_init_elapsed_work'
x86_64-linux-ld: topology.c:(.text+0x32e1): undefined reference to `snd_sof_compr_init_elapsed_work'
Quoted 5 lines
Make this a 'bool' symbol so it just decides whether the code gets built at all.
Fixes 858f7a5c45ca ("ASoC: SOF: Introduce fragment elapsed notification API")Signed-off-by Arnd Bergmann <[email protected]>
Indeed this is a bug and must be fixed. Thanks Arnd!
Quoted 17 lines
--- sound/soc/sof/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/soc/sof/Kconfig +1
-1@@ -47,7 +47,7 @@ config SND_SOC_SOF_OF Say Y if you need this option. If unsure select "N". config SND_SOC_SOF_COMPRESS - tristate + bool select SND_SOC_COMPRESS config SND_SOC_SOF_DEBUG_PROBES
Mark Brown
maintainerQuoted 5 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
With
CONFIG_SND_SOC_SOF_COMPRESS=m, the compression code is not built into a the main SOF driver when that is built-in:
Quoted 7 lines
x86_64-linux-ld:
sound/soc/sof/ipc.o: in function `ipc_stream_message':
ipc.c:(.text+0x5a2): undefined reference to `snd_sof_compr_fragment_elapsed'
x86_64-linux-ld:sound/soc/sof/topology.o: in function `sof_dai_load':
topology.c:(.text+0x32d1): undefined reference to `snd_sof_compr_init_elapsed_work'
x86_64-linux-ld: topology.c:(.text+0x32e1): undefined reference to `snd_sof_compr_init_elapsed_work'[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-linus
Thanks!
[1/1] ASoC: SOF: build compression interface into snd_sof.ko
commit: 1218f06cb3c6e2c51699998bc17c0d9a41ab37a6
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark