Skip to content

Commit

Permalink
audio: host: add host folder for host source file
Browse files Browse the repository at this point in the history
Move all host related code to this folder.

Signed-off-by: Baofeng Tian <[email protected]>
  • Loading branch information
btian1 committed Nov 7, 2023
1 parent f8a9591 commit 4d08255
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif()

if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
add_local_sources(sof
host-legacy.c
host/host-legacy.c
component.c
buffer.c
source_api_helper.c
Expand Down
11 changes: 11 additions & 0 deletions src/audio/host/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: BSD-3-Clause

if(CONFIG_ZEPHYR_NATIVE_DRIVERS)
zephyr_library_sources(
host-zephyr.c
)
else()
zephyr_library_sources(
host-legacy.c
)
endif()
2 changes: 1 addition & 1 deletion src/audio/host-legacy.c → src/audio/host/host-legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "copier/host_copier.h"
#include "../copier/host_copier.h"

static const struct comp_driver comp_host;

Expand Down
4 changes: 2 additions & 2 deletions src/audio/host-zephyr.c → src/audio/host/host-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#include <stddef.h>
#include <stdint.h>

#include "copier/copier.h"
#include "copier/host_copier.h"
#include "../copier/copier.h"
#include "../copier/host_copier.h"

static const struct comp_driver comp_host;

Expand Down
4 changes: 2 additions & 2 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,11 @@ endif()

if(CONFIG_ZEPHYR_NATIVE_DRIVERS)
zephyr_library_sources(
${SOF_AUDIO_PATH}/host-zephyr.c
${SOF_AUDIO_PATH}/host/host-zephyr.c
)
else()
zephyr_library_sources(
${SOF_AUDIO_PATH}/host-legacy.c
${SOF_AUDIO_PATH}/host/host-legacy.c
)
endif()

Expand Down

0 comments on commit 4d08255

Please sign in to comment.