-
Notifications
You must be signed in to change notification settings - Fork 349
module_adapter : audio : fix DTS support on MTL #8379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9074a05
d0b1e70
f07d601
8bb4a05
04991be
7d5cc30
ac2f487
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| CONFIG_COMP_IIR=y | ||
| CONFIG_COMP_MODULE_ADAPTER=y | ||
| CONFIG_DTS_CODEC=y | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,8 @@ | |
| #include <sof/audio/dts/DtsSofInterface.h> | ||
|
|
||
|
|
||
| LOG_MODULE_REGISTER(dts, CONFIG_SOF_LOG_LEVEL); | ||
|
|
||
| /* d95fc34f-370f-4ac7-bc86-bfdc5be241e6 */ | ||
| DECLARE_SOF_RT_UUID("dts_codec", dts_uuid, 0xd95fc34f, 0x370f, 0x4ac7, | ||
| 0xbc, 0x86, 0xbf, 0xdc, 0x5b, 0xe2, 0x41, 0xe6); | ||
|
|
@@ -425,13 +427,25 @@ dts_codec_set_configuration(struct processing_module *mod, uint32_t config_id, | |
|
|
||
| ret = module_set_configuration(mod, config_id, pos, data_offset_size, fragment, | ||
| fragment_size, response, response_size); | ||
| if (ret < 0) | ||
| if (ret < 0) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, both braces must be in the same commit to avoid breaking bisection
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. Put them in the same commit now. |
||
| comp_err(dev, "dts_codec_set_configuration(): error %x from module_set_configuration()", | ||
| ret); | ||
| return ret; | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this removed in a later commit again? |
||
|
|
||
| /* return if more fragments are expected or if the module is not prepared */ | ||
| if ((pos != MODULE_CFG_FRAGMENT_LAST && pos != MODULE_CFG_FRAGMENT_SINGLE) || | ||
| md->state < MODULE_INITIALIZED) | ||
| /* return if more fragments are expected */ | ||
| if (pos != MODULE_CFG_FRAGMENT_LAST && pos != MODULE_CFG_FRAGMENT_SINGLE) { | ||
| comp_err(dev, "dts_codec_set_configuration(): pos %d error", pos); | ||
| return 0; | ||
| } | ||
cujomalainey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| #if CONFIG_IPC_MAJOR_3 | ||
| // return if the module is not prepared | ||
| if (md->state < MODULE_INITIALIZED) { | ||
| comp_err(dev, "dts_codec_set_configuration(): state %d error", md->state); | ||
| return 0; | ||
| } | ||
cujomalainey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #endif | ||
|
|
||
| /* whole configuration received, apply it now */ | ||
| ret = dts_codec_apply_config(mod); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -711,10 +711,15 @@ zephyr_library_sources_ifdef(CONFIG_COMP_GOOGLE_HOTWORD_DETECT | |
| zephyr_library_sources_ifdef(CONFIG_DTS_CODEC | ||
| ${SOF_AUDIO_PATH}/module_adapter/module/dts/dts.c | ||
| ) | ||
|
|
||
| zephyr_library_sources_ifdef(CONFIG_DTS_CODEC_STUB | ||
| ${SOF_AUDIO_PATH}/module_adapter/module/dts/dts_stub.c | ||
| ) | ||
| if (CONFIG_DTS_CODEC) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This broke the stub build. Please fix
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@joechengxperi it is the responsibility of the submitter to look at failures, not the reviewers. Ask for help if you don't understand some failures (or worse: if you don't have access to some) https://github.com/thesofproject/sof/actions/runs/6718130608/job/18257259780?pr=8379 The last error messages can be misleading. Always scroll up and look at the first errors first. Parallel builds may require scrolling quite a way up.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. Apologize that I did not notice that build error. |
||
| if (CONFIG_DTS_CODEC_STUB) | ||
| zephyr_library_sources( | ||
| ${SOF_AUDIO_PATH}/module_adapter/module/dts/dts_stub.c | ||
| ) | ||
| else() | ||
| zephyr_library_import(DtsCodec ${SOF_AUDIO_PATH}/module_adapter/lib/release/libdts-sof-interface-i32.a) | ||
| endif() | ||
| endif() | ||
|
|
||
| zephyr_library_sources_ifdef(CONFIG_WAVES_CODEC | ||
| ${SOF_AUDIO_PATH}/module_adapter/module/waves/waves.c | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this may be followed from:
./src/arch/xtensa/configs/override/mt8195_chrome_dts.config:4:CONFIG_DTS_CODEC=y
./src/arch/xtensa/configs/override/renoir_chrome_dts.config:3:CONFIG_DTS_CODEC=y
./src/arch/xtensa/configs/override/mt8186_chrome_dts.config:3:CONFIG_DTS_CODEC=y
my question is: is IIR must follow with DTS codec? they should have no relation from module perspecitve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use EQ IIR + DTS to support customer project. For different platforms, EQ IIR might be default enabled or disabled. So we add it to make sure IIR is enabled. On MTL, IIR is default enabled. I could remove it if you think it's better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the Kconfig can set a dependecy, we could use
dependsin Kconfig to state this relationship between DTS and IIR.@singalsu fyi.