mirror of https://github.com/thesofproject/sof.git
audio: put multifile components to directories
This patch moves multifile components to separate directories. All component headers are also moved to include/sof/audio. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
parent
291525d271
commit
ca45bc8303
|
@ -7,33 +7,16 @@ if(NOT BUILD_LIBRARY)
|
|||
buffer.c
|
||||
)
|
||||
if(CONFIG_COMP_VOLUME)
|
||||
add_local_sources(sof
|
||||
volume.c
|
||||
volume_generic.c
|
||||
volume_hifi3.c
|
||||
)
|
||||
add_subdirectory(volume)
|
||||
endif()
|
||||
if(CONFIG_COMP_SRC)
|
||||
add_local_sources(sof
|
||||
src.c
|
||||
src_generic.c
|
||||
src_hifi2ep.c
|
||||
src_hifi3.c
|
||||
)
|
||||
add_subdirectory(src)
|
||||
endif()
|
||||
if(CONFIG_COMP_FIR)
|
||||
add_local_sources(sof
|
||||
eq_fir.c
|
||||
fir.c
|
||||
fir_hifi2ep.c
|
||||
fir_hifi3.c
|
||||
)
|
||||
add_subdirectory(eq_fir)
|
||||
endif()
|
||||
if(CONFIG_COMP_IIR)
|
||||
add_local_sources(sof
|
||||
eq_iir.c
|
||||
iir.c
|
||||
)
|
||||
add_subdirectory(eq_iir)
|
||||
endif()
|
||||
if(CONFIG_COMP_TONE)
|
||||
add_local_sources(sof
|
||||
|
@ -66,10 +49,7 @@ if(NOT BUILD_LIBRARY)
|
|||
)
|
||||
endif()
|
||||
if(CONFIG_COMP_SEL)
|
||||
add_local_sources(sof
|
||||
selector.c
|
||||
selector_generic.c
|
||||
)
|
||||
add_subdirectory(selector)
|
||||
endif()
|
||||
if(CONFIG_COMP_TEST_KEYPHRASE)
|
||||
add_local_sources(sof
|
||||
|
@ -121,8 +101,8 @@ check_optimization(hifi3 -mhifi3 -DOPS_HIFI3)
|
|||
set(sof_audio_modules volume src)
|
||||
|
||||
# sources for each module
|
||||
set(volume_sources volume.c volume_generic.c)
|
||||
set(src_sources src.c src_generic.c)
|
||||
set(volume_sources volume/volume.c volume/volume_generic.c)
|
||||
set(src_sources src/src.c src/src_generic.c)
|
||||
|
||||
foreach(audio_module ${sof_audio_modules})
|
||||
# first compile with no optimizations
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
add_local_sources(sof eq_fir.c fir_hifi2ep.c fir_hifi3.c fir.c)
|
|
@ -33,20 +33,20 @@
|
|||
#include <stdbool.h>
|
||||
#include <sof/sof.h>
|
||||
#include <sof/audio/component.h>
|
||||
#include <sof/audio/eq_fir/fir_config.h>
|
||||
#include <sof/ipc.h>
|
||||
#include <uapi/user/eq.h>
|
||||
#include "fir_config.h"
|
||||
|
||||
#if FIR_GENERIC
|
||||
#include "fir.h"
|
||||
#include <sof/audio/eq_fir/fir.h>
|
||||
#endif
|
||||
|
||||
#if FIR_HIFIEP
|
||||
#include "fir_hifi2ep.h"
|
||||
#include <sof/audio/eq_fir/fir_hifi2ep.h>
|
||||
#endif
|
||||
|
||||
#if FIR_HIFI3
|
||||
#include "fir_hifi3.h"
|
||||
#include <sof/audio/eq_fir/fir_hifi3.h>
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_TEST
|
|
@ -34,13 +34,13 @@
|
|||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <sof/audio/component.h>
|
||||
#include <sof/audio/eq_fir/fir_config.h>
|
||||
#include <sof/audio/format.h>
|
||||
#include <uapi/user/eq.h>
|
||||
#include "fir_config.h"
|
||||
|
||||
#if FIR_GENERIC
|
||||
|
||||
#include "fir.h"
|
||||
#include <sof/audio/eq_fir/fir.h>
|
||||
|
||||
/*
|
||||
* EQ FIR algorithm code
|
|
@ -32,15 +32,15 @@
|
|||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <sof/audio/component.h>
|
||||
#include <sof/audio/eq_fir/fir_config.h>
|
||||
#include <sof/audio/format.h>
|
||||
#include <uapi/user/eq.h>
|
||||
#include "fir_config.h"
|
||||
|
||||
#if FIR_HIFIEP
|
||||
|
||||
#include <xtensa/config/defs.h>
|
||||
#include <xtensa/tie/xt_hifi2.h>
|
||||
#include "fir_hifi2ep.h"
|
||||
#include <sof/audio/eq_fir/fir_hifi2ep.h>
|
||||
|
||||
/*
|
||||
* EQ FIR algorithm code
|
|
@ -32,15 +32,15 @@
|
|||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <sof/audio/component.h>
|
||||
#include <sof/audio/eq_fir/fir_config.h>
|
||||
#include <sof/audio/format.h>
|
||||
#include <uapi/user/eq.h>
|
||||
#include "fir_config.h"
|
||||
|
||||
#if FIR_HIFI3
|
||||
|
||||
#include <xtensa/config/defs.h>
|
||||
#include <xtensa/tie/xt_hifi3.h>
|
||||
#include "fir_hifi3.h"
|
||||
#include <sof/audio/eq_fir/fir_hifi3.h>
|
||||
|
||||
/*
|
||||
* EQ FIR algorithm code
|
|
@ -0,0 +1 @@
|
|||
add_local_sources(sof eq_iir.c iir.c)
|
|
@ -40,10 +40,10 @@
|
|||
#include <sof/clk.h>
|
||||
#include <sof/ipc.h>
|
||||
#include <sof/audio/component.h>
|
||||
#include <sof/audio/eq_iir/eq_iir.h>
|
||||
#include <sof/audio/format.h>
|
||||
#include <sof/audio/eq_iir/iir.h>
|
||||
#include <uapi/user/eq.h>
|
||||
#include "eq_iir.h"
|
||||
#include "iir.h"
|
||||
|
||||
#ifdef MODULE_TEST
|
||||
#include <stdio.h>
|
|
@ -39,8 +39,8 @@
|
|||
#endif
|
||||
|
||||
#include <sof/audio/format.h>
|
||||
#include <sof/audio/eq_iir/iir.h>
|
||||
#include <uapi/user/eq.h>
|
||||
#include "iir.h"
|
||||
|
||||
/*
|
||||
* Direct form II transposed second order filter block (biquad)
|
|
@ -0,0 +1 @@
|
|||
add_local_sources(sof selector_generic.c selector.c)
|
|
@ -46,7 +46,7 @@
|
|||
#include <sof/alloc.h>
|
||||
#include <sof/clk.h>
|
||||
#include <sof/ipc.h>
|
||||
#include "selector.h"
|
||||
#include <sof/audio/selector.h>
|
||||
#include <sof/math/numbers.h>
|
||||
|
||||
/**
|
|
@ -34,7 +34,7 @@
|
|||
* \authors Lech Betlej <lech.betlej@linux.intel.com>
|
||||
*/
|
||||
|
||||
#include "selector.h"
|
||||
#include <sof/audio/selector.h>
|
||||
|
||||
/**
|
||||
* \brief Channel selection for 16 bit, 1 channel data format.
|
|
@ -0,0 +1 @@
|
|||
add_local_sources(sof src_generic.c src_hifi2ep.c src_hifi3.c src.c)
|
|
@ -43,12 +43,11 @@
|
|||
#include <sof/ipc.h>
|
||||
#include <sof/audio/component.h>
|
||||
#include <sof/audio/pipeline.h>
|
||||
#include <sof/audio/src/src_config.h>
|
||||
#include <sof/audio/src/src.h>
|
||||
#include <sof/math/numbers.h>
|
||||
#include <uapi/ipc/topology.h>
|
||||
|
||||
#include "src_config.h"
|
||||
#include "src.h"
|
||||
|
||||
#if SRC_SHORT
|
||||
#include <sof/audio/coefficients/src/src_tiny_int16_define.h>
|
||||
#include <sof/audio/coefficients/src/src_tiny_int16_table.h>
|
|
@ -36,11 +36,10 @@
|
|||
#include <stdint.h>
|
||||
#include <sof/alloc.h>
|
||||
#include <sof/audio/format.h>
|
||||
#include <sof/audio/src/src_config.h>
|
||||
#include <sof/audio/src/src.h>
|
||||
#include <sof/math/numbers.h>
|
||||
|
||||
#include "src_config.h"
|
||||
#include "src.h"
|
||||
|
||||
#if SRC_GENERIC
|
||||
|
||||
#if SRC_SHORT /* 16 bit coefficients version */
|
|
@ -34,11 +34,10 @@
|
|||
#include <stdint.h>
|
||||
#include <sof/alloc.h>
|
||||
#include <sof/audio/format.h>
|
||||
#include <sof/audio/src/src_config.h>
|
||||
#include <sof/audio/src/src.h>
|
||||
#include <sof/math/numbers.h>
|
||||
|
||||
#include "src_config.h"
|
||||
#include "src.h"
|
||||
|
||||
#if SRC_HIFIEP
|
||||
|
||||
#include <xtensa/config/defs.h>
|
|
@ -34,11 +34,10 @@
|
|||
#include <stdint.h>
|
||||
#include <sof/alloc.h>
|
||||
#include <sof/audio/format.h>
|
||||
#include <sof/audio/src/src_config.h>
|
||||
#include <sof/audio/src/src.h>
|
||||
#include <sof/math/numbers.h>
|
||||
|
||||
#include "src_config.h"
|
||||
#include "src.h"
|
||||
|
||||
#if SRC_HIFI3
|
||||
|
||||
#include <xtensa/config/defs.h>
|
|
@ -0,0 +1 @@
|
|||
add_local_sources(sof volume_generic.c volume_hifi3.c volume.c)
|
|
@ -48,7 +48,7 @@
|
|||
#include <sof/schedule.h>
|
||||
#include <sof/clk.h>
|
||||
#include <sof/ipc.h>
|
||||
#include "volume.h"
|
||||
#include <sof/audio/volume.h>
|
||||
#include <sof/math/numbers.h>
|
||||
|
||||
/**
|
|
@ -38,7 +38,7 @@
|
|||
* Tomasz Lauda <tomasz.lauda@linux.intel.com>
|
||||
*/
|
||||
|
||||
#include "volume.h"
|
||||
#include <sof/audio/volume.h>
|
||||
|
||||
#ifdef CONFIG_GENERIC
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
* \authors Tomasz Lauda <tomasz.lauda@linux.intel.com>
|
||||
*/
|
||||
|
||||
#include "volume.h"
|
||||
#include <sof/audio/volume.h>
|
||||
|
||||
#if defined(__XCC__) && XCHAL_HAVE_HIFI3
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
#ifndef FIR_H
|
||||
#define FIR_H
|
||||
|
||||
#include "fir_config.h"
|
||||
#include <sof/audio/eq_fir/fir_config.h>
|
||||
|
||||
#if FIR_GENERIC
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
#ifndef FIR_HIFI2EP_H
|
||||
#define FIR_HIFI2EP_H
|
||||
|
||||
#include "fir_config.h"
|
||||
#include <sof/audio/eq_fir/fir_config.h>
|
||||
|
||||
#if FIR_HIFIEP
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
#ifndef FIR_HIFI3_H
|
||||
#define FIR_HIFI3_H
|
||||
|
||||
#include "fir_config.h"
|
||||
#include <sof/audio/eq_fir/fir_config.h>
|
||||
|
||||
#if FIR_HIFI3
|
||||
|
|
@ -7,8 +7,8 @@ target_include_directories(selector_test PRIVATE ${PROJECT_SOURCE_DIR}/src/audio
|
|||
# make small version of libaudio so we don't have to care
|
||||
# about unused missing references
|
||||
add_library(audio_for_selector STATIC
|
||||
${PROJECT_SOURCE_DIR}/src/audio/selector.c
|
||||
${PROJECT_SOURCE_DIR}/src/audio/selector_generic.c
|
||||
${PROJECT_SOURCE_DIR}/src/audio/selector/selector.c
|
||||
${PROJECT_SOURCE_DIR}/src/audio/selector/selector_generic.c
|
||||
)
|
||||
|
||||
target_link_libraries(audio_for_selector PRIVATE sof_options)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
#include <sof/audio/component.h>
|
||||
#include "selector.h"
|
||||
#include <sof/audio/selector.h>
|
||||
|
||||
|
||||
struct sel_test_state {
|
||||
|
|
|
@ -7,9 +7,9 @@ target_include_directories(volume_process PRIVATE ${PROJECT_SOURCE_DIR}/src/audi
|
|||
# make small version of libaudio so we don't have to care
|
||||
# about unused missing references
|
||||
add_library(audio_for_volume STATIC
|
||||
${PROJECT_SOURCE_DIR}/src/audio/volume.c
|
||||
${PROJECT_SOURCE_DIR}/src/audio/volume_generic.c
|
||||
${PROJECT_SOURCE_DIR}/src/audio/volume_hifi3.c
|
||||
${PROJECT_SOURCE_DIR}/src/audio/volume/volume.c
|
||||
${PROJECT_SOURCE_DIR}/src/audio/volume/volume_generic.c
|
||||
${PROJECT_SOURCE_DIR}/src/audio/volume/volume_hifi3.c
|
||||
)
|
||||
|
||||
target_link_libraries(audio_for_volume PRIVATE sof_options)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <stdint.h>
|
||||
#include <cmocka.h>
|
||||
#include <sof/audio/component.h>
|
||||
#include "volume.h"
|
||||
#include <sof/audio/volume.h>
|
||||
|
||||
/* Add macro for a volume test level. The levels to test with this code
|
||||
* are:
|
||||
|
|
Loading…
Reference in New Issue