From b7b5c7160c616e914c57d337077c16a2a219beaa Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Mon, 15 Apr 2024 20:17:01 +0300 Subject: [PATCH 1/2] ipc4: dai: drop code for XTOS ALH drivers Drop support for XTOS drivers for Intel ALH DAI. Signed-off-by: Kai Vehmanen --- src/ipc/ipc4/dai.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/ipc/ipc4/dai.c b/src/ipc/ipc4/dai.c index 4bb662566155..8ab09aa01936 100644 --- a/src/ipc/ipc4/dai.c +++ b/src/ipc/ipc4/dai.c @@ -130,9 +130,8 @@ int ipc_dai_data_config(struct dai_data *dd, struct comp_dev *dev) { struct ipc_config_dai *dai = &dd->ipc_config; struct ipc4_copier_module_cfg *copier_cfg = dd->dai_spec_config; +#ifdef CONFIG_ZEPHYR_NATIVE_DRIVERS struct dai *dai_p = dd->dai; -#ifndef CONFIG_ZEPHYR_NATIVE_DRIVERS - struct alh_pdata *alh; #endif if (!dai) { @@ -165,11 +164,8 @@ int ipc_dai_data_config(struct dai_data *dd, struct comp_dev *dev) #ifdef CONFIG_ZEPHYR_NATIVE_DRIVERS dd->stream_id = dai_get_stream_id(dai_p, dai->direction); #else - alh = dai_get_drvdata(dai_p); - /* As with HDA, the DMA channel is assigned in runtime, - * not during topology parsing. - */ - dd->stream_id = alh->params.stream_id; + /* only native Zephyr driver supported */ + return -EINVAL; #endif /* SDW HW FIFO always requires 32bit MSB aligned sample data for * all formats, such as 8/16/24/32 bits. From 98ef5fcbce34634ea0128c1cf9703c9b29599557 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Mon, 15 Apr 2024 14:15:17 +0300 Subject: [PATCH 2/2] ipc: ipc4: remove use of platform/drivers/alh.h Definitions of XTOS ALH driver interface are no longer used in SOF tree. Remove the unnecessary inclusion in ipc4 dai.c, and all instances of the platform alh.h header. Signed-off-by: Kai Vehmanen --- src/include/sof/drivers/alh.h | 20 ---- src/ipc/ipc4/dai.c | 1 - .../library/include/platform/drivers/alh.h | 0 .../lunarlake/include/platform/drivers/alh.h | 17 ---- .../meteorlake/include/platform/drivers/alh.h | 19 ---- .../posix/include/platform/drivers/alh.h | 6 -- .../tigerlake/include/platform/drivers/alh.h | 95 ------------------- 7 files changed, 158 deletions(-) delete mode 100644 src/include/sof/drivers/alh.h delete mode 100644 src/platform/library/include/platform/drivers/alh.h delete mode 100644 src/platform/lunarlake/include/platform/drivers/alh.h delete mode 100644 src/platform/meteorlake/include/platform/drivers/alh.h delete mode 100644 src/platform/posix/include/platform/drivers/alh.h delete mode 100644 src/platform/tigerlake/include/platform/drivers/alh.h diff --git a/src/include/sof/drivers/alh.h b/src/include/sof/drivers/alh.h deleted file mode 100644 index 48a6d6b6c630..000000000000 --- a/src/include/sof/drivers/alh.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// -// Copyright(c) 2019 Intel Corporation. All rights reserved. -// -// Author: Slawomir Blauciak - -#ifndef __SOF_DRIVERS_ALH__ -#define __SOF_DRIVERS_ALH__ - -#include -#include -#include - -struct alh_pdata { - struct sof_ipc_dai_alh_params params; -}; - -extern const struct dai_driver alh_driver; - -#endif /* __SOF_DRIVERS_ALH__ */ diff --git a/src/ipc/ipc4/dai.c b/src/ipc/ipc4/dai.c index 8ab09aa01936..1c96650b13e3 100644 --- a/src/ipc/ipc4/dai.c +++ b/src/ipc/ipc4/dai.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/src/platform/library/include/platform/drivers/alh.h b/src/platform/library/include/platform/drivers/alh.h deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/src/platform/lunarlake/include/platform/drivers/alh.h b/src/platform/lunarlake/include/platform/drivers/alh.h deleted file mode 100644 index 4d9a053aec00..000000000000 --- a/src/platform/lunarlake/include/platform/drivers/alh.h +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2023 Intel Corporation. All rights reserved. - */ - -#ifdef __SOF_DRIVERS_ALH__ - -#ifndef __PLATFORM_DRIVERS_ALH__ -#define __PLATFORM_DRIVERS_ALH__ - -#endif /* __PLATFORM_DRIVERS_ALH__ */ - -#else - -#error "This file shouldn't be included from outside of sof/drivers/alh.h" - -#endif diff --git a/src/platform/meteorlake/include/platform/drivers/alh.h b/src/platform/meteorlake/include/platform/drivers/alh.h deleted file mode 100644 index bd2946104ad6..000000000000 --- a/src/platform/meteorlake/include/platform/drivers/alh.h +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2022 Intel Corporation. All rights reserved. - */ - -#ifdef __SOF_DRIVERS_ALH__ - -#ifndef __PLATFORM_DRIVERS_ALH__ -#define __PLATFORM_DRIVERS_ALH__ - -#include - -#endif /* __PLATFORM_DRIVERS_ALH__ */ - -#else - -#error "This file shouldn't be included from outside of sof/drivers/alh.h" - -#endif diff --git a/src/platform/posix/include/platform/drivers/alh.h b/src/platform/posix/include/platform/drivers/alh.h deleted file mode 100644 index c53613144dfd..000000000000 --- a/src/platform/posix/include/platform/drivers/alh.h +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2023 Google LLC. All rights reserved. - * Author: Andy Ross - */ -/* empty file, must be included but defines no needed APIs */ - diff --git a/src/platform/tigerlake/include/platform/drivers/alh.h b/src/platform/tigerlake/include/platform/drivers/alh.h deleted file mode 100644 index 09af56519550..000000000000 --- a/src/platform/tigerlake/include/platform/drivers/alh.h +++ /dev/null @@ -1,95 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2019 Intel Corporation. All rights reserved. - * - * Author: Slawomir Blauciak - */ - -#ifdef __SOF_DRIVERS_ALH__ - -#ifndef __PLATFORM_DRIVERS_ALH__ -#define __PLATFORM_DRIVERS_ALH__ - -#include - -/** - * \brief ALH Handshakes for audio I/O - * Stream ID -> DMA Handshake map - * -1 identifies invalid handshakes/streams - */ -static const uint8_t alh_handshake_map[64] = { - -1, /* 0 - INVALID */ - -1, /* 1 - INVALID */ - -1, /* 2 - INVALID */ - -1, /* 3 - INVALID */ - -1, /* 4 - INVALID */ - -1, /* 5 - INVALID */ - -1, /* 6 - INVALID */ - 22, /* 7 - BIDIRECTIONAL */ - 23, /* 8 - BIDIRECTIONAL */ - 24, /* 9 - BIDIRECTIONAL */ - 25, /* 10 - BIDIRECTIONAL */ - -1, /* 5 - INVALID */ - -1, /* 6 - INVALID */ - -1, /* 13 - INVALID */ - -1, /* 14 - INVALID */ - -1, /* 15 - INVALID */ - -1, /* 16 - INVALID */ - -1, /* 17 - INVALID */ - -1, /* 18 - INVALID */ - -1, /* 19 - INVALID */ - -1, /* 20 - INVALID */ - -1, /* 21 - INVALID */ - -1, /* 22 - INVALID */ - 32, /* 23 - BIDIRECTIONAL */ - 33, /* 24 - BIDIRECTIONAL */ - 34, /* 25 - BIDIRECTIONAL */ - 35, /* 26 - BIDIRECTIONAL */ - -1, /* 5 - INVALID */ - -1, /* 6 - INVALID */ - -1, /* 29 - INVALID */ - -1, /* 30 - INVALID */ - -1, /* 31 - INVALID */ - -1, /* 32 - INVALID */ - -1, /* 33 - INVALID */ - -1, /* 34 - INVALID */ - -1, /* 35 - INVALID */ - -1, /* 36 - INVALID */ - -1, /* 37 - INVALID */ - -1, /* 38 - INVALID */ - 42, /* 39 - BIDIRECTIONAL */ - 43, /* 40 - BIDIRECTIONAL */ - 44, /* 41 - BIDIRECTIONAL */ - 45, /* 42 - BIDIRECTIONAL */ - -1, /* 5 - INVALID */ - -1, /* 6 - INVALID */ - -1, /* 45 - INVALID */ - -1, /* 46 - INVALID */ - -1, /* 47 - INVALID */ - -1, /* 48 - INVALID */ - -1, /* 49 - INVALID */ - -1, /* 50 - INVALID */ - -1, /* 51 - INVALID */ - -1, /* 52 - INVALID */ - -1, /* 53 - INVALID */ - -1, /* 54 - INVALID */ - 52, /* 55 - BIDIRECTIONAL */ - 53, /* 56 - BIDIRECTIONAL */ - 54, /* 57 - BIDIRECTIONAL */ - 55, /* 58 - BIDIRECTIONAL */ - -1, /* 5 - INVALID */ - -1, /* 6 - INVALID */ - -1, /* 61 - INVALID */ - -1, /* 62 - INVALID */ - -1, /* 63 - INVALID */ -}; - -#define ALH_GPDMA_BURST_LENGTH 4 - -#endif /* __PLATFORM_DRIVERS_ALH__ */ - -#else - -#error "This file shouldn't be included from outside of sof/drivers/alh.h" - -#endif