-
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.
Audio: eq_fir: move out eq_fir ipc3 and ipc4 specific code
Move out ipc3 and ipc4 specific code to corresponding source file. Also, move some common functions to header file. Signed-off-by: Baofeng Tian <[email protected]>
- Loading branch information
Showing
9 changed files
with
213 additions
and
159 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
add_local_sources(sof eq_fir.c eq_fir_generic.c eq_fir_hifi2ep.c eq_fir_hifi3.c) | ||
if(CONFIG_IPC_MAJOR_3) | ||
add_local_sources(sof eq_fir_ipc3.c) | ||
elseif(CONFIG_IPC_MAJOR_4) | ||
add_local_sources(sof eq_fir_ipc4.c) | ||
endif() | ||
|
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,51 @@ | ||
// 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/audio/module_adapter/module/generic.h> | ||
#include <ipc/stream.h> | ||
#include <sof/audio/component.h> | ||
|
||
#include "eq_fir.h" | ||
|
||
LOG_MODULE_DECLARE(eq_fir, CONFIG_SOF_LOG_LEVEL); | ||
|
||
int set_fir_func(struct processing_module *mod, enum sof_ipc_frame fmt) | ||
{ | ||
struct comp_data *cd = module_get_private_data(mod); | ||
|
||
switch (fmt) { | ||
#if CONFIG_FORMAT_S16LE | ||
case SOF_IPC_FRAME_S16_LE: | ||
comp_dbg(mod->dev, "set_fir_func(), SOF_IPC_FRAME_S16_LE"); | ||
set_s16_fir(cd); | ||
break; | ||
#endif /* CONFIG_FORMAT_S16LE */ | ||
#if CONFIG_FORMAT_S24LE | ||
case SOF_IPC_FRAME_S24_4LE: | ||
comp_dbg(mod->dev, "set_fir_func(), SOF_IPC_FRAME_S24_4LE"); | ||
set_s24_fir(cd); | ||
break; | ||
#endif /* CONFIG_FORMAT_S24LE */ | ||
#if CONFIG_FORMAT_S32LE | ||
case SOF_IPC_FRAME_S32_LE: | ||
comp_dbg(mod->dev, "set_fir_func(), SOF_IPC_FRAME_S32_LE"); | ||
set_s32_fir(cd); | ||
break; | ||
#endif /* CONFIG_FORMAT_S32LE */ | ||
default: | ||
comp_err(mod->dev, "set_fir_func(), invalid frame_fmt"); | ||
return -EINVAL; | ||
} | ||
return 0; | ||
} | ||
|
||
int eq_fir_params(struct processing_module *mod) | ||
{ | ||
return 0; | ||
} | ||
|
Oops, something went wrong.