Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * <linux/patchkey.h> -- definition of _PATCHKEY macro
0004  *
0005  * Copyright (C) 2005 Stuart Brady
0006  *
0007  * This exists because awe_voice.h defined its own _PATCHKEY and it wasn't
0008  * clear whether removing this would break anything in userspace.
0009  *
0010  * Do not include this file directly.  Please use <sys/soundcard.h> instead.
0011  * For kernel code, use <linux/soundcard.h>
0012  */
0013 
0014 #ifndef _LINUX_PATCHKEY_H_INDIRECT
0015 #error "patchkey.h included directly"
0016 #endif
0017 
0018 #ifndef _UAPI_LINUX_PATCHKEY_H
0019 #define _UAPI_LINUX_PATCHKEY_H
0020 
0021 /* Endian macros. */
0022 #ifndef __KERNEL__
0023 #  include <endian.h>
0024 #endif
0025 
0026 #if !defined(__KERNEL__)
0027 #if defined(__BYTE_ORDER)
0028 #  if __BYTE_ORDER == __BIG_ENDIAN
0029 #    define _PATCHKEY(id) (0xfd00|id)
0030 #  elif __BYTE_ORDER == __LITTLE_ENDIAN
0031 #    define _PATCHKEY(id) ((id<<8)|0x00fd)
0032 #  else
0033 #    error "could not determine byte order"
0034 #  endif
0035 #endif
0036 #endif
0037 
0038 #endif /* _UAPI_LINUX_PATCHKEY_H */