1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * <linux/patchkey.h> -- definition of _PATCHKEY macro 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Copyright (C) 2005 Stuart Brady 6*4882a593Smuzhiyun * 7*4882a593Smuzhiyun * This exists because awe_voice.h defined its own _PATCHKEY and it wasn't 8*4882a593Smuzhiyun * clear whether removing this would break anything in userspace. 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * Do not include this file directly. Please use <sys/soundcard.h> instead. 11*4882a593Smuzhiyun * For kernel code, use <linux/soundcard.h> 12*4882a593Smuzhiyun */ 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun #ifndef _LINUX_PATCHKEY_H_INDIRECT 15*4882a593Smuzhiyun #error "patchkey.h included directly" 16*4882a593Smuzhiyun #endif 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun #ifndef _UAPI_LINUX_PATCHKEY_H 19*4882a593Smuzhiyun #define _UAPI_LINUX_PATCHKEY_H 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun /* Endian macros. */ 22*4882a593Smuzhiyun #ifndef __KERNEL__ 23*4882a593Smuzhiyun # include <endian.h> 24*4882a593Smuzhiyun #endif 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun #if !defined(__KERNEL__) 27*4882a593Smuzhiyun #if defined(__BYTE_ORDER) 28*4882a593Smuzhiyun # if __BYTE_ORDER == __BIG_ENDIAN 29*4882a593Smuzhiyun # define _PATCHKEY(id) (0xfd00|id) 30*4882a593Smuzhiyun # elif __BYTE_ORDER == __LITTLE_ENDIAN 31*4882a593Smuzhiyun # define _PATCHKEY(id) ((id<<8)|0x00fd) 32*4882a593Smuzhiyun # else 33*4882a593Smuzhiyun # error "could not determine byte order" 34*4882a593Smuzhiyun # endif 35*4882a593Smuzhiyun #endif 36*4882a593Smuzhiyun #endif 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun #endif /* _UAPI_LINUX_PATCHKEY_H */ 39