Ignore:
Timestamp:
Apr 21, 2008, 2:52:19 AM (17 years ago)
Author:
Brendan Oakley
Message:

alsa-resync1 branch merged to ALSA 1.0.4

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  
    5858#endif
    5959
     60#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
    6061#ifndef TARGET_OS2
    6162#include <linux/compiler.h>
     
    6566#endif
    6667
    67 #ifdef CONFIG_PCI
     68/* for compat layer */
    6869#include <linux/pci.h>
    69 #endif
    7070
    7171#ifndef __iomem
     
    181181#endif
    182182
    183 #if !defined CONFIG_HAVE_STRLCPY && !defined TARGET_OS2
     183#endif /* < 2.6.0 */
     184
     185#ifndef TARGET_OS2
     186#ifndef CONFIG_HAVE_STRLCPY
    184187size_t snd_compat_strlcpy(char *dest, const char *src, size_t size);
    185188#define strlcpy(dest, src, size) snd_compat_strlcpy(dest, src, size)
     
    188191#endif
    189192
    190 #if !defined CONFIG_HAVE_SNPRINTF && !defined TARGET_OS2
     193#ifndef CONFIG_HAVE_SNPRINTF
    191194#include <stdarg.h>
    192195int snd_compat_snprintf(char * buf, size_t size, const char * fmt, ...);
     
    196199#endif
    197200
    198 #ifndef TARGET_OS2
    199201#ifndef CONFIG_HAVE_SCNPRINTF
    200202#define scnprintf(buf,size,fmt,args...) snprintf(buf,size,fmt,##args)
     
    332334#endif
    333335
     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
    334343/* pm_message_t type */
    335344#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11)
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/compat_22.h

    r290 r348  
    1010#include <linux/pagemap.h>
    1111#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
    1220
    1321#if defined(SND_NEED_USB_WRAPPER) && (defined(CONFIG_USB) || defined(CONFIG_USB_MODULE))
     
    220228int snd_compat_release_resource(struct resource *resource);
    221229
    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
     235void *snd_pci_compat_alloc_consistent(struct pci_dev *, long, dma_addr_t *);
     236void snd_pci_compat_free_consistent(struct pci_dev *, long, void *, dma_addr_t);
     237
     238#ifdef CONFIG_PCI
    224239
    225240/* New-style probing supporting hot-pluggable devices */
     
    242257//#define pci_set_power_state snd_pci_compat_set_power_state
    243258
    244 #define pci_alloc_consistent snd_pci_compat_alloc_consistent
    245 #define pci_free_consistent snd_pci_compat_free_consistent
    246259#define pci_dma_supported snd_pci_compat_dma_supported
    247260
     
    308321void snd_pci_compat_disable_device(struct pci_dev *dev);
    309322int 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);
    312323int snd_pci_compat_dma_supported(struct pci_dev *, dma_addr_t mask);
    313324unsigned long snd_pci_compat_get_dma_mask(struct pci_dev *);
     
    477488        unsigned long name[((bits)+BITS_PER_LONG-1)/BITS_PER_LONG]
    478489#endif
    479 #ifndef __user
    480 #define __user
    481 #endif
    482490
    483491/**
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/core.h

    r299 r348  
    279279void *snd_kcalloc(size_t size, int flags);
    280280char *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);
    283281int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count);
    284282int 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  
    2525#define __SOUND_MEMALLOC_H
    2626
    27 #include <linux/pci.h>
    28 #ifdef CONFIG_SBUS
    29 #include <asm/sbus.h>
    30 #endif
     27struct device;
    3128
    3229#if 0
     
    6259#define SNDRV_DMA_TYPE_DEV              2       /* generic device continuous */
    6360#define SNDRV_DMA_TYPE_DEV_SG           3       /* generic device SG-buffer */
    64 #ifdef TARGET_OS2 // Provide old types until 1.0.4
    65 #define SNDRV_DMA_TYPE_ISA              2       /* ISA continuous */
    66 #define SNDRV_DMA_TYPE_PCI              3       /* PCI continuous */
    67 #endif /* TARGET_OS2 */
    6861#define SNDRV_DMA_TYPE_SBUS             4       /* SBUS continuous */
    69 #define SNDRV_DMA_TYPE_PCI_SG           5       /* PCI SG-buffer */
    70 
    71 #ifdef CONFIG_PCI
    72 #if 0
    73 /*
    74  * compose a snd_dma_device struct for the PCI device
    75  */
    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 #endif
    84 #endif
    8562
    8663#define __GFP_NOWARN    0
     
    9774};
    9875
    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 
    11176/*
    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
    16178 */
    16279struct snd_sg_page {
     
    17188        struct snd_sg_page *table;      /* address table */
    17289        struct page **page_table;       /* page table (for vmap/vunmap) */
    173         struct pci_dev *pci;
     90        struct snd_dma_device dev;
    17491};
    17592
     
    189106        return sgbuf->table[offset >> PAGE_SHIFT].addr + offset % PAGE_SIZE;
    190107}
    191 #endif /* CONFIG_PCI */
     108
     109
     110/* allocate/release a buffer */
     111int snd_dma_alloc_pages(int type, struct device *dev, size_t size,
     112                        struct snd_dma_buffer *dmab);
     113int snd_dma_alloc_pages_fallback(int type, struct device *dev, size_t size,
     114                                 struct snd_dma_buffer *dmab);
     115void 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)
     119size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id);
     120int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id);
     121
     122/* basic memory allocation functions */
     123void *snd_malloc_pages(size_t size, unsigned int gfp_flags);
     124void *snd_malloc_pages_fallback(size_t size, unsigned int gfp_flags, size_t *res_size);
     125void snd_free_pages(void *ptr, size_t size);
    192126
    193127#endif /* __SOUND_MEMALLOC_H */
     128
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/version.h

    r300 r348  
    11/* include/version.h.  Generated by configure.  */
    2 #define CONFIG_SND_VERSION "1.0.3"
     2#define CONFIG_SND_VERSION "1.0.4"
    33#define CONFIG_SND_DATE ""
Note: See TracChangeset for help on using the changeset viewer.