Skip to content

Conversation

@dbaluta
Copy link
Collaborator

@dbaluta dbaluta commented Apr 2, 2021

This commit strips the codec adapter as it is more of a
library/layer for codecs to simplify their interface against rather than a
component in and of itself. This gives each codec its own UUID solving the ID
problem while opening an opertunity to register codecs directly for
future multiplexing capabilities.

Signed-off-by: Curtis Malainey cujomalainey@chromium.org
Signed-off-by: Daniel Baluta daniel.baluta@nxp.com

@dbaluta
Copy link
Collaborator Author

dbaluta commented Apr 2, 2021

This is mostly done, we need to set different UUID for waves/cadences/passthrough codecs and update the topology files. Based on @cujomalainey work!

@dbaluta dbaluta changed the title WIP: move to shimmed codec adapter interface Move to shimmed codec adapter interface Apr 5, 2021
@dbaluta
Copy link
Collaborator Author

dbaluta commented Apr 5, 2021

@cujomalainey @mrajwa @lgirdwood this is ready to be merged.

I have added different UUIDs for Waves / passtrhough and kept the old codec_adapter UUID for Cadence codecs.

@stolx can you please test this with Waves? You need to use the new UUID as explained in the second commit.
@mrajwa @zrombel can you please test this for Cadence? No modification should be needed in the topology files.

Tested this for cadence with mp3 / passthrough and works fine.

@marc-hb
Copy link
Collaborator

marc-hb commented Apr 5, 2021

These Quickbuild errors look relevant for a change:
https://sof-ci.01.org/sof-pr-viewer/#/build/PR3999/build6261205

-- version.cmake starting SOF build at 2021-04-05T10:21:44Z UTC
-- Building git commit with parent(s):
c6fc65889 5aeb29b55 b4ffc21d6 (HEAD -> pr_branch) Merge b4ffc21d65af9cd3daa3bd3d7ca1ad0ab3db96b8 into 5aeb29b5546e43a8303c3386cc1fc0c4673bb380

[ 75%] Building C object CMakeFiles/sof.dir/src/audio/codec_adapter/codec/generic.c.o
/localdisk/tools/xtensa/RG-2017.8-linux/XtensaTools/bin/xt-xcc  -DRELATIVE_FILE=\"src/audio/codec_adapter/codec/generic.c\" -I/quickbuild/workspace1/24733/SOF_FW/src/platform/intel/cavs/include -I/quickbuild/workspace1/24733/SOF_FW/src/arch/xtensa/include -I/quickbuild/workspace1/24733/SOF_FW/src/arch/xtensa/xtos -I/quickbuild/workspace1/24733/SOF_FW/src/platform/tigerlake/include -I/localdisk/tools/xtensa/RG-2017.8-linux/cavs2x_LX6HiFi3_2017_8/xtensa-elf/arch/include -I/localdisk/tools/xtensa/RG-2017.8-linux/cavs2x_LX6HiFi3_2017_8/xtensa-elf/include -I/quickbuild/workspace1/24733/SOF_FW/src/include -I/quickbuild/workspace1/24733/SOF_FW/rimage/src/include -I/quickbuild/workspace1/24733/SOF_FW/build_fw/generated/include  -nostdlib -fno-inline-functions -mlongcalls -O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes -Wpointer-arith -mtext-section-literals -imacros/quickbuild/workspace1/24733/SOF_FW/build_fw/generated/include/autoconfig.h -o CMakeFiles/sof.dir/src/audio/codec_adapter/codec/generic.c.o   -c /quickbuild/workspace1/24733/SOF_FW/src/audio/codec_adapter/codec/generic.c
/quickbuild/workspace1/24733/SOF_FW/src/audio/codec_adapter/codec_adapter.c: In function ‘codec_adapter_new’:
/quickbuild/workspace1/24733/SOF_FW/src/audio/codec_adapter/codec_adapter.c:45: error: ‘comp_codec_adapter’ undeclared (first use in this function)
/quickbuild/workspace1/24733/SOF_FW/src/audio/codec_adapter/codec_adapter.c:45: error: (Each undeclared identifier is reported only once
/quickbuild/workspace1/24733/SOF_FW/src/audio/codec_adapter/codec_adapter.c:45: error: for each function it appears in.)
/quickbuild/workspace1/24733/SOF_FW/src/audio/codec_adapter/codec_adapter.c: In function ‘codec_adapter_trigger’:
/quickbuild/workspace1/24733/SOF_FW/src/audio/codec_adapter/codec_adapter.c:667: error: ‘comp_codec_adapter’ undeclared (first use in this function)
/quickbuild/workspace1/24733/SOF_FW/src/audio/codec_adapter/codec_adapter.c: In function ‘codec_adapter_reset’:
/quickbuild/workspace1/24733/SOF_FW/src/audio/codec_adapter/codec_adapter.c:678: error: ‘comp_codec_adapter’ undeclared (first use in this function)
/quickbuild/workspace1/24733/SOF_FW/src/audio/codec_adapter/codec_adapter.c: In function ‘codec_adapter_free’:
/quickbuild/workspace1/24733/SOF_FW/src/audio/codec_adapter/codec_adapter.c:698: error: ‘comp_codec_adapter’ undeclared (first use in this function)
CMakeFiles/sof.dir/build.make:836: recipe for target 'CMakeFiles/sof.dir/src/audio/codec_adapter/codec_adapter.c.o' failed
make[3]: *** [CMakeFiles/sof.dir/src/audio/codec_adapter/codec_adapter.c.o] Error 2

As usual they may be delayed by days so in case of force-pushes make sure you check the timestamp and SHA1 I recently added to the build and quoted above.

cujomalainey and others added 3 commits April 5, 2021 18:56
In order to act as a stand in layer for codecs going forward we need to
not log using our comp_driver as that will be removed in the future.
Instead we need to log using the context of comp_dev.

This commit also reduces the verbosity of a lot of the traces and
increases a few.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This commit strips the codec adapter as it is more of a
library/layer for codecs to simplify their interface against rather than a
component in and of itself. This gives each codec its own UUID solving the
ID problem while opening an opertunity to register codecs directly for
future multiplexing capabilities.

Old UUID adapter used for codec_adapter is now used for Cadence codecs,
and we add new UUIDs for passthrough and Waves codecs.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Each codec family is now having its own UUID. We keep the old
codec_adapter UUID to be used with Cadence family codecs.

All other codec families (e.g passthrough, waves) needs to use new
uuids.

The topology files will just need to define CA_UID macro.

e.g for waves codec, topology file should contain:

DECLARE_SOF_RT_UUID("Waves codec", waves_codec_uuid, 0xd944281a, 0xafe9,
		0x4695, 0xa0, 0x43, 0xd7, 0xf6, 0x2b, 0x89, 0x53, 0x8e);

define(`CA_UUID', cadence_codec_uuid)

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
@dbaluta
Copy link
Collaborator Author

dbaluta commented Apr 5, 2021

Thanks @marc-hb. Should be fixed now.

@lgirdwood
Copy link
Member

Boot failure on one CML device, other CML boots so a DUT issue.

@lgirdwood lgirdwood merged commit 8530a95 into thesofproject:main Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants