From 9d51b5c10f6011d12a61781113c38200f033c80e Mon Sep 17 00:00:00 2001 From: Curtis Malainey Date: Wed, 12 Jul 2023 17:35:33 -0700 Subject: [PATCH] audio: delete switch component mostly not implemented and hasn't been meaningfully touched in > 3 yr. Signed-off-by: Curtis Malainey --- src/arch/xtensa/configs/mt8186_defconfig | 1 - src/arch/xtensa/configs/mt8188_defconfig | 1 - src/arch/xtensa/configs/mt8195_defconfig | 1 - .../tigerlake_chrome_google_aec.config | 1 - .../tigerlake_chrome_waves_google_aec.config | 1 - src/arch/xtensa/configs/rembrandt_defconfig | 1 - src/audio/CMakeLists.txt | 5 - src/audio/Kconfig | 6 -- src/audio/switch.c | 98 ------------------- zephyr/CMakeLists.txt | 4 - 10 files changed, 119 deletions(-) delete mode 100644 src/audio/switch.c diff --git a/src/arch/xtensa/configs/mt8186_defconfig b/src/arch/xtensa/configs/mt8186_defconfig index c20457d46..e9555a1fb 100644 --- a/src/arch/xtensa/configs/mt8186_defconfig +++ b/src/arch/xtensa/configs/mt8186_defconfig @@ -10,7 +10,6 @@ CONFIG_COMP_TDFB=n CONFIG_COMP_TONE=n CONFIG_COMP_MIXER=n CONFIG_COMP_MUX=n -CONFIG_COMP_SWITCH=n CONFIG_COMP_KPB=n CONFIG_COMP_SEL=n CONFIG_COMP_ASRC=n diff --git a/src/arch/xtensa/configs/mt8188_defconfig b/src/arch/xtensa/configs/mt8188_defconfig index bee7be9bf..b495a2e9a 100644 --- a/src/arch/xtensa/configs/mt8188_defconfig +++ b/src/arch/xtensa/configs/mt8188_defconfig @@ -9,7 +9,6 @@ CONFIG_COMP_TDFB=n CONFIG_COMP_TONE=n CONFIG_COMP_MIXER=n CONFIG_COMP_MUX=n -CONFIG_COMP_SWITCH=n CONFIG_COMP_KPB=n CONFIG_COMP_SEL=n CONFIG_COMP_ASRC=n diff --git a/src/arch/xtensa/configs/mt8195_defconfig b/src/arch/xtensa/configs/mt8195_defconfig index 3e6769d58..cffe02dd8 100644 --- a/src/arch/xtensa/configs/mt8195_defconfig +++ b/src/arch/xtensa/configs/mt8195_defconfig @@ -10,7 +10,6 @@ CONFIG_COMP_TDFB=n CONFIG_COMP_TONE=n CONFIG_COMP_MIXER=n CONFIG_COMP_MUX=n -CONFIG_COMP_SWITCH=n CONFIG_COMP_KPB=n CONFIG_COMP_SEL=n CONFIG_COMP_ASRC=n diff --git a/src/arch/xtensa/configs/override/tigerlake_chrome_google_aec.config b/src/arch/xtensa/configs/override/tigerlake_chrome_google_aec.config index 806a76f44..3fa82a439 100644 --- a/src/arch/xtensa/configs/override/tigerlake_chrome_google_aec.config +++ b/src/arch/xtensa/configs/override/tigerlake_chrome_google_aec.config @@ -7,7 +7,6 @@ CONFIG_COMP_SRC=n CONFIG_COMP_FIR=n CONFIG_COMP_IIR=n CONFIG_COMP_MIXER=n -CONFIG_COMP_SWITCH=n CONFIG_COMP_KPB=n CONFIG_COMP_SEL=n CONFIG_COMP_DCBLOCK=n diff --git a/src/arch/xtensa/configs/override/tigerlake_chrome_waves_google_aec.config b/src/arch/xtensa/configs/override/tigerlake_chrome_waves_google_aec.config index c2b4bd441..20c4e0e9b 100644 --- a/src/arch/xtensa/configs/override/tigerlake_chrome_waves_google_aec.config +++ b/src/arch/xtensa/configs/override/tigerlake_chrome_waves_google_aec.config @@ -7,7 +7,6 @@ CONFIG_COMP_SRC=n CONFIG_COMP_FIR=n CONFIG_COMP_IIR=n CONFIG_COMP_MIXER=n -CONFIG_COMP_SWITCH=n CONFIG_COMP_KPB=n CONFIG_COMP_SEL=n CONFIG_COMP_DCBLOCK=n diff --git a/src/arch/xtensa/configs/rembrandt_defconfig b/src/arch/xtensa/configs/rembrandt_defconfig index ec3c75a87..665408b03 100644 --- a/src/arch/xtensa/configs/rembrandt_defconfig +++ b/src/arch/xtensa/configs/rembrandt_defconfig @@ -19,7 +19,6 @@ CONFIG_COMP_CROSSOVER=n CONFIG_COMP_DRC=n CONFIG_COMP_MULTIBAND_DRC=n CONFIG_COMP_TONE=n -CONFIG_COMP_SWITCH=n CONFIG_COMP_KPB=n CONFIG_MAXIM_DSM=n CONFIG_COMP_ASRC=n diff --git a/src/audio/CMakeLists.txt b/src/audio/CMakeLists.txt index dcde9d6ad..1addbaddd 100644 --- a/src/audio/CMakeLists.txt +++ b/src/audio/CMakeLists.txt @@ -57,11 +57,6 @@ if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC) if(CONFIG_COMP_MUX) add_subdirectory(mux) endif() - if(CONFIG_COMP_SWITCH) - add_local_sources(sof - switch.c - ) - endif() if(CONFIG_COMP_DAI) add_local_sources(sof dai-legacy.c diff --git a/src/audio/Kconfig b/src/audio/Kconfig index af79368d9..cf34ce8a6 100644 --- a/src/audio/Kconfig +++ b/src/audio/Kconfig @@ -208,12 +208,6 @@ config COMP_MUX help Select for MUX component -config COMP_SWITCH - bool "Switch component" - default n - help - Select for Switch component - config COMP_KPB bool "KPB component" default y diff --git a/src/audio/switch.c b/src/audio/switch.c deleted file mode 100644 index 10cb6a7e1..000000000 --- a/src/audio/switch.c +++ /dev/null @@ -1,98 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright(c) 2016 Intel Corporation. All rights reserved. -// -// Author: Liam Girdwood - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static const struct comp_driver comp_switch; - -LOG_MODULE_REGISTER(switch, CONFIG_SOF_LOG_LEVEL); - -/* 385cc44b-f34e-4b9b-8be0-535c5f43a825 */ -DECLARE_SOF_RT_UUID("switch", switch_uuid, 0x385cc44b, 0xf34e, 0x4b9b, - 0x8b, 0xe0, 0x53, 0x5c, 0x5f, 0x43, 0xa8, 0x25); - -DECLARE_TR_CTX(switch_tr, SOF_UUID(switch_uuid), LOG_LEVEL_INFO); - -static struct comp_dev *switch_new(const struct comp_driver *drv, - const struct comp_ipc_config *config, - const void *spec) -{ - comp_cl_info(&comp_switch, "switch_new()"); - - return NULL; -} - -static void switch_free(struct comp_dev *dev) -{ -} - -/* set component audio stream parameters */ -static int switch_params(struct comp_dev *dev, - struct sof_ipc_stream_params *params) -{ - return 0; -} - -/* used to pass standard and bespoke commands (with data) to component */ -static int switch_cmd(struct comp_dev *dev, int cmd, void *data, - int max_data_size) -{ - /* switch will use buffer "connected" status */ - return 0; -} - -/* copy and process stream data from source to sink buffers */ -static int switch_copy(struct comp_dev *dev) -{ - return 0; -} - -static int switch_reset(struct comp_dev *dev) -{ - return 0; -} - -static int switch_prepare(struct comp_dev *dev) -{ - return 0; -} - -static const struct comp_driver comp_switch = { - .type = SOF_COMP_SWITCH, - .uid = SOF_RT_UUID(switch_uuid), - .tctx = &switch_tr, - .ops = { - .create = switch_new, - .free = switch_free, - .params = switch_params, - .cmd = switch_cmd, - .copy = switch_copy, - .prepare = switch_prepare, - .reset = switch_reset, - }, -}; - -static SHARED_DATA struct comp_driver_info comp_switch_info = { - .drv = &comp_switch, -}; - -UT_STATIC void sys_comp_switch_init(void) -{ - comp_register(platform_shared_get(&comp_switch_info, - sizeof(comp_switch_info))); -} - -DECLARE_MODULE(sys_comp_switch_init); -SOF_MODULE_INIT(switch, sys_comp_switch_init); diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 6b991b472..9aac0ab23 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -524,10 +524,6 @@ zephyr_library_sources_ifdef(CONFIG_COMP_KPB ${SOF_AUDIO_PATH}/kpb.c ) -zephyr_library_sources_ifdef(CONFIG_COMP_SWITCH - ${SOF_AUDIO_PATH}/switch.c -) - if(CONFIG_IPC_MAJOR_3) zephyr_library_sources_ifdef(CONFIG_COMP_MIXER ${SOF_AUDIO_PATH}/mixer/mixer.c