Changeset 348 for GPL/branches/alsa-resync1/alsa-kernel/include
- Timestamp:
- Apr 21, 2008, 2:52:19 AM (17 years ago)
- Location:
- GPL/branches/alsa-resync1/alsa-kernel/include/sound
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/alsa-resync1/alsa-kernel/include/sound/adriver.h
r300 r348 58 58 #endif 59 59 60 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) 60 61 #ifndef TARGET_OS2 61 62 #include <linux/compiler.h> … … 65 66 #endif 66 67 67 #ifdef CONFIG_PCI 68 /* for compat layer */ 68 69 #include <linux/pci.h> 69 #endif70 70 71 71 #ifndef __iomem … … 181 181 #endif 182 182 183 #if !defined CONFIG_HAVE_STRLCPY && !defined TARGET_OS2 183 #endif /* < 2.6.0 */ 184 185 #ifndef TARGET_OS2 186 #ifndef CONFIG_HAVE_STRLCPY 184 187 size_t snd_compat_strlcpy(char *dest, const char *src, size_t size); 185 188 #define strlcpy(dest, src, size) snd_compat_strlcpy(dest, src, size) … … 188 191 #endif 189 192 190 #if !defined CONFIG_HAVE_SNPRINTF && !defined TARGET_OS2193 #ifndef CONFIG_HAVE_SNPRINTF 191 194 #include <stdarg.h> 192 195 int snd_compat_snprintf(char * buf, size_t size, const char * fmt, ...); … … 196 199 #endif 197 200 198 #ifndef TARGET_OS2199 201 #ifndef CONFIG_HAVE_SCNPRINTF 200 202 #define scnprintf(buf,size,fmt,args...) snprintf(buf,size,fmt,##args) … … 332 334 #endif 333 335 336 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) 337 #define snd_dma_pci_data(pci) ((struct device *)(pci)) 338 #define snd_dma_isa_data() NULL 339 #define snd_dma_sbus_data(sbus) ((struct device *)(sbus)) 340 #define snd_dma_continuous_data(x) ((struct device *)(unsigned long)(x)) 341 #endif 342 334 343 /* pm_message_t type */ 335 344 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11) -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/compat_22.h
r290 r348 10 10 #include <linux/pagemap.h> 11 11 #include <linux/ioport.h> 12 13 #ifndef likely 14 #if __GNUC__ == 2 && __GNUC_MINOR__ < 96 15 #define __builtin_expect(x, expected_value) (x) 16 #endif 17 #define likely(x) __builtin_expect((x),1) 18 #define unlikely(x) __builtin_expect((x),0) 19 #endif 12 20 13 21 #if defined(SND_NEED_USB_WRAPPER) && (defined(CONFIG_USB) || defined(CONFIG_USB_MODULE)) … … 220 228 int snd_compat_release_resource(struct resource *resource); 221 229 222 #if 0 223 //#ifdef CONFIG_PCI 230 /* these functions are used for ISA buffer allocation, too, so they stay 231 * outside of CONFIG_PCI 232 */ 233 #define pci_alloc_consistent snd_pci_compat_alloc_consistent 234 #define pci_free_consistent snd_pci_compat_free_consistent 235 void *snd_pci_compat_alloc_consistent(struct pci_dev *, long, dma_addr_t *); 236 void snd_pci_compat_free_consistent(struct pci_dev *, long, void *, dma_addr_t); 237 238 #ifdef CONFIG_PCI 224 239 225 240 /* New-style probing supporting hot-pluggable devices */ … … 242 257 //#define pci_set_power_state snd_pci_compat_set_power_state 243 258 244 #define pci_alloc_consistent snd_pci_compat_alloc_consistent245 #define pci_free_consistent snd_pci_compat_free_consistent246 259 #define pci_dma_supported snd_pci_compat_dma_supported 247 260 … … 308 321 void snd_pci_compat_disable_device(struct pci_dev *dev); 309 322 int snd_pci_compat_find_capability(struct pci_dev *dev, int cap); 310 void *snd_pci_compat_alloc_consistent(struct pci_dev *, long, dma_addr_t *);311 void snd_pci_compat_free_consistent(struct pci_dev *, long, void *, dma_addr_t);312 323 int snd_pci_compat_dma_supported(struct pci_dev *, dma_addr_t mask); 313 324 unsigned long snd_pci_compat_get_dma_mask(struct pci_dev *); … … 477 488 unsigned long name[((bits)+BITS_PER_LONG-1)/BITS_PER_LONG] 478 489 #endif 479 #ifndef __user480 #define __user481 #endif482 490 483 491 /** -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/core.h
r299 r348 279 279 void *snd_kcalloc(size_t size, int flags); 280 280 char *snd_kmalloc_strdup(const char *string, int flags); 281 void *snd_malloc_pages(unsigned long size, unsigned int dma_flags);282 void *snd_malloc_pages_fallback(unsigned long size, unsigned int dma_flags, unsigned long *res_size);283 281 int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count); 284 282 int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size_t count); -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/memalloc.h
r222 r348 25 25 #define __SOUND_MEMALLOC_H 26 26 27 #include <linux/pci.h> 28 #ifdef CONFIG_SBUS 29 #include <asm/sbus.h> 30 #endif 27 struct device; 31 28 32 29 #if 0 … … 62 59 #define SNDRV_DMA_TYPE_DEV 2 /* generic device continuous */ 63 60 #define SNDRV_DMA_TYPE_DEV_SG 3 /* generic device SG-buffer */ 64 #ifdef TARGET_OS2 // Provide old types until 1.0.465 #define SNDRV_DMA_TYPE_ISA 2 /* ISA continuous */66 #define SNDRV_DMA_TYPE_PCI 3 /* PCI continuous */67 #endif /* TARGET_OS2 */68 61 #define SNDRV_DMA_TYPE_SBUS 4 /* SBUS continuous */ 69 #define SNDRV_DMA_TYPE_PCI_SG 5 /* PCI SG-buffer */70 71 #ifdef CONFIG_PCI72 #if 073 /*74 * compose a snd_dma_device struct for the PCI device75 */76 static inline void snd_dma_device_pci(struct snd_dma_device *dev, struct pci_dev *pci, unsigned int id)77 {78 memset(dev, 0, sizeof(*dev));79 dev->type = SNDRV_DMA_TYPE_PCI;80 dev->dev.pci = pci;81 dev->id = id;82 }83 #endif84 #endif85 62 86 63 #define __GFP_NOWARN 0 … … 97 74 }; 98 75 99 /* allocate/release a buffer */100 int snd_dma_alloc_pages(int type, struct device *dev, size_t size,101 struct snd_dma_buffer *dmab);102 int snd_dma_alloc_pages_fallback(int type, struct device *dev, size_t size,103 struct snd_dma_buffer *dmab);104 void snd_dma_free_pages(struct snd_dma_buffer *dmab);105 106 /* buffer-preservation managements */107 #define snd_dma_pci_buf_id(pci) (((unsigned int)(pci)->vendor << 16) | (pci)->device)108 size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id);109 int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id);110 111 76 /* 112 * Generic memory allocators 113 */ 114 115 /* 116 * continuous pages 117 */ 118 void *snd_malloc_pages(unsigned long size, unsigned int gfp_flags); 119 void snd_free_pages(void *ptr, unsigned long size); 120 121 #ifdef CONFIG_PCI 122 /* 123 * PCI continuous pages 124 */ 125 void *snd_malloc_pci_pages(struct pci_dev *pci, size_t size, dma_addr_t *dma_addr); 126 void *snd_malloc_pci_pages_fallback(struct pci_dev *pci, size_t size, dma_addr_t *dma_addr, size_t *res_size); 127 void snd_free_pci_pages(struct pci_dev *pci, size_t size, void *ptr, dma_addr_t dma_addr); 128 /* one page allocation */ 129 void *snd_malloc_pci_page(struct pci_dev *pci, dma_addr_t *dma_addr); 130 #define snd_free_pci_page(pci,ptr,addr) snd_free_pci_pages(pci,PAGE_SIZE,ptr,addr) 131 #endif 132 133 #ifdef CONFIG_SBUS 134 /* 135 * SBUS continuous pages 136 */ 137 void *snd_malloc_sbus_pages(struct sbus_dev *sdev, size_t size, dma_addr_t *dma_addr); 138 void *snd_malloc_sbus_pages_fallback(struct sbus_dev *sdev, size_t size, dma_addr_t *dma_addr, size_t *res_size); 139 void snd_free_sbus_pages(struct sbus_dev *sdev, size_t size, void *ptr, dma_addr_t dma_addr); 140 #endif 141 142 #ifdef CONFIG_ISA 143 /* 144 * ISA continuous pages 145 */ 146 void *snd_malloc_isa_pages(size_t size, dma_addr_t *dma_addr); 147 void *snd_malloc_isa_pages_fallback(size_t size, dma_addr_t *dma_addr, size_t *res_size); 148 void snd_free_isa_pages(size_t size, void *ptr, dma_addr_t addr); 149 #ifdef CONFIG_PCI 150 #define snd_malloc_isa_pages(size, dma_addr) snd_malloc_pci_pages(NULL, size, dma_addr) 151 #define snd_malloc_isa_pages_fallback(size, dma_addr, res_size) snd_malloc_pci_pages_fallback(NULL, size, dma_addr, res_size) 152 #define snd_free_isa_pages(size, ptr, dma_addr) snd_free_pci_pages(NULL, size, ptr, dma_addr) 153 #else /* !CONFIG_PCI */ 154 #define snd_free_isa_pages(size, ptr, dma_addr) snd_free_pages(ptr, size) 155 #endif /* CONFIG_PCI */ 156 #endif /* CONFIG_ISA */ 157 158 #ifdef CONFIG_PCI 159 /* 160 * Scatter-Gather PCI pages 77 * Scatter-Gather generic device pages 161 78 */ 162 79 struct snd_sg_page { … … 171 88 struct snd_sg_page *table; /* address table */ 172 89 struct page **page_table; /* page table (for vmap/vunmap) */ 173 struct pci_dev *pci;90 struct snd_dma_device dev; 174 91 }; 175 92 … … 189 106 return sgbuf->table[offset >> PAGE_SHIFT].addr + offset % PAGE_SIZE; 190 107 } 191 #endif /* CONFIG_PCI */ 108 109 110 /* allocate/release a buffer */ 111 int snd_dma_alloc_pages(int type, struct device *dev, size_t size, 112 struct snd_dma_buffer *dmab); 113 int snd_dma_alloc_pages_fallback(int type, struct device *dev, size_t size, 114 struct snd_dma_buffer *dmab); 115 void snd_dma_free_pages(struct snd_dma_buffer *dmab); 116 117 /* buffer-preservation managements */ 118 #define snd_dma_pci_buf_id(pci) (((unsigned int)(pci)->vendor << 16) | (pci)->device) 119 size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id); 120 int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id); 121 122 /* basic memory allocation functions */ 123 void *snd_malloc_pages(size_t size, unsigned int gfp_flags); 124 void *snd_malloc_pages_fallback(size_t size, unsigned int gfp_flags, size_t *res_size); 125 void snd_free_pages(void *ptr, size_t size); 192 126 193 127 #endif /* __SOUND_MEMALLOC_H */ 128 -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/version.h
r300 r348 1 1 /* include/version.h. Generated by configure. */ 2 #define CONFIG_SND_VERSION "1.0. 3"2 #define CONFIG_SND_VERSION "1.0.4" 3 3 #define CONFIG_SND_DATE ""
Note:
See TracChangeset
for help on using the changeset viewer.