-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addition of SRC Lite module, which only supports a subset of conversions supported by the SRC module. 48 -> 16kHz 44.1 -> 16 kHz 32 -> 16 kHz 44.1 -> 48 Signed-off-by: Fabiola Kwasowiec <[email protected]>
- Loading branch information
Showing
9 changed files
with
243 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* SPDX-License-Identifier: BSD-3-Clause | ||
* | ||
* Copyright(c) 2022 Intel Corporation. All rights reserved. | ||
* | ||
*/ | ||
|
||
#ifndef __SOF_AUDIO_COEFFICIENTS_SRC_SRC_IPC4_INT32_DEFINE_H__ | ||
#define __SOF_AUDIO_COEFFICIENTS_SRC_SRC_IPC4_INT32_DEFINE_H__ | ||
|
||
/* SRC constants */ | ||
#define MAX_FIR_DELAY_SIZE 730 | ||
#define MAX_OUT_DELAY_SIZE 900 | ||
#define MAX_BLK_IN 80 | ||
#define MAX_BLK_OUT 40 | ||
#define NUM_IN_FS 16 | ||
#define NUM_OUT_FS 10 | ||
#define STAGE1_TIMES_MAX 32 | ||
#define STAGE2_TIMES_MAX 32 | ||
#define STAGE_BUF_SIZE 672 | ||
#define NUM_ALL_COEFFICIENTS 69224 | ||
|
||
#endif /* __SOF_AUDIO_COEFFICIENTS_SRC_SRC_IPC4_INT32_DEFINE_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* SPDX-License-Identifier: BSD-3-Clause | ||
* | ||
* Copyright(c) 2022 Intel Corporation. All rights reserved. | ||
* | ||
*/ | ||
|
||
/** \cond GENERATED_BY_TOOLS_TUNE_SRC */ | ||
|
||
#ifndef __SOF_AUDIO_COEFFICIENTS_SRC_src_IPC4_INT32_TABLE_H__ | ||
#define __SOF_AUDIO_COEFFICIENTS_SRC_src_IPC4_INT32_TABLE_H__ | ||
|
||
/* SRC conversions */ | ||
#include "src_ipc4_int32_1_2_4535_5000.h" | ||
#include "src_ipc4_int32_10_21_3455_5000.h" | ||
#include "src_ipc4_int32_1_3_4535_5000.h" | ||
#include "src_ipc4_int32_3_2_4535_5000.h" | ||
#include "src_ipc4_int32_8_7_4535_5000.h" | ||
#include "src_ipc4_int32_16_21_4535_5000.h" | ||
#include "src_ipc4_int32_20_21_4167_5000.h" | ||
#include "../src.h" | ||
#include <stdint.h> | ||
|
||
/* SRC table */ | ||
int32_t src_fir_one = 1073741824; | ||
struct src_stage src_int32_1_1_0_0 = { 0, 0, 1, 1, 1, 1, 1, 0, -1, &src_fir_one }; | ||
struct src_stage src_int32_0_0_0_0 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, &src_fir_one }; | ||
int src_in_fs[3] = { 32000, 44100, 48000}; | ||
int src_out_fs[2] = {16000, 48000}; | ||
|
||
|
||
struct src_stage *src_table1[2][3] = { | ||
{ &src_int32_1_2_4535_5000, &src_int32_10_21_3455_5000, | ||
&src_int32_1_3_4535_5000 }, | ||
{ &src_int32_3_2_4535_5000, &src_int32_8_7_4535_5000, &src_int32_1_1_0_0 } | ||
}; | ||
|
||
struct src_stage *src_table2[2][3] = { | ||
{ &src_int32_1_1_0_0, &src_int32_16_21_4535_5000, &src_int32_1_1_0_0 }, | ||
{ &src_int32_1_1_0_0, &src_int32_20_21_4167_5000, &src_int32_1_1_0_0 } | ||
}; | ||
|
||
#endif /* __SOF_AUDIO_COEFFICIENTS_SRC_src_IPC4_INT32_TABLE_H__ */ | ||
|
||
/** \endcond */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
// | ||
// Copyright(c) 2017 Intel Corporation. All rights reserved. | ||
// | ||
// Author: Seppo Ingalsuo <[email protected]> | ||
// Liam Girdwood <[email protected]> | ||
// Keyon Jie <[email protected]> | ||
|
||
#include <sof/common.h> | ||
#include <sof/audio/buffer.h> | ||
#include <sof/audio/component.h> | ||
#include <sof/audio/pipeline.h> | ||
#include <sof/audio/audio_stream.h> | ||
#include <sof/audio/ipc-config.h> | ||
#include <sof/audio/module_adapter/module/generic.h> | ||
#include <sof/audio/sink_api.h> | ||
#include <sof/audio/source_api.h> | ||
#include <sof/audio/sink_source_utils.h> | ||
#include <rtos/panic.h> | ||
#include <sof/ipc/msg.h> | ||
#include <rtos/alloc.h> | ||
#include <rtos/init.h> | ||
#include <sof/lib/memory.h> | ||
#include <sof/lib/uuid.h> | ||
#include <sof/list.h> | ||
#include <sof/math/numbers.h> | ||
#include <sof/platform.h> | ||
#include <rtos/string.h> | ||
#include <sof/ut.h> | ||
#include <sof/trace/trace.h> | ||
#include <ipc/control.h> | ||
#include <ipc/stream.h> | ||
#include <ipc/topology.h> | ||
#include <ipc4/base-config.h> | ||
#include <user/trace.h> | ||
#include <errno.h> | ||
#include <stddef.h> | ||
#include <stdint.h> | ||
#include <limits.h> | ||
|
||
#include "src.h" | ||
#include "src_config.h" | ||
|
||
#define CONFIG_COMP_SRC_LITE 1 | ||
//#include "coef/src_lite_ipc4_int32_define.h" | ||
//#include "coef/src_lite_ipc4_int32_table.h" | ||
|
||
|
||
/* The FIR maximum lengths are per channel so need to multiply them */ | ||
//#define MAX_FIR_DELAY_SIZE_XNCH (PLATFORM_MAX_CHANNELS * MAX_FIR_DELAY_SIZE) | ||
//#define MAX_OUT_DELAY_SIZE_XNCH (PLATFORM_MAX_CHANNELS * MAX_OUT_DELAY_SIZE) | ||
|
||
LOG_MODULE_REGISTER(src_lite, CONFIG_SOF_LOG_LEVEL); | ||
|
||
static const struct module_interface src_lite_interface = { | ||
.init = src_init, | ||
.prepare = src_prepare, | ||
.process = src_process, | ||
.is_ready_to_process = src_is_ready_to_process, | ||
.set_configuration = src_set_config, | ||
.get_configuration = src_get_config, | ||
.reset = src_reset, | ||
.free = src_free, | ||
}; | ||
|
||
DECLARE_SOF_RT_UUID("src_lite", src_lite_uuid, 0x33441051, 0x44CD, 0x466A, | ||
0x83, 0xA3, 0x17, 0x84, 0x78, 0x70, 0x8A, 0xEA); | ||
|
||
DECLARE_TR_CTX(src_lite_tr, SOF_UUID(src_lite_uuid), LOG_LEVEL_INFO); | ||
|
||
DECLARE_MODULE_ADAPTER(src_lite_interface, src_lite_uuid, src_lite_tr); | ||
SOF_MODULE_INIT(src_lite, sys_comp_module_src_lite_interface_init); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters