Skip to content

Commit d4d0a0c

Browse files
johnylin76kv2019i
authored andcommitted
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 <johnylin@google.com>
1 parent d294036 commit d4d0a0c

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

app/stub_build_all_ipc3.conf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,5 @@ CONFIG_WAVES_CODEC=y
99
CONFIG_DTS_CODEC=y
1010
CONFIG_COMP_IGO_NR=y
1111
CONFIG_COMP_RTNR=y
12-
# temporarily disabled until it compiles:
13-
# sof/src/audio/smart_amp/smart_amp.c:748:9: error:
14-
# no member named 'in_channels' in 'struct smart_amp_data'
15-
# sad->in_channels = audio_stream_get_channels(&source_buffer->stream);
16-
CONFIG_COMP_SMART_AMP=n
12+
CONFIG_COMP_SMART_AMP=y
1713
CONFIG_MAXIM_DSM=y

src/audio/smart_amp/smart_amp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -741,12 +741,10 @@ static int smart_amp_prepare(struct comp_dev *dev)
741741
struct comp_buffer *source_buffer = container_of(blist, struct comp_buffer,
742742
sink_list);
743743

744-
if (source_buffer->source->ipc_config.type == SOF_COMP_DEMUX) {
744+
if (source_buffer->source->ipc_config.type == SOF_COMP_DEMUX)
745745
sad->feedback_buf = source_buffer;
746-
} else {
746+
else
747747
sad->source_buf = source_buffer;
748-
sad->in_channels = audio_stream_get_channels(&source_buffer->stream);
749-
}
750748
}
751749

752750
/* sink buffer */

0 commit comments

Comments
 (0)