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