From 235255bc44dc80b9bcf5278527f527d5d5805606 Mon Sep 17 00:00:00 2001 From: Rander Wang Date: Fri, 3 Dec 2021 11:03:00 +0800 Subject: [PATCH] test: add format S24_3LE in volume test The format is added to make volume test pass. The implementation will be added later. Signed-off-by: Rander Wang --- test/cmocka/src/audio/eq_iir/eq_iir_process.c | 2 ++ test/cmocka/src/audio/mux/demux_copy.c | 4 ++++ test/cmocka/src/audio/mux/mux_copy.c | 4 ++++ test/cmocka/src/audio/selector/selector_test.c | 4 +++- test/cmocka/src/audio/volume/volume_process.c | 3 +++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/test/cmocka/src/audio/eq_iir/eq_iir_process.c b/test/cmocka/src/audio/eq_iir/eq_iir_process.c index 7543b769e..08294e167 100644 --- a/test/cmocka/src/audio/eq_iir/eq_iir_process.c +++ b/test/cmocka/src/audio/eq_iir/eq_iir_process.c @@ -383,6 +383,8 @@ static void test_audio_eq_iir(void **state) case SOF_IPC_FRAME_S32_LE: fill_source_s32(td, frames); break; + case SOF_IPC_FRAME_S24_3LE: + break; default: assert(0); break; diff --git a/test/cmocka/src/audio/mux/demux_copy.c b/test/cmocka/src/audio/mux/demux_copy.c index 2ee47477c..e77b28706 100644 --- a/test/cmocka/src/audio/mux/demux_copy.c +++ b/test/cmocka/src/audio/mux/demux_copy.c @@ -305,6 +305,10 @@ int main(void) tests[ti].test_func = test_demux_copy_proc_32; break; #endif /* CONFIG_FORMAT_S32LE */ +#if CONFIG_FORMAT_S24_3LE + case SOF_IPC_FRAME_S24_3LE: + break; +#endif /* CONFIG_FORMAT_S24_3LE */ default: return -EINVAL; } diff --git a/test/cmocka/src/audio/mux/mux_copy.c b/test/cmocka/src/audio/mux/mux_copy.c index 869b4b3bf..78a0747fe 100644 --- a/test/cmocka/src/audio/mux/mux_copy.c +++ b/test/cmocka/src/audio/mux/mux_copy.c @@ -324,6 +324,10 @@ int main(void) tests[ti].test_func = test_mux_copy_proc_32; break; #endif /* CONFIG_FORMAT_S32LE */ +#if CONFIG_FORMAT_S24_3LE + case SOF_IPC_FRAME_S24_3LE: + break; +#endif /* CONFIG_FORMAT_S24_3LE */ default: return -EINVAL; } diff --git a/test/cmocka/src/audio/selector/selector_test.c b/test/cmocka/src/audio/selector/selector_test.c index c2fad49f7..04d0a4a6d 100644 --- a/test/cmocka/src/audio/selector/selector_test.c +++ b/test/cmocka/src/audio/selector/selector_test.c @@ -280,8 +280,10 @@ static void test_audio_sel(void **state) fill_source_s32(sel_state); break; #endif /* CONFIG_FORMAT_S24LE || CONFIG_FORMAT_S32LE */ +/* TODO: add S24_3LE support */ + case SOF_IPC_FRAME_S24_3LE: + break; } - cd->sel_func(sel_state->dev, &sel_state->sink->stream, &sel_state->source->stream, sel_state->dev->frames); diff --git a/test/cmocka/src/audio/volume/volume_process.c b/test/cmocka/src/audio/volume/volume_process.c index a3e9cfbe1..d6b6d401e 100644 --- a/test/cmocka/src/audio/volume/volume_process.c +++ b/test/cmocka/src/audio/volume/volume_process.c @@ -385,6 +385,9 @@ static void test_audio_vol(void **state) case SOF_IPC_FRAME_FLOAT: fill_source_s32(vol_state); break; + case SOF_IPC_FRAME_S24_3LE: + /* TODO: add 3LE support */ + break; } cd->scale_vol(vol_state->dev, &vol_state->sink->stream,