Skip to content

Commit 554e988

Browse files
committed
dts : add require changes for MTL
1. Add LOG_MODULE_REGISTER to avoid build error 2. Modify the check of md->state in dts_codec_set_configuration() * md->state is set in IPC3, not in IPC4. Need to add macro CONFIG_IPC_MAJOR_3 to avoid setting configuration fail. 3. Add more error logs in dts_codec_set_configuration() to identify potential problem. 4. Update DTS version to V1.1.3 in header file * MTL support is added in V1.1.3 Co-developed-by: Mac Chiang <mac.chiang@intel.com> Signed-off-by: Mac Chiang <mac.chiang@intel.com> Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
1 parent 368fd6e commit 554e988

4 files changed

Lines changed: 26 additions & 8 deletions

File tree

src/audio/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ check_optimization(fma -mfma -ftree-vectorize -DOPS_FMA)
169169
check_optimization(hifi2ep -mhifi2ep "" -DOPS_HIFI2EP)
170170
check_optimization(hifi3 -mhifi3 "" -DOPS_HIFI3)
171171

172-
set(sof_audio_modules mixer volume src asrc eq-fir eq-iir dcblock crossover tdfb drc multiband_drc mfcc mux)
172+
set(sof_audio_modules mixer volume src asrc eq-fir eq-iir dcblock crossover
173+
tdfb drc multiband_drc mfcc mux dts)
173174

174175
# sources for each module
175176
if(CONFIG_IPC_MAJOR_3)
@@ -190,6 +191,7 @@ set(drc_sources drc/drc.c drc/drc_generic.c drc/drc_math_generic.c)
190191
set(multiband_drc_sources multiband_drc/multiband_drc_generic.c crossover/crossover.c crossover/crossover_generic.c drc/drc.c drc/drc_generic.c drc/drc_math_generic.c multiband_drc/multiband_drc.c )
191192
set(mfcc_sources mfcc/mfcc.c mfcc/mfcc_setup.c mfcc/mfcc_common.c mfcc/mfcc_generic.c mfcc/mfcc_hifi4.c mfcc/mfcc_hifi3.c)
192193
set(mux_sources mux/mux.c mux/mux_generic.c)
194+
set(dts_sources module_adapter/module/dts/dts.c)
193195

194196
foreach(audio_module ${sof_audio_modules})
195197
# first compile with no optimizations

src/audio/module_adapter/module/dts/dts.c

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include <sof/audio/dts/DtsSofInterface.h>
1010

1111

12+
LOG_MODULE_REGISTER(dts, CONFIG_SOF_LOG_LEVEL);
13+
1214
/* d95fc34f-370f-4ac7-bc86-bfdc5be241e6 */
1315
DECLARE_SOF_RT_UUID("dts_codec", dts_uuid, 0xd95fc34f, 0x370f, 0x4ac7,
1416
0xbc, 0x86, 0xbf, 0xdc, 0x5b, 0xe2, 0x41, 0xe6);
@@ -425,13 +427,25 @@ dts_codec_set_configuration(struct processing_module *mod, uint32_t config_id,
425427

426428
ret = module_set_configuration(mod, config_id, pos, data_offset_size, fragment,
427429
fragment_size, response, response_size);
428-
if (ret < 0)
430+
if (ret < 0) {
431+
comp_err(dev, "dts_codec_set_configuration(): error %x from module_set_configuration()",
432+
ret);
429433
return ret;
434+
}
435+
436+
/* return if more fragments are expected */
437+
if (pos != MODULE_CFG_FRAGMENT_LAST && pos != MODULE_CFG_FRAGMENT_SINGLE) {
438+
comp_err(dev, "dts_codec_set_configuration(): pos %d error", pos);
439+
return 0;
440+
}
430441

431-
/* return if more fragments are expected or if the module is not prepared */
432-
if ((pos != MODULE_CFG_FRAGMENT_LAST && pos != MODULE_CFG_FRAGMENT_SINGLE) ||
433-
md->state < MODULE_INITIALIZED)
442+
#if CONFIG_IPC_MAJOR_3
443+
// return if the module is not prepared
444+
if (md->state < MODULE_INITIALIZED) {
445+
comp_err(dev, "dts_codec_set_configuration(): state %d error", md->state);
434446
return 0;
447+
}
448+
#endif
435449

436450
/* whole configuration received, apply it now */
437451
ret = dts_codec_apply_config(mod);

src/include/sof/audio/component.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,8 @@ void sys_comp_module_src_interface_init(void);
728728
void sys_comp_module_tdfb_interface_init(void);
729729
void sys_comp_module_volume_interface_init(void);
730730

731+
void sys_comp_module_dts_interface_init(void);
732+
731733
#elif CONFIG_LIBRARY
732734
/* In case of shared libs components are initialised in dlopen */
733735
#define DECLARE_MODULE(init) __attribute__((constructor)) \

src/include/sof/audio/dts/DtsSofInterfaceVersion.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
#define DTS_SOF_INTERFACE_PRODUCT_NAME "DtsSofInterface"
1010
#define DTS_SOF_INTERFACE_PRODUCT_VERSION_MAJOR 1
11-
#define DTS_SOF_INTERFACE_PRODUCT_VERSION_MINOR 0
12-
#define DTS_SOF_INTERFACE_PRODUCT_VERSION_PATCH 7
11+
#define DTS_SOF_INTERFACE_PRODUCT_VERSION_MINOR 1
12+
#define DTS_SOF_INTERFACE_PRODUCT_VERSION_PATCH 3
1313
#define DTS_SOF_INTERFACE_PRODUCT_VERSION_BUILD 0
14-
#define DTS_SOF_INTERFACE_PRODUCT_VERSION_EXTRA "Dev"
14+
#define DTS_SOF_INTERFACE_PRODUCT_VERSION_EXTRA "RC2"
1515

1616
#if defined(__cplusplus)
1717
extern "C" {

0 commit comments

Comments
 (0)