Skip to content

Commit 27691aa

Browse files
lyakhlgirdwood
authored andcommitted
audio: cadence: fix IPC4 build
cadence_code_get_api_id() is only used with IPC3, move it to the respective preprocessor branch. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 8cd3bb8 commit 27691aa

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

src/audio/module_adapter/module/cadence.c

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,6 @@ static struct cadence_api cadence_api_table[] = {
103103
#endif
104104
};
105105

106-
static int cadence_code_get_api_id(uint32_t compress_id)
107-
{
108-
/* convert compress id to SOF cadence SOF id */
109-
switch (compress_id) {
110-
case SND_AUDIOCODEC_MP3:
111-
return CADENCE_CODEC_MP3_DEC_ID;
112-
case SND_AUDIOCODEC_AAC:
113-
return CADENCE_CODEC_AAC_DEC_ID;
114-
case SND_AUDIOCODEC_VORBIS:
115-
return CADENCE_CODEC_VORBIS_DEC_ID;
116-
default:
117-
return -EINVAL;
118-
}
119-
}
120-
121106
#if CONFIG_IPC_MAJOR_4
122107
static int cadence_codec_resolve_api(struct processing_module *mod)
123108
{
@@ -159,8 +144,22 @@ static int cadence_codec_resolve_api(struct processing_module *mod)
159144

160145
return 0;
161146
}
162-
163147
#elif CONFIG_IPC_MAJOR_3
148+
static int cadence_code_get_api_id(uint32_t compress_id)
149+
{
150+
/* convert compress id to SOF cadence SOF id */
151+
switch (compress_id) {
152+
case SND_AUDIOCODEC_MP3:
153+
return CADENCE_CODEC_MP3_DEC_ID;
154+
case SND_AUDIOCODEC_AAC:
155+
return CADENCE_CODEC_AAC_DEC_ID;
156+
case SND_AUDIOCODEC_VORBIS:
157+
return CADENCE_CODEC_VORBIS_DEC_ID;
158+
default:
159+
return -EINVAL;
160+
}
161+
}
162+
164163
static int cadence_codec_resolve_api(struct processing_module *mod)
165164
{
166165
int ret;

0 commit comments

Comments
 (0)