Skip to content

Conversation

@cujomalainey
Copy link
Contributor

This PR is tackling the change of making codecs their own UUID rather than a sub id. Changes will come in gradually, but I wanted to get early feedback. Will add more stakeholders as larger changes come in.

@cujomalainey cujomalainey added codec Issues related to a 3rd party codec HW or driver enhancement New feature or request Post Processing topology Topology issues labels Mar 2, 2021
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see where this is going. So, now we also need to modify codec_adapter_new to accommodate for the 3rd parameter. This is the way we tell the generic codec adapter which specific ops implementation to use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, and we can add another hook into the register routine to register the codec to a codec list which the multiplexer can pull from

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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>
not sure why this was added. There are very few cases where a static
declaration in a header makes sense but this does not appear to be one
of them.

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.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cujomalainey fwiw, I'm working in this area too and so will @ranj063 , lets have a sync up offline so we dont all do the same work.

@cujomalainey
Copy link
Contributor Author

@lgirdwood agreed feel free to put something calendar and I will do my best to make room, mornings are usually the easiest for me though. I'm am stuck debugging this gem of an error though (im dumping pre processor output im so confused)

/home/sof/work/xtensa-cnl-elf/bin/xtensa-cnl-elf-gcc  -DRELATIVE_FILE=\"src/audio/codec_adapter/codec/passthrough.c\" -I/home/sof/work/sof.git/src/platform/intel/cavs/include -I/home/sof/work/sof.git/src/arch/xtensa/include -I/home/sof/work/sof.git/src/arch/xtensa/xtos -I/home/sof/work/sof.git/src/platform/tigerlake/include -I/home/sof/work/sof.git/src/platform/tigerlake/include/arch -I/home/sof/work/sof.git/../xtensa-root/xtensa-cnl-elf/include -I/home/sof/work/sof.git/src/include -I/home/sof/work/sof.git/rimage/src/include -I/home/sof/work/sof.git/build_tgl_gcc/generated/include  -nostdlib -fno-inline-functions -mlongcalls -O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes -Wpointer-arith -mtext-section-literals -imacros/home/sof/work/sof.git/build_tgl_gcc/generated/include/autoconfig.h -o CMakeFiles/sof.dir/src/audio/codec_adapter/codec/passthrough.c.o   -c /home/sof/work/sof.git/src/audio/codec_adapter/codec/passthrough.c
/home/sof/work/xtensa-cnl-elf/bin/xtensa-cnl-elf-gcc  -DRELATIVE_FILE=\"src/lib/agent.c\" -I/home/sof/work/sof.git/src/platform/intel/cavs/include -I/home/sof/work/sof.git/src/arch/xtensa/include -I/home/sof/work/sof.git/src/arch/xtensa/xtos -I/home/sof/work/sof.git/src/platform/tigerlake/include -I/home/sof/work/sof.git/src/platform/tigerlake/include/arch -I/home/sof/work/sof.git/../xtensa-root/xtensa-cnl-elf/include -I/home/sof/work/sof.git/src/include -I/home/sof/work/sof.git/rimage/src/include -I/home/sof/work/sof.git/build_tgl_gcc/generated/include  -nostdlib -fno-inline-functions -mlongcalls -O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes -Wpointer-arith -mtext-section-literals -imacros/home/sof/work/sof.git/build_tgl_gcc/generated/include/autoconfig.h -o CMakeFiles/sof.dir/src/lib/agent.c.o   -c /home/sof/work/sof.git/src/lib/agent.c
[ 77%] Building C object CMakeFiles/sof.dir/src/lib/lib.c.o
/home/sof/work/xtensa-cnl-elf/bin/xtensa-cnl-elf-gcc  -DRELATIVE_FILE=\"src/lib/lib.c\" -I/home/sof/work/sof.git/src/platform/intel/cavs/include -I/home/sof/work/sof.git/src/arch/xtensa/include -I/home/sof/work/sof.git/src/arch/xtensa/xtos -I/home/sof/work/sof.git/src/platform/tigerlake/include -I/home/sof/work/sof.git/src/platform/tigerlake/include/arch -I/home/sof/work/sof.git/../xtensa-root/xtensa-cnl-elf/include -I/home/sof/work/sof.git/src/include -I/home/sof/work/sof.git/rimage/src/include -I/home/sof/work/sof.git/build_tgl_gcc/generated/include  -nostdlib -fno-inline-functions -mlongcalls -O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes -Wpointer-arith -mtext-section-literals -imacros/home/sof/work/sof.git/build_tgl_gcc/generated/include/autoconfig.h -o CMakeFiles/sof.dir/src/lib/lib.c.o   -c /home/sof/work/sof.git/src/lib/lib.c
In file included from /home/sof/work/sof.git/src/audio/codec_adapter/codec/passthrough.c:9:
/home/sof/work/sof.git/src/include/sof/audio/codec_adapter/codec/generic.h:53:27: error: expected ',' or ';' at end of input
   53 | static SHARED_DATA struct comp_driver_info comp_codec_adapter_info = { \
      |                           ^~~~~~~~~~~~~~~~
/home/sof/work/sof.git/src/audio/codec_adapter/codec/passthrough.c:99:1: note: in expansion of macro 'DECLARE_CODEC_ADAPTER'
   99 | DECLARE_CODEC_ADAPTER(passthrough_interface, passthrough_uuid, passthrough_tr)
      | ^~~~~~~~~~~~~~~~~~~~~

@lgirdwood
Copy link
Member

@cujomalainey might be worth running the pre-processor only on that file and see the output if you think it's macro related.

@lgirdwood
Copy link
Member

@cujomalainey thanks, yes, will schedule something next week with @ranj063 too.

@cujomalainey
Copy link
Contributor Author

@cujomalainey might be worth running the pre-processor only on that file and see the output if you think it's macro related.

Yep already doing that. Hopefully will have an answer soon.

@lgirdwood lgirdwood closed this Mar 28, 2021
@lgirdwood lgirdwood deleted the branch thesofproject:master March 28, 2021 13:44
@paulstelian97
Copy link
Collaborator

Please resubmit with "main" as PR base branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codec Issues related to a 3rd party codec HW or driver enhancement New feature or request Post Processing topology Topology issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants