diff --git a/src/audio/kpb.c b/src/audio/kpb.c index 2141cc8ac1d5..064b3acddb45 100644 --- a/src/audio/kpb.c +++ b/src/audio/kpb.c @@ -2405,11 +2405,11 @@ static void devicelist_reset(struct device_list *devlist, bool remove_items) { /* clear items */ if (remove_items) { - for (int i = 0; i < DEVICE_LIST_SIZE; i++) + for (int i = 0; i < devlist->count; i++) *devlist->devs[i] = NULL; } /* zero the pointers */ - for (int i = 0; i < DEVICE_LIST_SIZE; i++) + for (int i = 0; i < devlist->count; i++) devlist->devs[i] = NULL; devlist->count = 0; diff --git a/src/drivers/Kconfig b/src/drivers/Kconfig index ad3be8d1a564..43fdc40023cd 100644 --- a/src/drivers/Kconfig +++ b/src/drivers/Kconfig @@ -2,8 +2,6 @@ menu "Drivers" -rsource "intel/Kconfig" - rsource "dw/Kconfig" rsource "imx/Kconfig" diff --git a/src/drivers/intel/Kconfig b/src/drivers/intel/Kconfig deleted file mode 100644 index b7e465758ec2..000000000000 --- a/src/drivers/intel/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause - -# TODO: to be removed once Zephyr SSP driver has been updated -# not to depend on this -config INTEL_MN - bool - depends on CAVS - default n - help - Select this if the platform supports M/N dividers. diff --git a/src/include/sof/audio/component.h b/src/include/sof/audio/component.h index e429e9cbe07d..03f37ac884ad 100644 --- a/src/include/sof/audio/component.h +++ b/src/include/sof/audio/component.h @@ -764,6 +764,8 @@ static inline struct comp_dev *comp_alloc(const struct comp_driver *drv, dev->size = bytes; dev->drv = drv; dev->state = COMP_STATE_INIT; + list_init(&dev->bsink_list); + list_init(&dev->bsource_list); memcpy_s(&dev->tctx, sizeof(struct tr_ctx), trace_comp_drv_get_tr_ctx(dev->drv), sizeof(struct tr_ctx)); diff --git a/src/include/sof/drivers/mn.h b/src/include/sof/drivers/mn.h deleted file mode 100644 index 004d907bfad9..000000000000 --- a/src/include/sof/drivers/mn.h +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2020 Intel Corporation. All rights reserved. - * - * Author: Janusz Jankowski - */ - -#ifndef __SOF_DRIVERS_MN_H__ -#define __SOF_DRIVERS_MN_H__ - -#include -#include - -#include -#include - -/** - * \brief Initializes MN driver. - */ -void mn_init(struct sof *sof); - -/** - * \brief Finds and sets valid combination of MCLK source and divider to - * achieve requested MCLK rate. - * User should release clock when it is no longer needed to allow - * driver to change MCLK M/N source when user count drops to 0. - * M value of M/N is not supported for MCLK, only divider can be used. - * \param[in] mclk_id id of main clock for which rate should be set. - * \param[in] mclk_rate main clock frequency. - * \return 0 on success otherwise a negative error code. - */ -int mn_set_mclk(uint16_t mclk_id, uint32_t mclk_rate); - -/** - * \brief set mclk according to blob setting - * \param[in] mdivc mclk control setting. - * \param[in] mdivr mclk divider setting. - * \return 0 on success otherwise a negative error code. - */ -int mn_set_mclk_blob(uint32_t mdivc, uint32_t mdivr); - -/** - * \brief Release previously requested MCLK for given MCLK ID. - * \param[in] mclk_id id of main clock. - */ -void mn_release_mclk(uint32_t mclk_id); - -#if CONFIG_INTEL_MN -/** - * \brief Finds and sets valid combination of BCLK source and M/N to - * achieve requested BCLK rate. - * User should release clock when it is no longer needed to allow - * driver to change M/N source when user count drops to 0. - * \param[in] dai_index DAI index (SSP port). - * \param[in] bclk_rate Bit clock frequency. - * \param[out] out_scr_div SCR divisor that should be set by caller to achieve - * requested BCLK rate. - * \param[out] out_need_ecs If set to true, the caller should configure ECS. - * \return 0 on success otherwise a negative error code. - * \see mn_release_bclk() - */ -int mn_set_bclk(uint32_t dai_index, uint32_t bclk_rate, - uint32_t *out_scr_div, bool *out_need_ecs); - -/** - * \brief Release previously requested BCLK for given DAI. - * \param[in] dai_index DAI index (SSP port). - */ -void mn_release_bclk(uint32_t dai_index); - -/** - * \brief Resets M & N values of M/N divider for given DAI index. - * \param[in] dai_index DAI index (SSP port). - */ -void mn_reset_bclk_divider(uint32_t dai_index); -#endif - -/** - * \brief Retrieves M/N dividers structure. - * \return Pointer to M/N dividers structure. - */ -static inline struct mn *mn_get(void) -{ - return sof_get()->mn; -} - -#endif /* __SOF_DRIVERS_MN_H__ */ diff --git a/src/platform/Kconfig b/src/platform/Kconfig index c558d371806e..684f775049aa 100644 --- a/src/platform/Kconfig +++ b/src/platform/Kconfig @@ -339,7 +339,6 @@ config CAVS bool default n select INTEL - select INTEL_MN select SOF_ZEPHYR_NO_SOF_CLOCK config CAVS_VERSION_2_5 diff --git a/west.yml b/west.yml index abe21291c4da..f7b669fc8fff 100644 --- a/west.yml +++ b/west.yml @@ -43,7 +43,7 @@ manifest: - name: zephyr repo-path: zephyr - revision: cbb6199e679c50c75d3ed090852b4993e8b06a8a + revision: a14ae39e7447321db35d8fd84b282fef4b098c49 remote: zephyrproject # Import some projects listed in zephyr/west.yml@revision