Skip to content

Commit 45d0941

Browse files
audio: volume: drop CONFIG_COMP_PEAK_VOL guards
Commit fcfcb07 ("llext: remove unneeded data and functions") introduced some "ifdef" guards that make the volume component unusable unless "CONFIG_COMP_GAIN" or "CONFIG_COMP_PEAK_VOL" is enabled. This change in behavior results in the following error on the firmware side: <ERROR_MSG> <err> ipc: get_drv(): the provided UUID (b77e677e41885ff4a8fb14af8286bfbd) doesn't match to any driver! </ERROR_MSG> for an i.MX platform using the volume component with "CONFIG_COMP_GAIN=n" and "CONFIG_COMP_PEAK_VOL=n". Based on the Kconfig description, "CONFIG_COMP_GAIN" refers to the gain component, while "CONFIG_COMP_PEAK_VOL" refers to (snippet taken from the volume Kconfig): "This option enables reporting to host peak vol regs.". This description implies that "CONFIG_COMP_PEAK_VOL" doesn't manage the component itself. This is further reinforced by the fact that, previously, using the peak volume component without the "CONFIG_COMP_PEAK_VOL" config enabled worked fine. As such, drop all of the "CONFIG_COMP_PEAK_VOL" "ifdef" guards that were introduced by the aforementioned commit. Fixes fcfcb07 ("llext: remove unneeded data and functions") Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
1 parent d3e3fce commit 45d0941

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/audio/volume/volume.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ LOG_MODULE_REGISTER(volume, CONFIG_SOF_LOG_LEVEL);
4949
#include "volume_uuid.h"
5050
#include "volume.h"
5151

52-
#if CONFIG_COMP_PEAK_VOL || CONFIG_COMP_GAIN
53-
5452
#if CONFIG_FORMAT_S16LE
5553
/**
5654
* \brief Used to find nearest zero crossing frame for 16 bit format.
@@ -212,8 +210,6 @@ __cold_rodata static const struct comp_zc_func_map zc_func_map[] = {
212210
#endif /* CONFIG_FORMAT_S32LE */
213211
};
214212

215-
#endif /* CONFIG_COMP_PEAK_VOL || CONFIG_COMP_GAIN */
216-
217213
#if CONFIG_COMP_VOLUME_LINEAR_RAMP
218214
/**
219215
* \brief Calculate linear ramp function
@@ -551,7 +547,6 @@ void volume_set_chan_unmute(struct processing_module *mod, int chan)
551547
}
552548
}
553549

554-
#if CONFIG_COMP_PEAK_VOL || CONFIG_COMP_GAIN
555550
/*
556551
* \brief Copies and processes stream data.
557552
* \param[in,out] mod Volume processing module handle
@@ -783,9 +778,7 @@ static int volume_free(struct processing_module *mod)
783778

784779
return 0;
785780
}
786-
#endif
787781

788-
#if CONFIG_COMP_PEAK_VOL
789782
static const struct module_interface volume_interface = {
790783
.init = volume_init,
791784
.prepare = volume_prepare,
@@ -795,7 +788,6 @@ static const struct module_interface volume_interface = {
795788
.reset = volume_reset,
796789
.free = volume_free
797790
};
798-
#endif
799791

800792
#if CONFIG_COMP_GAIN
801793
static const struct module_interface gain_interface = {
@@ -837,10 +829,8 @@ SOF_LLEXT_BUILDINFO;
837829

838830
#else
839831

840-
#if CONFIG_COMP_PEAK_VOL
841832
DECLARE_MODULE_ADAPTER(volume_interface, volume_uuid, volume_tr);
842833
SOF_MODULE_INIT(volume, sys_comp_module_volume_interface_init);
843-
#endif
844834

845835
#if CONFIG_COMP_GAIN
846836
DECLARE_MODULE_ADAPTER(gain_interface, gain_uuid, gain_tr);

0 commit comments

Comments
 (0)