From 5a9e3e36561cd8bd0eb570ef5f7fd9fc26b3d5a6 Mon Sep 17 00:00:00 2001 From: Slawomir Blauciak Date: Tue, 18 Dec 2018 13:40:20 +0100 Subject: [PATCH] pipeline: disable xrun recovery added a flag to FW ready message to inform whether the internal xrun recovery is enabled or not Signed-off-by: Slawomir Blauciak --- src/include/sof/audio/pipeline.h | 9 +++++++-- src/include/uapi/abi.h | 2 +- src/include/uapi/ipc/info.h | 1 + src/platform/baytrail/platform.c | 2 +- src/platform/haswell/platform.c | 2 +- src/platform/intel/cavs/platform.c | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/include/sof/audio/pipeline.h b/src/include/sof/audio/pipeline.h index 4d4280a48705..a788024fda5f 100644 --- a/src/include/sof/audio/pipeline.h +++ b/src/include/sof/audio/pipeline.h @@ -44,10 +44,15 @@ /* * This flag disables firmware-side xrun recovery. - * It should remain enabled in the situation when the + * It should remain set in the situation when the * recovery is delegated to the outside of firmware. */ -#define NO_XRUN_RECOVERY 0 +#define NO_XRUN_RECOVERY 1 + +#define PIPELINE_SET_FW_READY_FLAGS \ +( \ + (NO_XRUN_RECOVERY ? SOF_IPC_INFO_EXTERN_XRUN_RECOV : 0) \ +) /* pipeline tracing */ #define trace_pipe(format, ...) \ diff --git a/src/include/uapi/abi.h b/src/include/uapi/abi.h index 5a08f4039497..590873890749 100644 --- a/src/include/uapi/abi.h +++ b/src/include/uapi/abi.h @@ -52,7 +52,7 @@ /** \brief SOF ABI version major, minor and patch numbers */ #define SOF_ABI_MAJOR 3 -#define SOF_ABI_MINOR 7 +#define SOF_ABI_MINOR 8 #define SOF_ABI_PATCH 0 /** \brief SOF ABI version number. Format within 32bit word is MMmmmppp */ diff --git a/src/include/uapi/ipc/info.h b/src/include/uapi/ipc/info.h index 4dff424e1305..937121caa308 100644 --- a/src/include/uapi/ipc/info.h +++ b/src/include/uapi/ipc/info.h @@ -55,6 +55,7 @@ #define SOF_IPC_INFO_LOCKS BIT(1) #define SOF_IPC_INFO_LOCKSV BIT(2) #define SOF_IPC_INFO_GDB BIT(3) +#define SOF_IPC_INFO_EXTERN_XRUN_RECOV BIT(4) /* extended data types that can be appended onto end of sof_ipc_fw_ready */ enum sof_ipc_ext_data { diff --git a/src/platform/baytrail/platform.c b/src/platform/baytrail/platform.c index 9752975fb3fa..6163b9cfb3ff 100644 --- a/src/platform/baytrail/platform.c +++ b/src/platform/baytrail/platform.c @@ -78,7 +78,7 @@ static const struct sof_ipc_fw_ready ready .tag = SOF_TAG, .abi_version = SOF_ABI_VERSION, }, - .flags = DEBUG_SET_FW_READY_FLAGS + .flags = DEBUG_SET_FW_READY_FLAGS | PIPELINE_SET_FW_READY_FLAGS, }; #define NUM_BYT_WINDOWS 6 diff --git a/src/platform/haswell/platform.c b/src/platform/haswell/platform.c index 14e32d3cac04..0c209c7479e4 100644 --- a/src/platform/haswell/platform.c +++ b/src/platform/haswell/platform.c @@ -77,7 +77,7 @@ static const struct sof_ipc_fw_ready ready .tag = SOF_TAG, .abi_version = SOF_ABI_VERSION, }, - .flags = DEBUG_SET_FW_READY_FLAGS, + .flags = DEBUG_SET_FW_READY_FLAGS | PIPELINE_SET_FW_READY_FLAGS, }; #define NUM_HSW_WINDOWS 6 diff --git a/src/platform/intel/cavs/platform.c b/src/platform/intel/cavs/platform.c index 6c94cf7d7fcf..6c42afeac520 100644 --- a/src/platform/intel/cavs/platform.c +++ b/src/platform/intel/cavs/platform.c @@ -80,7 +80,7 @@ static const struct sof_ipc_fw_ready ready .tag = SOF_TAG, .abi_version = SOF_ABI_VERSION, }, - .flags = DEBUG_SET_FW_READY_FLAGS, + .flags = DEBUG_SET_FW_READY_FLAGS | PIPELINE_SET_FW_READY_FLAGS, }; #if defined(CONFIG_MEM_WND)