/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */1/*2* This file is provided under a dual BSD/GPLv2 license. When using or3* redistributing this file, you may do so under either license.4*5* Copyright(c) 2018 Intel Corporation6*/78/**9* SOF ABI versioning is based on Semantic Versioning where we have a given10* MAJOR.MINOR.PATCH version number. See https://semver.org/11*12* Rules for incrementing or changing version :-13*14* 1) Increment MAJOR version if you make incompatible API changes. MINOR and15* PATCH should be reset to 0.16*17* 2) Increment MINOR version if you add backwards compatible features or18* changes. PATCH should be reset to 0.19*20* 3) Increment PATCH version if you add backwards compatible bug fixes.21*/2223#ifndef __INCLUDE_UAPI_SOUND_SOF_ABI_H__24#define __INCLUDE_UAPI_SOUND_SOF_ABI_H__2526#include <linux/types.h>2728/* SOF ABI version major, minor and patch numbers */29#define SOF_ABI_MAJOR 330#define SOF_ABI_MINOR 2331#define SOF_ABI_PATCH 13233/* SOF ABI version number. Format within 32bit word is MMmmmppp */34#define SOF_ABI_MAJOR_SHIFT 2435#define SOF_ABI_MAJOR_MASK 0xff36#define SOF_ABI_MINOR_SHIFT 1237#define SOF_ABI_MINOR_MASK 0xfff38#define SOF_ABI_PATCH_SHIFT 039#define SOF_ABI_PATCH_MASK 0xfff4041#define SOF_ABI_VER(major, minor, patch) \42(((major) << SOF_ABI_MAJOR_SHIFT) | \43((minor) << SOF_ABI_MINOR_SHIFT) | \44((patch) << SOF_ABI_PATCH_SHIFT))4546#define SOF_ABI_VERSION_MAJOR(version) \47(((version) >> SOF_ABI_MAJOR_SHIFT) & SOF_ABI_MAJOR_MASK)48#define SOF_ABI_VERSION_MINOR(version) \49(((version) >> SOF_ABI_MINOR_SHIFT) & SOF_ABI_MINOR_MASK)50#define SOF_ABI_VERSION_PATCH(version) \51(((version) >> SOF_ABI_PATCH_SHIFT) & SOF_ABI_PATCH_MASK)5253#define SOF_ABI_VERSION_INCOMPATIBLE(sof_ver, client_ver) \54(SOF_ABI_VERSION_MAJOR((sof_ver)) != \55SOF_ABI_VERSION_MAJOR((client_ver)) \56)5758#define SOF_ABI_VERSION SOF_ABI_VER(SOF_ABI_MAJOR, SOF_ABI_MINOR, SOF_ABI_PATCH)5960/* SOF ABI magic number "SOF\0". */61#define SOF_ABI_MAGIC 0x00464F5362/* SOF IPC4 ABI magic number "SOF4". */63#define SOF_IPC4_ABI_MAGIC 0x34464F536465#endif666768