Skip to content

Commit

Permalink
Audio: SRC: Move SRC IPC config definition to src_ipc.h
Browse files Browse the repository at this point in the history
If kept in src_common.h the inclusion to tplg_parser would
create need to include even more headers from SOF. The simple
src_ipc.h contains the only needed SRC IPC4 definition.

The __SOF_AUDIO_SRC_SRC_H__ is updated to match header name
and the ending #endif is moved file end where it should be.

Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu committed Oct 3, 2024
1 parent 6e026b3 commit 2942192
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/audio/src/src_common.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2017 Intel Corporation. All rights reserved.
* Copyright(c) 2017-2024 Intel Corporation.
*
* Author: Seppo Ingalsuo <[email protected]>
*/

#ifndef __SOF_AUDIO_SRC_SRC_H__
#define __SOF_AUDIO_SRC_SRC_H__
#ifndef __SOF_AUDIO_SRC_SRC_COMMON_H__
#define __SOF_AUDIO_SRC_SRC_COMMON_H__

#include <stddef.h>
#include <stdint.h>
Expand All @@ -15,6 +15,7 @@
#include <sof/audio/audio_stream.h>
#include <sof/audio/component.h>
#include <sof/audio/module_adapter/module/generic.h>
#include "src_ipc.h"

struct src_stage {
const int idm;
Expand Down Expand Up @@ -144,14 +145,6 @@ int32_t src_output_rates(void);

void src_set_alignment(struct sof_source *source, struct sof_sink *sink);

#if CONFIG_IPC_MAJOR_4
/* src component private data */
struct ipc4_config_src {
struct ipc4_base_module_cfg base;
uint32_t sink_rate;
};
#endif

struct comp_data {
#if CONFIG_IPC_MAJOR_4
struct ipc4_config_src ipc_config;
Expand All @@ -176,8 +169,6 @@ struct comp_data {
void (*polyphase_func)(struct src_stage_prm *s);
};

#endif /* __SOF_AUDIO_SRC_SRC_H__ */

#if CONFIG_IPC_MAJOR_4

int src_stream_pcm_source_rate_check(struct ipc4_config_src cfg,
Expand Down Expand Up @@ -265,3 +256,4 @@ extern struct tr_ctx src_tr;
#endif
extern const struct sof_uuid SRC_UUID;

#endif /* __SOF_AUDIO_SRC_SRC_COMMON_H__ */
19 changes: 19 additions & 0 deletions src/audio/src/src_ipc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2017-2024 Intel Corporation
*/

#ifndef __SOF_AUDIO_SRC_SRC_IPC_H__
#define __SOF_AUDIO_SRC_SRC_IPC_H__

#include <sof/audio/ipc-config.h>
#include <ipc4/base-config.h>
#include <stdint.h>

/* src component private data */
struct ipc4_config_src {
struct ipc4_base_module_cfg base;
uint32_t sink_rate;
};

#endif /* __SOF_AUDIO_SRC_SRC_IPC_H__ */

0 comments on commit 2942192

Please sign in to comment.