~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/sound/sof/abi.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
  2 /*
  3  * This file is provided under a dual BSD/GPLv2 license.  When using or
  4  * redistributing this file, you may do so under either license.
  5  *
  6  * Copyright(c) 2018 Intel Corporation
  7  */
  8 
  9 /**
 10  * SOF ABI versioning is based on Semantic Versioning where we have a given
 11  * MAJOR.MINOR.PATCH version number. See https://semver.org/
 12  *
 13  * Rules for incrementing or changing version :-
 14  *
 15  * 1) Increment MAJOR version if you make incompatible API changes. MINOR and
 16  *    PATCH should be reset to 0.
 17  *
 18  * 2) Increment MINOR version if you add backwards compatible features or
 19  *    changes. PATCH should be reset to 0.
 20  *
 21  * 3) Increment PATCH version if you add backwards compatible bug fixes.
 22  */
 23 
 24 #ifndef __INCLUDE_UAPI_SOUND_SOF_ABI_H__
 25 #define __INCLUDE_UAPI_SOUND_SOF_ABI_H__
 26 
 27 #include <linux/types.h>
 28 
 29 /* SOF ABI version major, minor and patch numbers */
 30 #define SOF_ABI_MAJOR 3
 31 #define SOF_ABI_MINOR 23
 32 #define SOF_ABI_PATCH 1
 33 
 34 /* SOF ABI version number. Format within 32bit word is MMmmmppp */
 35 #define SOF_ABI_MAJOR_SHIFT     24
 36 #define SOF_ABI_MAJOR_MASK      0xff
 37 #define SOF_ABI_MINOR_SHIFT     12
 38 #define SOF_ABI_MINOR_MASK      0xfff
 39 #define SOF_ABI_PATCH_SHIFT     0
 40 #define SOF_ABI_PATCH_MASK      0xfff
 41 
 42 #define SOF_ABI_VER(major, minor, patch) \
 43         (((major) << SOF_ABI_MAJOR_SHIFT) | \
 44         ((minor) << SOF_ABI_MINOR_SHIFT) | \
 45         ((patch) << SOF_ABI_PATCH_SHIFT))
 46 
 47 #define SOF_ABI_VERSION_MAJOR(version) \
 48         (((version) >> SOF_ABI_MAJOR_SHIFT) & SOF_ABI_MAJOR_MASK)
 49 #define SOF_ABI_VERSION_MINOR(version)  \
 50         (((version) >> SOF_ABI_MINOR_SHIFT) & SOF_ABI_MINOR_MASK)
 51 #define SOF_ABI_VERSION_PATCH(version)  \
 52         (((version) >> SOF_ABI_PATCH_SHIFT) & SOF_ABI_PATCH_MASK)
 53 
 54 #define SOF_ABI_VERSION_INCOMPATIBLE(sof_ver, client_ver)               \
 55         (SOF_ABI_VERSION_MAJOR((sof_ver)) !=                            \
 56                 SOF_ABI_VERSION_MAJOR((client_ver))                     \
 57         )
 58 
 59 #define SOF_ABI_VERSION SOF_ABI_VER(SOF_ABI_MAJOR, SOF_ABI_MINOR, SOF_ABI_PATCH)
 60 
 61 /* SOF ABI magic number "SOF\0". */
 62 #define SOF_ABI_MAGIC           0x00464F53
 63 /* SOF IPC4 ABI magic number "SOF4". */
 64 #define SOF_IPC4_ABI_MAGIC      0x34464F53
 65 
 66 #endif
 67 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php