]> git.pld-linux.org Git - packages/linux-libc-headers.git/blob - linux-libc-headers-alsa-1.0.6.patch
- fixes dosfsprogs build
[packages/linux-libc-headers.git] / linux-libc-headers-alsa-1.0.6.patch
1 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/ac97_codec.h linux-libc-headers-2.6.8.0/include/sound/ac97_codec.h
2 --- linux-libc-headers-2.6.8.0.orig/include/sound/ac97_codec.h  2004-08-18 20:07:05.000000000 +0200
3 +++ linux-libc-headers-2.6.8.0/include/sound/ac97_codec.h       2004-08-20 08:04:48.260207680 +0200
4 @@ -364,11 +364,21 @@
5  #define AC97_RATES_MIC_ADC     4
6  #define AC97_RATES_SPDIF       5
7  
8 +/* shared controllers */
9 +enum {
10 +       AC97_SHARED_TYPE_NONE,
11 +       AC97_SHARED_TYPE_ICH,
12 +       AC97_SHARED_TYPE_ATIIXP,
13 +       AC97_SHARED_TYPES
14 +};
15 +
16  /*
17   *
18   */
19  
20  typedef struct _snd_ac97_bus ac97_bus_t;
21 +typedef struct _snd_ac97_bus_ops ac97_bus_ops_t;
22 +typedef struct _snd_ac97_template ac97_template_t;
23  typedef struct _snd_ac97 ac97_t;
24  
25  enum ac97_pcm_cfg {
26 @@ -405,29 +415,45 @@
27         int (*build_post_spdif) (ac97_t *ac97);
28  };
29  
30 -struct _snd_ac97_bus {
31 -       /* -- lowlevel (hardware) driver specific -- */
32 +struct _snd_ac97_bus_ops {
33         void (*reset) (ac97_t *ac97);
34         void (*write) (ac97_t *ac97, unsigned short reg, unsigned short val);
35         unsigned short (*read) (ac97_t *ac97, unsigned short reg);
36         void (*wait) (ac97_t *ac97);
37         void (*init) (ac97_t *ac97);
38 +};
39 +
40 +struct _snd_ac97_bus {
41 +       /* -- lowlevel (hardware) driver specific -- */
42 +       ac97_bus_ops_t *ops;
43         void *private_data;
44         void (*private_free) (ac97_bus_t *bus);
45         /* --- */
46         snd_card_t *card;
47         unsigned short num;     /* bus number */
48 -       unsigned short vra: 1,  /* bridge supports VRA */
49 +       unsigned short no_vra: 1, /* bridge doesn't support VRA */
50                        isdin: 1;/* independent SDIN */
51         unsigned int clock;     /* AC'97 base clock (usually 48000Hz) */
52         spinlock_t bus_lock;    /* used mainly for slot allocation */
53         unsigned short used_slots[2][4]; /* actually used PCM slots */
54         unsigned short pcms_count; /* count of PCMs */
55         struct ac97_pcm *pcms;
56 +       unsigned int shared_type;       /* type of shared controller betwen audio and modem */
57         ac97_t *codec[4];
58         snd_info_entry_t *proc;
59  };
60  
61 +struct _snd_ac97_template {
62 +       void *private_data;
63 +       void (*private_free) (ac97_t *ac97);
64 +       struct pci_dev *pci;    /* assigned PCI device - used for quirks */
65 +       unsigned short num;     /* number of codec: 0 = primary, 1 = secondary */
66 +       unsigned short addr;    /* physical address of codec [0-3] */
67 +       unsigned int scaps;     /* driver capabilities */
68 +       unsigned int limited_regs; /* allow limited registers only */
69 +       DECLARE_BITMAP(reg_accessed, 0x80); /* bit flags */
70 +};
71 +
72  struct _snd_ac97 {
73         /* -- lowlevel (hardware) driver specific -- */
74         struct snd_ac97_build_ops * build_ops;
75 @@ -441,6 +467,7 @@
76         unsigned short subsystem_vendor;
77         unsigned short subsystem_device;
78         spinlock_t reg_lock;
79 +       struct semaphore mutex; /* mutex for AD18xx multi-codecs and paging (2.3) */
80         unsigned short num;     /* number of codec: 0 = primary, 1 = secondary */
81         unsigned short addr;    /* physical address of codec [0-3] */
82         unsigned int id;        /* identification of codec */
83 @@ -461,7 +488,6 @@
84                         unsigned short id[3];           // codec IDs (lower 16-bit word)
85                         unsigned short pcmreg[3];       // PCM registers
86                         unsigned short codec_cfg[3];    // CODEC_CFG bits
87 -                       struct semaphore mutex;
88                 } ad18xx;
89                 unsigned int dev_flags;         /* device specific */
90         } spec;
91 @@ -484,10 +510,14 @@
92  {
93         return (ac97->ext_id & AC97_EI_AMAP) != 0;
94  }
95 +static inline int ac97_can_spdif(ac97_t * ac97)
96 +{
97 +       return (ac97->ext_id & AC97_EI_SPDIF) != 0;
98 +}
99  
100  /* functions */
101 -int snd_ac97_bus(snd_card_t * card, ac97_bus_t * _bus, ac97_bus_t ** rbus); /* create new AC97 bus */
102 -int snd_ac97_mixer(ac97_bus_t * bus, ac97_t * _ac97, ac97_t ** rac97); /* create mixer controls */
103 +int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops, void *private_data, ac97_bus_t **rbus); /* create new AC97 bus */
104 +int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97);        /* create mixer controls */
105  
106  void snd_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short value);
107  unsigned short snd_ac97_read(ac97_t *ac97, unsigned short reg);
108 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/asound.h linux-libc-headers-2.6.8.0/include/sound/asound.h
109 --- linux-libc-headers-2.6.8.0.orig/include/sound/asound.h      2004-08-18 20:07:05.000000000 +0200
110 +++ linux-libc-headers-2.6.8.0/include/sound/asound.h   2004-08-20 08:04:48.263207224 +0200
111 @@ -254,7 +254,7 @@
112  #define SNDRV_PCM_INFO_HALF_DUPLEX     0x00100000      /* only half duplex */
113  #define SNDRV_PCM_INFO_JOINT_DUPLEX    0x00200000      /* playback and capture stream are somewhat correlated */
114  #define SNDRV_PCM_INFO_SYNC_START      0x00400000      /* pcm support some kind of sync go */
115 -#define SNDRV_PCM_INFO_NONATOMIC_OPS   0x00800000      /* non-atomic prepare callback */
116 +#define SNDRV_PCM_INFO_MMAP_IOMEM      0x01000000      /* mmap on IO memory */
117  
118  enum sndrv_pcm_state {
119         SNDRV_PCM_STATE_OPEN = 0,       /* stream is open */
120 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/control.h linux-libc-headers-2.6.8.0/include/sound/control.h
121 --- linux-libc-headers-2.6.8.0.orig/include/sound/control.h     2004-08-18 20:07:05.000000000 +0200
122 +++ linux-libc-headers-2.6.8.0/include/sound/control.h  2004-08-20 08:04:48.265206920 +0200
123 @@ -35,8 +35,7 @@
124  typedef enum sndrv_ctl_event_type snd_ctl_event_type_t;
125  typedef struct sndrv_ctl_event snd_ctl_event_t;
126  
127 -#define _snd_kcontrol_chip(kcontrol) ((kcontrol)->private_data)
128 -#define snd_kcontrol_chip(kcontrol) snd_magic_cast1(chip_t, _snd_kcontrol_chip(kcontrol), return -ENXIO)
129 +#define snd_kcontrol_chip(kcontrol) ((kcontrol)->private_data)
130  
131  typedef int (snd_kcontrol_info_t) (snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo);
132  typedef int (snd_kcontrol_get_t) (snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol);
133 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/cs46xx.h linux-libc-headers-2.6.8.0/include/sound/cs46xx.h
134 --- linux-libc-headers-2.6.8.0.orig/include/sound/cs46xx.h      2004-08-18 20:07:05.000000000 +0200
135 +++ linux-libc-headers-2.6.8.0/include/sound/cs46xx.h   2004-08-20 08:04:48.269206312 +0200
136 @@ -24,6 +24,7 @@
137   */
138  
139  #include "pcm.h"
140 +#include "pcm-indirect.h"
141  #include "rawmidi.h"
142  #include "ac97_codec.h"
143  #include "cs46xx_dsp_spos.h"
144 @@ -1650,14 +1651,7 @@
145    
146         unsigned int ctl;
147         unsigned int shift;     /* Shift count to trasform frames in bytes */
148 -       unsigned int sw_bufsize;
149 -       unsigned int sw_data;   /* Offset to next dst (or src) in sw ring buffer */
150 -       unsigned int sw_io;
151 -       int sw_ready;           /* Bytes ready to be transferred to/from hw */
152 -       unsigned int hw_data;   /* Offset to next dst (or src) in hw ring buffer */
153 -       unsigned int hw_io;     /* Ring buffer hw pointer */
154 -       int hw_ready;           /* Bytes ready for play (or captured) in hw ring buffer */
155 -       size_t appl_ptr;        /* Last seen appl_ptr */
156 +       snd_pcm_indirect_t pcm_rec;
157         snd_pcm_substream_t *substream;
158  
159         pcm_channel_descriptor_t * pcm_channel;
160 @@ -1695,14 +1689,7 @@
161  
162                 unsigned int ctl;
163                 unsigned int shift;     /* Shift count to trasform frames in bytes */
164 -               unsigned int sw_bufsize;
165 -               unsigned int sw_data;   /* Offset to next dst (or src) in sw ring buffer */
166 -               unsigned int sw_io;
167 -               int sw_ready;           /* Bytes ready to be transferred to/from hw */
168 -               unsigned int hw_data;   /* Offset to next dst (or src) in hw ring buffer */
169 -               unsigned int hw_io;     /* Ring buffer hw pointer */
170 -               int hw_ready;           /* Bytes ready for play (or captured) in hw ring buffer */
171 -               size_t appl_ptr;        /* Last seen appl_ptr */
172 +               snd_pcm_indirect_t pcm_rec;
173                 snd_pcm_substream_t *substream;
174         } capt;
175  
176 @@ -1723,8 +1710,6 @@
177         unsigned int midcr;
178         unsigned int uartm;
179  
180 -       struct snd_dma_device dma_dev;
181 -
182         int amplifier;
183         void (*amplifier_ctrl)(cs46xx_t *, int);
184         void (*active_ctrl)(cs46xx_t *, int);
185 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/emu10k1.h linux-libc-headers-2.6.8.0/include/sound/emu10k1.h
186 --- linux-libc-headers-2.6.8.0.orig/include/sound/emu10k1.h     2004-08-18 20:07:05.000000000 +0200
187 +++ linux-libc-headers-2.6.8.0/include/sound/emu10k1.h  2004-08-20 08:04:48.272205856 +0200
188 @@ -23,7 +23,6 @@
189   *
190   */
191  
192 -
193  /*
194   * ---- FX8010 ----
195   */
196 @@ -115,6 +114,8 @@
197  #define FXBUS_PCM_RIGHT_FRONT  0x09
198  #define FXBUS_MIDI_REVERB      0x0c
199  #define FXBUS_MIDI_CHORUS      0x0d
200 +#define FXBUS_PCM_LEFT_SIDE    0x0e
201 +#define FXBUS_PCM_RIGHT_SIDE   0x0f
202  #define FXBUS_PT_LEFT          0x14
203  #define FXBUS_PT_RIGHT         0x15
204  
205 @@ -180,8 +181,8 @@
206  #define A_EXTOUT_AFRONT_R      0x09    /*              right */
207  #define A_EXTOUT_ACENTER       0x0a    /* analog center */
208  #define A_EXTOUT_ALFE          0x0b    /* analog LFE */
209 -/* 0x0c ?? */
210 -/* 0x0d ?? */
211 +#define A_EXTOUT_ASIDE_L       0x0c    /* analog side left  - Audigy 2 ZS */
212 +#define A_EXTOUT_ASIDE_R       0x0d    /*             right - Audigy 2 ZS */
213  #define A_EXTOUT_AREAR_L       0x0e    /* analog rear left */
214  #define A_EXTOUT_AREAR_R       0x0f    /*             right */
215  #define A_EXTOUT_AC97_L                0x10    /* AC97 left (front) */
216 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/es1688.h linux-libc-headers-2.6.8.0/include/sound/es1688.h
217 --- linux-libc-headers-2.6.8.0.orig/include/sound/es1688.h      2004-08-18 20:07:05.000000000 +0200
218 +++ linux-libc-headers-2.6.8.0/include/sound/es1688.h   2004-08-20 08:04:48.274205552 +0200
219 @@ -55,8 +55,6 @@
220  
221  typedef struct _snd_es1688 es1688_t;
222  
223 -#define chip_t es1688_t
224 -
225  /* I/O ports */
226  
227  #define ES1688P(codec, x) ((codec)->port + e_s_s_ESS1688##x)
228 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/info.h linux-libc-headers-2.6.8.0/include/sound/info.h
229 --- linux-libc-headers-2.6.8.0.orig/include/sound/info.h        2004-08-18 20:16:07.000000000 +0200
230 +++ linux-libc-headers-2.6.8.0/include/sound/info.h     2004-08-20 08:04:48.277205096 +0200
231 @@ -91,9 +91,12 @@
232  
233  extern int snd_info_check_reserved_words(const char *str);
234  
235 -#ifdef CONFIG_SND_OSSEMUL
236 +#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
237  extern int snd_info_minor_register(void);
238  extern int snd_info_minor_unregister(void);
239 +#else
240 +#define snd_info_minor_register() /* NOP */
241 +#define snd_info_minor_unregister() /* NOP */
242  #endif
243  
244  
245 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/initval.h linux-libc-headers-2.6.8.0/include/sound/initval.h
246 --- linux-libc-headers-2.6.8.0.orig/include/sound/initval.h     2004-08-18 20:07:05.000000000 +0200
247 +++ linux-libc-headers-2.6.8.0/include/sound/initval.h  2004-08-20 08:04:48.279204792 +0200
248 @@ -21,20 +21,6 @@
249   *
250   */
251  
252 -#ifndef MODULE_GENERIC_STRING
253 -#ifdef MODULE
254 -#define MODULE_GENERIC_STRING(name, string) \
255 -static const char __module_generic_string_##name [] \
256 -  __attribute__ ((unused, __section__(".modstring"))) = #name "=" string;
257 -#else
258 -#define MODULE_GENERIC_STRING(name, string)
259 -#endif
260 -#endif
261 -
262 -#define MODULE_CLASSES(val) MODULE_GENERIC_STRING(info_classes, val)
263 -#define MODULE_DEVICES(val) MODULE_GENERIC_STRING(info_devices, val)
264 -#define MODULE_PARM_SYNTAX(id, val) MODULE_GENERIC_STRING(info_parm_##id, val)
265 -
266  #define SNDRV_AUTO_PORT                1
267  #define SNDRV_AUTO_IRQ         0xffff
268  #define SNDRV_AUTO_DMA         0xffff
269 @@ -64,25 +50,6 @@
270  #define SNDRV_DEFAULT_DMA_SIZE { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA_SIZE }
271  #define SNDRV_DEFAULT_PTR      SNDRV_DEFAULT_STR
272  
273 -#define SNDRV_BOOLEAN_TRUE_DESC        "allows:{{0,Disabled},{1,Enabled}},default:1,dialog:check"
274 -#define SNDRV_BOOLEAN_FALSE_DESC "allows:{{0,Disabled},{1,Enabled}},default:0,dialog:check"
275 -
276 -#define SNDRV_ENABLED          "enable:(enable)"
277 -
278 -#define SNDRV_INDEX_DESC       SNDRV_ENABLED ",allows:{{0,7}},unique,skill:required,dialog:list"
279 -#define SNDRV_ID_DESC          SNDRV_ENABLED ",unique"
280 -#define SNDRV_ENABLE_DESC      SNDRV_BOOLEAN_FALSE_DESC
281 -#define SNDRV_ISAPNP_DESC      SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC
282 -#define SNDRV_DMA8_DESC                SNDRV_ENABLED ",allows:{{0,1},{3}},dialog:list"
283 -#define SNDRV_DMA16_DESC       SNDRV_ENABLED ",allows:{{5,7}},dialog:list"
284 -#define SNDRV_DMA_DESC         SNDRV_ENABLED ",allows:{{0,1},{3},{5,7}},dialog:list"
285 -#define SNDRV_IRQ_DESC         SNDRV_ENABLED ",allows:{{5},{7},{9},{10,12},{14,15}},dialog:list"
286 -#define SNDRV_DMA_SIZE_DESC    SNDRV_ENABLED ",allows:{{4,128}},default:64,skill:advanced"
287 -#define SNDRV_DMA8_SIZE_DESC   SNDRV_ENABLED ",allows:{{4, 64}},default:64,skill:advanced"
288 -#define SNDRV_DMA16_SIZE_DESC  SNDRV_ENABLED ",allows:{{4,128}},default:64,skill:advanced"
289 -#define SNDRV_PORT12_DESC      SNDRV_ENABLED ",allows:{{0,0x3fff}},base:16"
290 -#define SNDRV_PORT_DESC                SNDRV_ENABLED ",allows:{{0,0xffff}},base:16"
291 -
292  #ifdef SNDRV_LEGACY_AUTO_PROBE
293  static int snd_legacy_auto_probe(unsigned long *ports, int (*probe)(unsigned long port))
294  {
295 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/memalloc.h linux-libc-headers-2.6.8.0/include/sound/memalloc.h
296 --- linux-libc-headers-2.6.8.0.orig/include/sound/memalloc.h    2004-08-18 20:07:05.000000000 +0200
297 +++ linux-libc-headers-2.6.8.0/include/sound/memalloc.h 2004-08-20 08:04:48.281204488 +0200
298 @@ -30,9 +30,8 @@
299   * buffer device info
300   */
301  struct snd_dma_device {
302 -       int type;                       /* SNDRV_MEM_TYPE_XXX */
303 +       int type;                       /* SNDRV_DMA_TYPE_XXX */
304         struct device *dev;             /* generic device */
305 -       unsigned int id;                /* a unique ID */
306  };
307  
308  #ifndef snd_dma_pci_data
309 @@ -56,6 +55,7 @@
310   * info for buffer allocation
311   */
312  struct snd_dma_buffer {
313 +       struct snd_dma_device dev;      /* device type */
314         unsigned char *area;    /* virtual pointer */
315         dma_addr_t addr;        /* physical address */
316         size_t bytes;           /* buffer size in bytes */
317 @@ -76,7 +76,7 @@
318         int tblsize;    /* allocated table size */
319         struct snd_sg_page *table;      /* address table */
320         struct page **page_table;       /* page table (for vmap/vunmap) */
321 -       struct snd_dma_device dev;
322 +       struct device *dev;
323  };
324  
325  /*
326 @@ -97,20 +97,21 @@
327  
328  
329  /* allocate/release a buffer */
330 -int snd_dma_alloc_pages(const struct snd_dma_device *dev, size_t size,
331 +int snd_dma_alloc_pages(int type, struct device *dev, size_t size,
332                         struct snd_dma_buffer *dmab);
333 -int snd_dma_alloc_pages_fallback(const struct snd_dma_device *dev, size_t size,
334 +int snd_dma_alloc_pages_fallback(int type, struct device *dev, size_t size,
335                                   struct snd_dma_buffer *dmab);
336 -void snd_dma_free_pages(const struct snd_dma_device *dev, struct snd_dma_buffer *dmab);
337 +void snd_dma_free_pages(struct snd_dma_buffer *dmab);
338  
339  /* buffer-preservation managements */
340 -size_t snd_dma_get_reserved(const struct snd_dma_device *dev, struct snd_dma_buffer *dmab);
341 -int snd_dma_free_reserved(const struct snd_dma_device *dev);
342 -int snd_dma_set_reserved(const struct snd_dma_device *dev, struct snd_dma_buffer *dmab);
343 +
344 +#define snd_dma_pci_buf_id(pci)        (((unsigned int)(pci)->vendor << 16) | (pci)->device)
345 +
346 +size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id);
347 +int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id);
348  
349  /* basic memory allocation functions */
350  void *snd_malloc_pages(size_t size, unsigned int gfp_flags);
351 -void *snd_malloc_pages_fallback(size_t size, unsigned int gfp_flags, size_t *res_size);
352  void snd_free_pages(void *ptr, size_t size);
353  
354  #endif /* __SOUND_MEMALLOC_H */
355 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/pcm.h linux-libc-headers-2.6.8.0/include/sound/pcm.h
356 --- linux-libc-headers-2.6.8.0.orig/include/sound/pcm.h 2004-08-18 20:07:05.000000000 +0200
357 +++ linux-libc-headers-2.6.8.0/include/sound/pcm.h      2004-08-20 08:04:48.286203728 +0200
358 @@ -52,10 +52,8 @@
359  typedef struct sndrv_mask snd_mask_t;
360  typedef struct snd_sg_buf snd_pcm_sgbuf_t;
361  
362 -#define _snd_pcm_substream_chip(substream) ((substream)->private_data)
363 -#define snd_pcm_substream_chip(substream) snd_magic_cast1(chip_t, _snd_pcm_substream_chip(substream), return -ENXIO)
364 -#define _snd_pcm_chip(pcm) ((pcm)->private_data)
365 -#define snd_pcm_chip(pcm) snd_magic_cast1(chip_t, _snd_pcm_chip(pcm), return -ENXIO)
366 +#define snd_pcm_substream_chip(substream) ((substream)->private_data)
367 +#define snd_pcm_chip(pcm) ((pcm)->private_data)
368  
369  typedef struct _snd_pcm_file snd_pcm_file_t;
370  typedef struct _snd_pcm_runtime snd_pcm_runtime_t;
371 @@ -123,6 +121,8 @@
372  #define SNDRV_PCM_TRIGGER_SUSPEND      5
373  #define SNDRV_PCM_TRIGGER_RESUME       6
374  
375 +#define SNDRV_PCM_POS_XRUN             ((snd_pcm_uframes_t)-1)
376 +
377  /* If you change this don't forget to change rates[] table in pcm_native.c */
378  #define SNDRV_PCM_RATE_5512            (1<<0)          /* 5512Hz */
379  #define SNDRV_PCM_RATE_8000            (1<<1)          /* 8000Hz */
380 @@ -351,7 +351,8 @@
381         unsigned char *dma_area;        /* DMA area */
382         dma_addr_t dma_addr;            /* physical bus address (not accessible from main CPU) */
383         size_t dma_bytes;               /* size of DMA area */
384 -       void *dma_private;              /* private DMA data for the memory allocator */
385 +
386 +       struct snd_dma_buffer *dma_buffer_p;    /* allocated buffer */
387  
388  #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
389         /* -- OSS things -- */
390 @@ -372,8 +373,8 @@
391         char name[32];                  /* substream name */
392         int stream;                     /* stream (direction) */
393         size_t buffer_bytes_max;        /* limit ring buffer size */
394 -       struct snd_dma_device dma_device;
395         struct snd_dma_buffer dma_buffer;
396 +       unsigned int dma_buf_id;
397         size_t dma_max;
398         /* -- hardware operations -- */
399         unsigned int open_flag: 1;      /* lowlevel device has been opened */
400 @@ -851,7 +852,7 @@
401  int snd_pcm_format_big_endian(snd_pcm_format_t format);
402  int snd_pcm_format_width(snd_pcm_format_t format);                     /* in bits */
403  int snd_pcm_format_physical_width(snd_pcm_format_t format);            /* in bits */
404 -u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format);
405 +const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format);
406  int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames);
407  snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian);
408  ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples);
409 @@ -881,7 +882,8 @@
410  void snd_pcm_tick_elapsed(snd_pcm_substream_t *substream);
411  void snd_pcm_period_elapsed(snd_pcm_substream_t *substream);
412  snd_pcm_sframes_t snd_pcm_lib_write(snd_pcm_substream_t *substream,
413 -                                   const void *buf, snd_pcm_uframes_t frames);
414 +                                   const void *buf,
415 +                                   snd_pcm_uframes_t frames);
416  snd_pcm_sframes_t snd_pcm_lib_read(snd_pcm_substream_t *substream,
417                                    void *buf, snd_pcm_uframes_t frames);
418  snd_pcm_sframes_t snd_pcm_lib_writev(snd_pcm_substream_t *substream,
419 @@ -891,6 +893,22 @@
420  
421  int snd_pcm_limit_hw_rates(snd_pcm_runtime_t *runtime);
422  
423 +static inline void snd_pcm_set_runtime_buffer(snd_pcm_substream_t *substream,
424 +                                             struct snd_dma_buffer *bufp)
425 +{
426 +       snd_pcm_runtime_t *runtime = substream->runtime;
427 +       if (bufp) {
428 +               runtime->dma_buffer_p = bufp;
429 +               runtime->dma_area = bufp->area;
430 +               runtime->dma_addr = bufp->addr;
431 +               runtime->dma_bytes = bufp->bytes;
432 +       } else {
433 +               runtime->dma_buffer_p = NULL;
434 +               runtime->dma_area = NULL;
435 +               runtime->dma_addr = 0;
436 +               runtime->dma_bytes = 0;
437 +       }
438 +}
439  
440  /*
441   *  Timer interface
442 @@ -915,7 +933,7 @@
443  int snd_pcm_lib_malloc_pages(snd_pcm_substream_t *substream, size_t size);
444  int snd_pcm_lib_free_pages(snd_pcm_substream_t *substream);
445  
446 -#define snd_pcm_substream_sgbuf(substream) ((substream)->runtime->dma_private)
447 +#define snd_pcm_substream_sgbuf(substream) ((substream)->runtime->dma_buffer_p->private_data)
448  #define snd_pcm_sgbuf_pages(size) snd_sgbuf_aligned_pages(size)
449  #define snd_pcm_sgbuf_get_addr(sgbuf,ofs) snd_sgbuf_get_addr(sgbuf,ofs)
450  struct page *snd_pcm_sgbuf_ops_page(snd_pcm_substream_t *substream, unsigned long offset);
451 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/pcm-indirect.h linux-libc-headers-2.6.8.0/include/sound/pcm-indirect.h
452 --- linux-libc-headers-2.6.8.0.orig/include/sound/pcm-indirect.h        1970-01-01 01:00:00.000000000 +0100
453 +++ linux-libc-headers-2.6.8.0/include/sound/pcm-indirect.h     2004-08-20 08:04:48.288203424 +0200
454 @@ -0,0 +1,177 @@
455 +/*
456 + * Helper functions for indirect PCM data transfer
457 + *
458 + *  Copyright (c) by Takashi Iwai <tiwai@suse.de>
459 + *                   Jaroslav Kysela <perex@suse.cz>
460 + *
461 + *   This program is free software; you can redistribute it and/or modify
462 + *   it under the terms of the GNU General Public License as published by
463 + *   the Free Software Foundation; either version 2 of the License, or
464 + *   (at your option) any later version.
465 + *
466 + *   This program is distributed in the hope that it will be useful,
467 + *   but WITHOUT ANY WARRANTY; without even the implied warranty of
468 + *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
469 + *   GNU General Public License for more details.
470 + *
471 + *   You should have received a copy of the GNU General Public License
472 + *   along with this program; if not, write to the Free Software
473 + *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
474 + */
475 +
476 +#ifndef __SOUND_PCM_INDIRECT_H
477 +#define __SOUND_PCM_INDIRECT_H
478 +
479 +#include <sound/pcm.h>
480 +
481 +typedef struct sndrv_pcm_indirect {
482 +       unsigned int hw_buffer_size;    /* Byte size of hardware buffer */
483 +       unsigned int hw_queue_size;     /* Max queue size of hw buffer (0 = buffer size) */
484 +       unsigned int hw_data;   /* Offset to next dst (or src) in hw ring buffer */
485 +       unsigned int hw_io;     /* Ring buffer hw pointer */
486 +       int hw_ready;           /* Bytes ready for play (or captured) in hw ring buffer */
487 +       unsigned int sw_buffer_size;    /* Byte size of software buffer */
488 +       unsigned int sw_data;   /* Offset to next dst (or src) in sw ring buffer */
489 +       unsigned int sw_io;     /* Current software pointer in bytes */
490 +       int sw_ready;           /* Bytes ready to be transferred to/from hw */
491 +       snd_pcm_uframes_t appl_ptr;     /* Last seen appl_ptr */
492 +} snd_pcm_indirect_t;
493 +
494 +typedef void (*snd_pcm_indirect_copy_t)(snd_pcm_substream_t *substream,
495 +                                       snd_pcm_indirect_t *rec, size_t bytes);
496 +
497 +/*
498 + * helper function for playback ack callback
499 + */
500 +static inline void
501 +snd_pcm_indirect_playback_transfer(snd_pcm_substream_t *substream,
502 +                                  snd_pcm_indirect_t *rec,
503 +                                  snd_pcm_indirect_copy_t copy)
504 +{
505 +       snd_pcm_runtime_t *runtime = substream->runtime;
506 +       snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr;
507 +       snd_pcm_sframes_t diff = appl_ptr - rec->appl_ptr;
508 +       int qsize;
509 +
510 +       if (diff) {
511 +               if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2))
512 +                       diff += runtime->boundary;
513 +               rec->sw_ready += (int)frames_to_bytes(runtime, diff);
514 +               rec->appl_ptr = appl_ptr;
515 +       }
516 +       qsize = rec->hw_queue_size ? rec->hw_queue_size : rec->hw_buffer_size;
517 +       while (rec->hw_ready < qsize && rec->sw_ready > 0) {
518 +               unsigned int hw_to_end = rec->hw_buffer_size - rec->hw_data;
519 +               unsigned int sw_to_end = rec->sw_buffer_size - rec->sw_data;
520 +               unsigned int bytes = qsize - rec->hw_ready;
521 +               if (rec->sw_ready < (int)bytes)
522 +                       bytes = rec->sw_ready;
523 +               if (hw_to_end < bytes)
524 +                       bytes = hw_to_end;
525 +               if (sw_to_end < bytes)
526 +                       bytes = sw_to_end;
527 +               if (! bytes)
528 +                       break;
529 +               copy(substream, rec, bytes);
530 +               rec->hw_data += bytes;
531 +               if (rec->hw_data == rec->hw_buffer_size)
532 +                       rec->hw_data = 0;
533 +               rec->sw_data += bytes;
534 +               if (rec->sw_data == rec->sw_buffer_size)
535 +                       rec->sw_data = 0;
536 +               rec->hw_ready += bytes;
537 +               rec->sw_ready -= bytes;
538 +       }
539 +}
540 +
541 +/*
542 + * helper function for playback pointer callback
543 + * ptr = current byte pointer
544 + */
545 +static inline snd_pcm_uframes_t
546 +snd_pcm_indirect_playback_pointer(snd_pcm_substream_t *substream,
547 +                                 snd_pcm_indirect_t *rec, unsigned int ptr)
548 +{
549 +       int bytes = ptr - rec->hw_io;
550 +       if (bytes < 0)
551 +               bytes += rec->hw_buffer_size;
552 +       rec->hw_io = ptr;
553 +       rec->hw_ready -= bytes;
554 +       rec->sw_io += bytes;
555 +       if (rec->sw_io >= rec->sw_buffer_size)
556 +               rec->sw_io -= rec->sw_buffer_size;
557 +       if (substream->ops->ack)
558 +               substream->ops->ack(substream);
559 +       return bytes_to_frames(substream->runtime, rec->sw_io);
560 +}
561 +
562 +
563 +/*
564 + * helper function for capture ack callback
565 + */
566 +static inline void
567 +snd_pcm_indirect_capture_transfer(snd_pcm_substream_t *substream,
568 +                                 snd_pcm_indirect_t *rec,
569 +                                 snd_pcm_indirect_copy_t copy)
570 +{
571 +       snd_pcm_runtime_t *runtime = substream->runtime;
572 +       snd_pcm_uframes_t appl_ptr = runtime->control->appl_ptr;
573 +       snd_pcm_sframes_t diff = appl_ptr - rec->appl_ptr;
574 +
575 +       if (diff) {
576 +               if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2))
577 +                       diff += runtime->boundary;
578 +               rec->sw_ready -= frames_to_bytes(runtime, diff);
579 +               rec->appl_ptr = appl_ptr;
580 +       }
581 +       while (rec->hw_ready > 0 && 
582 +              rec->sw_ready < (int)rec->sw_buffer_size) {
583 +               size_t hw_to_end = rec->hw_buffer_size - rec->hw_data;
584 +               size_t sw_to_end = rec->sw_buffer_size - rec->sw_data;
585 +               size_t bytes = rec->sw_buffer_size - rec->sw_ready;
586 +               if (rec->hw_ready < (int)bytes)
587 +                       bytes = rec->hw_ready;
588 +               if (hw_to_end < bytes)
589 +                       bytes = hw_to_end;
590 +               if (sw_to_end < bytes)
591 +                       bytes = sw_to_end;
592 +               if (! bytes)
593 +                       break;
594 +               copy(substream, rec, bytes);
595 +               rec->hw_data += bytes;
596 +               if ((int)rec->hw_data == rec->hw_buffer_size)
597 +                       rec->hw_data = 0;
598 +               rec->sw_data += bytes;
599 +               if (rec->sw_data == rec->sw_buffer_size)
600 +                       rec->sw_data = 0;
601 +               rec->hw_ready -= bytes;
602 +               rec->sw_ready += bytes;
603 +       }
604 +}
605 +
606 +/*
607 + * helper function for capture pointer callback,
608 + * ptr = current byte pointer
609 + */
610 +static inline snd_pcm_uframes_t
611 +snd_pcm_indirect_capture_pointer(snd_pcm_substream_t *substream,
612 +                                snd_pcm_indirect_t *rec, unsigned int ptr)
613 +{
614 +       int qsize;
615 +       int bytes = ptr - rec->hw_io;
616 +       if (bytes < 0)
617 +               bytes += rec->hw_buffer_size;
618 +       rec->hw_io = ptr;
619 +       rec->hw_ready += bytes;
620 +       qsize = rec->hw_queue_size ? rec->hw_queue_size : rec->hw_buffer_size;
621 +       if (rec->hw_ready > qsize)
622 +               return SNDRV_PCM_POS_XRUN;
623 +       rec->sw_io += bytes;
624 +       if (rec->sw_io >= rec->sw_buffer_size)
625 +               rec->sw_io -= rec->sw_buffer_size;
626 +       if (substream->ops->ack)
627 +               substream->ops->ack(substream);
628 +       return bytes_to_frames(substream->runtime, rec->sw_io);
629 +}
630 +
631 +#endif /* __SOUND_PCM_INDIRECT_H */
632 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/sb16_csp.h linux-libc-headers-2.6.8.0/include/sound/sb16_csp.h
633 --- linux-libc-headers-2.6.8.0.orig/include/sound/sb16_csp.h    2004-08-18 20:07:05.000000000 +0200
634 +++ linux-libc-headers-2.6.8.0/include/sound/sb16_csp.h 2004-08-20 08:04:48.290203120 +0200
635 @@ -111,5 +111,4 @@
636  /* restart CSP and DMA transfer */
637  #define SNDRV_SB_CSP_IOCTL_RESTART     _IO('H', 0x16)
638  
639 -
640  #endif /* __SOUND_SB16_CSP */
641 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/seq_kernel.h linux-libc-headers-2.6.8.0/include/sound/seq_kernel.h
642 --- linux-libc-headers-2.6.8.0.orig/include/sound/seq_kernel.h  2004-08-18 20:07:05.000000000 +0200
643 +++ linux-libc-headers-2.6.8.0/include/sound/seq_kernel.h       2004-08-20 08:04:48.292202816 +0200
644 @@ -168,6 +168,9 @@
645  int snd_seq_expand_var_event(const snd_seq_event_t *event, int count, char *buf, int in_kernel, int size_aligned);
646  int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t func, void *private_data);
647  
648 +/* interface for OSS emulation */
649 +int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo);
650 +
651  /* port callback routines */
652  void snd_port_init_callback(snd_seq_port_callback_t *p);
653  snd_seq_port_callback_t *snd_port_alloc_callback(void);
654 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/soundfont.h linux-libc-headers-2.6.8.0/include/sound/soundfont.h
655 --- linux-libc-headers-2.6.8.0.orig/include/sound/soundfont.h   2004-08-18 20:07:05.000000000 +0200
656 +++ linux-libc-headers-2.6.8.0/include/sound/soundfont.h        2004-08-20 08:04:48.293202664 +0200
657 @@ -95,6 +95,7 @@
658         int zone_locked;        /* locked time for zone */
659         int sample_locked;      /* locked time for sample */
660         snd_sf_callback_t callback;     /* callback functions */
661 +       int presets_locked;
662         struct semaphore presets_mutex;
663         spinlock_t lock;
664         snd_util_memhdr_t *memhdr;
665 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/timer.h linux-libc-headers-2.6.8.0/include/sound/timer.h
666 --- linux-libc-headers-2.6.8.0.orig/include/sound/timer.h       2004-08-18 20:07:05.000000000 +0200
667 +++ linux-libc-headers-2.6.8.0/include/sound/timer.h    2004-08-20 08:04:48.295202360 +0200
668 @@ -40,8 +40,7 @@
669  typedef struct sndrv_timer_read snd_timer_read_t;
670  typedef struct sndrv_timer_tread snd_timer_tread_t;
671  
672 -#define _snd_timer_chip(timer) ((timer)->private_data)
673 -#define snd_timer_chip(timer) snd_magic_cast1(chip_t, _snd_timer_chip(timer), return -ENXIO)
674 +#define snd_timer_chip(timer) ((timer)->private_data)
675  
676  #define SNDRV_TIMER_DEVICES    16
677  
678 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/trident.h linux-libc-headers-2.6.8.0/include/sound/trident.h
679 --- linux-libc-headers-2.6.8.0.orig/include/sound/trident.h     2004-08-18 20:07:05.000000000 +0200
680 +++ linux-libc-headers-2.6.8.0/include/sound/trident.h  2004-08-20 08:04:48.305200840 +0200
681 @@ -398,7 +398,6 @@
682          unsigned char  bDMAStart;
683  
684         unsigned long port;
685 -       struct resource *res_port;
686         unsigned long midi_port;
687  
688         unsigned int spurious_irq_count;
689 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/version.h linux-libc-headers-2.6.8.0/include/sound/version.h
690 --- linux-libc-headers-2.6.8.0.orig/include/sound/version.h     2004-08-18 20:07:05.000000000 +0200
691 +++ linux-libc-headers-2.6.8.0/include/sound/version.h  2004-08-20 08:04:48.307200536 +0200
692 @@ -1,3 +1,3 @@
693  /* include/version.h.  Generated by configure.  */
694 -#define CONFIG_SND_VERSION "1.0.4"
695 -#define CONFIG_SND_DATE " (Mon May 17 14:31:44 2004 UTC)"
696 +#define CONFIG_SND_VERSION "1.0.6"
697 +#define CONFIG_SND_DATE " (Sun Aug 15 07:17:53 2004 UTC)"
698 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/vx_core.h linux-libc-headers-2.6.8.0/include/sound/vx_core.h
699 --- linux-libc-headers-2.6.8.0.orig/include/sound/vx_core.h     2004-08-18 20:07:05.000000000 +0200
700 +++ linux-libc-headers-2.6.8.0/include/sound/vx_core.h  2004-08-20 08:04:48.309200232 +0200
701 @@ -182,6 +182,7 @@
702         /* clock and audio sources */
703         unsigned int audio_source;      /* current audio input source */
704         unsigned int audio_source_target;
705 +       unsigned int clock_mode;        /* clock mode (VX_CLOCK_MODE_XXX) */
706         unsigned int clock_source;      /* current clock source (INTERNAL_QUARTZ or UER_SYNC) */
707         unsigned int freq;              /* current frequency */
708         unsigned int freq_detected;     /* detected frequency from digital in */
709 @@ -364,6 +365,13 @@
710         UER_SYNC
711  };
712  
713 +/* clock mode */
714 +enum {
715 +       VX_CLOCK_MODE_AUTO,     /* depending on the current audio source */
716 +       VX_CLOCK_MODE_INTERNAL, /* fixed to internal quartz */
717 +       VX_CLOCK_MODE_EXTERNAL  /* fixed to UER sync */
718 +};
719 +
720  /* SPDIF/UER type */
721  enum {
722         VX_UER_MODE_CONSUMER,
723 diff -uNr linux-libc-headers-2.6.8.0.orig/include/sound/ymfpci.h linux-libc-headers-2.6.8.0/include/sound/ymfpci.h
724 --- linux-libc-headers-2.6.8.0.orig/include/sound/ymfpci.h      2004-08-18 20:07:05.000000000 +0200
725 +++ linux-libc-headers-2.6.8.0/include/sound/ymfpci.h   2004-08-20 08:04:48.311199928 +0200
726 @@ -316,7 +316,6 @@
727         struct gameport gameport;
728  #endif
729  
730 -       struct snd_dma_device dma_dev;
731         struct snd_dma_buffer work_ptr;
732  
733         unsigned int bank_size_playback;
This page took 0.086376 seconds and 3 git commands to generate.