From d4d0a0ca134f92834412865d60c4b86a10cd5b4a Mon Sep 17 00:00:00 2001 From: Pin-chih Lin Date: Wed, 1 Nov 2023 08:48:47 +0800 Subject: [PATCH] smart_amp: fix code and re-enable it on stub builds Removes the misplaced code in smart_amp.c for the fix, then re-enables CONFIG_COMP_SMART_AMP on building stub images. Signed-off-by: Pin-chih Lin --- app/stub_build_all_ipc3.conf | 6 +----- src/audio/smart_amp/smart_amp.c | 6 ++---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/stub_build_all_ipc3.conf b/app/stub_build_all_ipc3.conf index b96ffe48a..38248a42d 100644 --- a/app/stub_build_all_ipc3.conf +++ b/app/stub_build_all_ipc3.conf @@ -9,9 +9,5 @@ CONFIG_WAVES_CODEC=y CONFIG_DTS_CODEC=y CONFIG_COMP_IGO_NR=y CONFIG_COMP_RTNR=y -# temporarily disabled until it compiles: -# sof/src/audio/smart_amp/smart_amp.c:748:9: error: -# no member named 'in_channels' in 'struct smart_amp_data' -# sad->in_channels = audio_stream_get_channels(&source_buffer->stream); -CONFIG_COMP_SMART_AMP=n +CONFIG_COMP_SMART_AMP=y CONFIG_MAXIM_DSM=y diff --git a/src/audio/smart_amp/smart_amp.c b/src/audio/smart_amp/smart_amp.c index ecf0e3a5d..02b7ae2d5 100644 --- a/src/audio/smart_amp/smart_amp.c +++ b/src/audio/smart_amp/smart_amp.c @@ -741,12 +741,10 @@ static int smart_amp_prepare(struct comp_dev *dev) struct comp_buffer *source_buffer = container_of(blist, struct comp_buffer, sink_list); - if (source_buffer->source->ipc_config.type == SOF_COMP_DEMUX) { + if (source_buffer->source->ipc_config.type == SOF_COMP_DEMUX) sad->feedback_buf = source_buffer; - } else { + else sad->source_buf = source_buffer; - sad->in_channels = audio_stream_get_channels(&source_buffer->stream); - } } /* sink buffer */