mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Remove dependencies with kernel headers from instrument layer codes
Don't include kernel headers from alsa-lib codes. Still remained in instrument layer codes, but now all should be gone.
This commit is contained in:
		
							parent
							
								
									982786e9eb
								
							
						
					
					
						commit
						a98fd022fa
					
				
					 9 changed files with 46 additions and 64 deletions
				
			
		| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
alsasoundincludedir = ${includedir}/alsa/sound
 | 
					alsasoundincludedir = ${includedir}/alsa/sound
 | 
				
			||||||
 | 
					
 | 
				
			||||||
alsasoundinclude_HEADERS = ainstr_fm.h ainstr_gf1.h ainstr_simple.h ainstr_iw.h \
 | 
					alsasoundinclude_HEADERS = ainstr_fm.h ainstr_gf1.h ainstr_simple.h ainstr_iw.h \
 | 
				
			||||||
			   asound_fm.h hdsp.h sb16_csp.h sscape_ioctl.h emu10k1.h
 | 
								   asound_fm.h hdsp.h sb16_csp.h sscape_ioctl.h emu10k1.h \
 | 
				
			||||||
 | 
								   type_compat.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
noinst_HEADERS = asound.h asoundef.h asequencer.h
 | 
					noinst_HEADERS = asound.h asoundef.h asequencer.h
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,12 +24,7 @@
 | 
				
			||||||
#ifndef __SOUND_AINSTR_FM_H
 | 
					#ifndef __SOUND_AINSTR_FM_H
 | 
				
			||||||
#define __SOUND_AINSTR_FM_H
 | 
					#define __SOUND_AINSTR_FM_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __KERNEL__
 | 
					#include "type_compat.h"
 | 
				
			||||||
#define __KERNEL__
 | 
					 | 
				
			||||||
#include <asm/types.h>
 | 
					 | 
				
			||||||
#include <asm/byteorder.h>
 | 
					 | 
				
			||||||
#undef __KERNEL__
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  share types (share ID 1)
 | 
					 *  share types (share ID 1)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,10 +24,7 @@
 | 
				
			||||||
#ifndef __SOUND_AINSTR_GF1_H
 | 
					#ifndef __SOUND_AINSTR_GF1_H
 | 
				
			||||||
#define __SOUND_AINSTR_GF1_H
 | 
					#define __SOUND_AINSTR_GF1_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __KERNEL__
 | 
					#include "type_compat.h"
 | 
				
			||||||
#include <asm/types.h>
 | 
					 | 
				
			||||||
#include <asm/byteorder.h>
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  share types (share ID 1)
 | 
					 *  share types (share ID 1)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,12 +24,7 @@
 | 
				
			||||||
#ifndef __SOUND_AINSTR_IW_H
 | 
					#ifndef __SOUND_AINSTR_IW_H
 | 
				
			||||||
#define __SOUND_AINSTR_IW_H
 | 
					#define __SOUND_AINSTR_IW_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __KERNEL__
 | 
					#include "type_compat.h"
 | 
				
			||||||
#define __KERNEL__
 | 
					 | 
				
			||||||
#include <asm/types.h>
 | 
					 | 
				
			||||||
#include <asm/byteorder.h>
 | 
					 | 
				
			||||||
#undef __KERNEL__
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  share types (share ID 1)
 | 
					 *  share types (share ID 1)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,12 +24,7 @@
 | 
				
			||||||
#ifndef __SOUND_AINSTR_SIMPLE_H
 | 
					#ifndef __SOUND_AINSTR_SIMPLE_H
 | 
				
			||||||
#define __SOUND_AINSTR_SIMPLE_H
 | 
					#define __SOUND_AINSTR_SIMPLE_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __KERNEL__
 | 
					#include "type_compat.h"
 | 
				
			||||||
#define __KERNEL__
 | 
					 | 
				
			||||||
#include <asm/types.h>
 | 
					 | 
				
			||||||
#include <asm/byteorder.h>
 | 
					 | 
				
			||||||
#undef __KERNEL__
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  share types (share ID 1)
 | 
					 *  share types (share ID 1)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										40
									
								
								include/sound/type_compat.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								include/sound/type_compat.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,40 @@
 | 
				
			||||||
 | 
					#ifndef __TYPE_COMPAT_H
 | 
				
			||||||
 | 
					#define __TYPE_COMPAT_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
 | 
					#include <stdint.h>
 | 
				
			||||||
 | 
					typedef uint8_t __u8;
 | 
				
			||||||
 | 
					typedef uint16_t __u16;
 | 
				
			||||||
 | 
					typedef uint32_t __u32;
 | 
				
			||||||
 | 
					typedef int8_t __s8;
 | 
				
			||||||
 | 
					typedef int16_t __s16;
 | 
				
			||||||
 | 
					typedef int32_t __s32;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <endian.h>
 | 
				
			||||||
 | 
					#include <byteswap.h>
 | 
				
			||||||
 | 
					#if __BYTE_ORDER == __LITTLE_ENDIAN
 | 
				
			||||||
 | 
					#define __cpu_to_le32(x) (x)
 | 
				
			||||||
 | 
					#define __cpu_to_be32(x) bswap_32(x)
 | 
				
			||||||
 | 
					#define __cpu_to_le16(x) (x)
 | 
				
			||||||
 | 
					#define __cpu_to_be16(x) bswap_16(x)
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					#define __cpu_to_le32(x) bswap_32(x)
 | 
				
			||||||
 | 
					#define __cpu_to_be32(x) (x)
 | 
				
			||||||
 | 
					#define __cpu_to_le16(x) bswap_16(x)
 | 
				
			||||||
 | 
					#define __cpu_to_be16(x) (x)
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define __le32_to_cpu __cpu_to_le32
 | 
				
			||||||
 | 
					#define __be32_to_cpu __cpu_to_be32
 | 
				
			||||||
 | 
					#define __le16_to_cpu __cpu_to_le16
 | 
				
			||||||
 | 
					#define __be16_to_cpu __cpu_to_be16
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define __le64 __u64
 | 
				
			||||||
 | 
					#define __le32 __u32
 | 
				
			||||||
 | 
					#define __le16 __u16
 | 
				
			||||||
 | 
					#define __be64 __u64
 | 
				
			||||||
 | 
					#define __be32 __u32
 | 
				
			||||||
 | 
					#define __be16 __u16
 | 
				
			||||||
 | 
					#endif /* DOC_HIDDEN */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif /* __TYPE_COMPAT_H */
 | 
				
			||||||
| 
						 | 
					@ -30,20 +30,6 @@
 | 
				
			||||||
#include <sys/stat.h>
 | 
					#include <sys/stat.h>
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include "local.h"
 | 
					#include "local.h"
 | 
				
			||||||
/* linux 2.6.9 workaround */
 | 
					 | 
				
			||||||
#include <linux/version.h>
 | 
					 | 
				
			||||||
#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,9)
 | 
					 | 
				
			||||||
#include <asm/types.h>
 | 
					 | 
				
			||||||
#ifndef DOC_HIDDEN
 | 
					 | 
				
			||||||
#define __le64 __u64
 | 
					 | 
				
			||||||
#define __le32 __u32
 | 
					 | 
				
			||||||
#define __le16 __u16
 | 
					 | 
				
			||||||
#define __be64 __u64
 | 
					 | 
				
			||||||
#define __be32 __u32
 | 
					 | 
				
			||||||
#define __be16 __u16
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#endif /* linux 2.6.9 workaround */
 | 
					 | 
				
			||||||
#include <asm/byteorder.h>
 | 
					 | 
				
			||||||
#include <sound/ainstr_fm.h>
 | 
					#include <sound/ainstr_fm.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,19 +31,6 @@
 | 
				
			||||||
#include <sys/stat.h>
 | 
					#include <sys/stat.h>
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include "local.h"
 | 
					#include "local.h"
 | 
				
			||||||
/* linux 2.6.9 workaround */
 | 
					 | 
				
			||||||
#include <linux/version.h>
 | 
					 | 
				
			||||||
#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,9)
 | 
					 | 
				
			||||||
#include <asm/types.h>
 | 
					 | 
				
			||||||
#ifndef DOC_HIDDEN
 | 
					 | 
				
			||||||
#define __le64 __u64
 | 
					 | 
				
			||||||
#define __le32 __u32
 | 
					 | 
				
			||||||
#define __le16 __u16
 | 
					 | 
				
			||||||
#define __be64 __u64
 | 
					 | 
				
			||||||
#define __be32 __u32
 | 
					 | 
				
			||||||
#define __be16 __u16
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#endif /* linux 2.6.9 workaround */
 | 
					 | 
				
			||||||
#include <sound/ainstr_iw.h>
 | 
					#include <sound/ainstr_iw.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,20 +31,6 @@
 | 
				
			||||||
#include <sys/stat.h>
 | 
					#include <sys/stat.h>
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include "local.h"
 | 
					#include "local.h"
 | 
				
			||||||
/* linux 2.6.9 workaround */
 | 
					 | 
				
			||||||
#include <linux/version.h>
 | 
					 | 
				
			||||||
#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,9)
 | 
					 | 
				
			||||||
#include <asm/types.h>
 | 
					 | 
				
			||||||
#ifndef DOC_HIDDEN
 | 
					 | 
				
			||||||
#define __le64 __u64
 | 
					 | 
				
			||||||
#define __le32 __u32
 | 
					 | 
				
			||||||
#define __le16 __u16
 | 
					 | 
				
			||||||
#define __be64 __u64
 | 
					 | 
				
			||||||
#define __be32 __u32
 | 
					 | 
				
			||||||
#define __be16 __u16
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#endif /* linux 2.6.9 workaround */
 | 
					 | 
				
			||||||
#include <asm/byteorder.h>
 | 
					 | 
				
			||||||
#include <sound/ainstr_simple.h>
 | 
					#include <sound/ainstr_simple.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue