diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-10-06 11:01:27 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-10-06 11:01:27 -0400 |
commit | 907bc6c7fc7071b00083fc11e510e47dd93df45d (patch) | |
tree | 0697a608561522c00da9e1814974a2eb051bb96d /include/sound | |
parent | d2b247a8be57647d1745535acd58169fbcbe431a (diff) | |
parent | 2a0f5cb32772e9a9560209e241a80bfbbc31dbc3 (diff) |
Merge branch 'for-2.6.32' into for-2.6.33
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/asound.h | 2 | ||||
-rw-r--r-- | include/sound/core.h | 51 | ||||
-rw-r--r-- | include/sound/info.h | 4 | ||||
-rw-r--r-- | include/sound/memalloc.h | 6 | ||||
-rw-r--r-- | include/sound/pcm.h | 25 | ||||
-rw-r--r-- | include/sound/tlv.h | 14 | ||||
-rw-r--r-- | include/sound/version.h | 2 | ||||
-rw-r--r-- | include/sound/ymfpci.h | 1 |
8 files changed, 64 insertions, 41 deletions
diff --git a/include/sound/asound.h b/include/sound/asound.h index 82aed3f47534..1f57bb92eb5a 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h | |||
@@ -138,7 +138,7 @@ struct snd_hwdep_dsp_image { | |||
138 | * * | 138 | * * |
139 | *****************************************************************************/ | 139 | *****************************************************************************/ |
140 | 140 | ||
141 | #define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 9) | 141 | #define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 10) |
142 | 142 | ||
143 | typedef unsigned long snd_pcm_uframes_t; | 143 | typedef unsigned long snd_pcm_uframes_t; |
144 | typedef signed long snd_pcm_sframes_t; | 144 | typedef signed long snd_pcm_sframes_t; |
diff --git a/include/sound/core.h b/include/sound/core.h index 309cb9659a05..a61499c22b0b 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -93,15 +93,6 @@ struct snd_device { | |||
93 | 93 | ||
94 | #define snd_device(n) list_entry(n, struct snd_device, list) | 94 | #define snd_device(n) list_entry(n, struct snd_device, list) |
95 | 95 | ||
96 | /* monitor files for graceful shutdown (hotplug) */ | ||
97 | |||
98 | struct snd_monitor_file { | ||
99 | struct file *file; | ||
100 | const struct file_operations *disconnected_f_op; | ||
101 | struct list_head shutdown_list; /* still need to shutdown */ | ||
102 | struct list_head list; /* link of monitor files */ | ||
103 | }; | ||
104 | |||
105 | /* main structure for soundcard */ | 96 | /* main structure for soundcard */ |
106 | 97 | ||
107 | struct snd_card { | 98 | struct snd_card { |
@@ -311,9 +302,7 @@ int snd_component_add(struct snd_card *card, const char *component); | |||
311 | int snd_card_file_add(struct snd_card *card, struct file *file); | 302 | int snd_card_file_add(struct snd_card *card, struct file *file); |
312 | int snd_card_file_remove(struct snd_card *card, struct file *file); | 303 | int snd_card_file_remove(struct snd_card *card, struct file *file); |
313 | 304 | ||
314 | #ifndef snd_card_set_dev | ||
315 | #define snd_card_set_dev(card, devptr) ((card)->dev = (devptr)) | 305 | #define snd_card_set_dev(card, devptr) ((card)->dev = (devptr)) |
316 | #endif | ||
317 | 306 | ||
318 | /* device.c */ | 307 | /* device.c */ |
319 | 308 | ||
@@ -340,18 +329,17 @@ unsigned int snd_dma_pointer(unsigned long dma, unsigned int size); | |||
340 | struct resource; | 329 | struct resource; |
341 | void release_and_free_resource(struct resource *res); | 330 | void release_and_free_resource(struct resource *res); |
342 | 331 | ||
343 | #ifdef CONFIG_SND_VERBOSE_PRINTK | ||
344 | void snd_verbose_printk(const char *file, int line, const char *format, ...) | ||
345 | __attribute__ ((format (printf, 3, 4))); | ||
346 | #endif | ||
347 | #if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK) | ||
348 | void snd_verbose_printd(const char *file, int line, const char *format, ...) | ||
349 | __attribute__ ((format (printf, 3, 4))); | ||
350 | #endif | ||
351 | |||
352 | /* --- */ | 332 | /* --- */ |
353 | 333 | ||
354 | #ifdef CONFIG_SND_VERBOSE_PRINTK | 334 | #if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) |
335 | void __snd_printk(unsigned int level, const char *file, int line, | ||
336 | const char *format, ...) | ||
337 | __attribute__ ((format (printf, 4, 5))); | ||
338 | #else | ||
339 | #define __snd_printk(level, file, line, format, args...) \ | ||
340 | printk(format, ##args) | ||
341 | #endif | ||
342 | |||
355 | /** | 343 | /** |
356 | * snd_printk - printk wrapper | 344 | * snd_printk - printk wrapper |
357 | * @fmt: format string | 345 | * @fmt: format string |
@@ -360,15 +348,9 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
360 | * when configured with CONFIG_SND_VERBOSE_PRINTK. | 348 | * when configured with CONFIG_SND_VERBOSE_PRINTK. |
361 | */ | 349 | */ |
362 | #define snd_printk(fmt, args...) \ | 350 | #define snd_printk(fmt, args...) \ |
363 | snd_verbose_printk(__FILE__, __LINE__, fmt ,##args) | 351 | __snd_printk(0, __FILE__, __LINE__, fmt, ##args) |
364 | #else | ||
365 | #define snd_printk(fmt, args...) \ | ||
366 | printk(fmt ,##args) | ||
367 | #endif | ||
368 | 352 | ||
369 | #ifdef CONFIG_SND_DEBUG | 353 | #ifdef CONFIG_SND_DEBUG |
370 | |||
371 | #ifdef CONFIG_SND_VERBOSE_PRINTK | ||
372 | /** | 354 | /** |
373 | * snd_printd - debug printk | 355 | * snd_printd - debug printk |
374 | * @fmt: format string | 356 | * @fmt: format string |
@@ -377,11 +359,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
377 | * Ignored when CONFIG_SND_DEBUG is not set. | 359 | * Ignored when CONFIG_SND_DEBUG is not set. |
378 | */ | 360 | */ |
379 | #define snd_printd(fmt, args...) \ | 361 | #define snd_printd(fmt, args...) \ |
380 | snd_verbose_printd(__FILE__, __LINE__, fmt ,##args) | 362 | __snd_printk(1, __FILE__, __LINE__, fmt, ##args) |
381 | #else | ||
382 | #define snd_printd(fmt, args...) \ | ||
383 | printk(fmt ,##args) | ||
384 | #endif | ||
385 | 363 | ||
386 | /** | 364 | /** |
387 | * snd_BUG - give a BUG warning message and stack trace | 365 | * snd_BUG - give a BUG warning message and stack trace |
@@ -428,9 +406,10 @@ static inline int __snd_bug_on(int cond) | |||
428 | * Works like snd_printk() for debugging purposes. | 406 | * Works like snd_printk() for debugging purposes. |
429 | * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set. | 407 | * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set. |
430 | */ | 408 | */ |
431 | #define snd_printdd(format, args...) snd_printk(format, ##args) | 409 | #define snd_printdd(format, args...) \ |
410 | __snd_printk(2, __FILE__, __LINE__, format, ##args) | ||
432 | #else | 411 | #else |
433 | #define snd_printdd(format, args...) /* nothing */ | 412 | #define snd_printdd(format, args...) do { } while (0) |
434 | #endif | 413 | #endif |
435 | 414 | ||
436 | 415 | ||
@@ -438,12 +417,10 @@ static inline int __snd_bug_on(int cond) | |||
438 | 417 | ||
439 | /* for easier backward-porting */ | 418 | /* for easier backward-porting */ |
440 | #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE) | 419 | #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE) |
441 | #ifndef gameport_set_dev_parent | ||
442 | #define gameport_set_dev_parent(gp,xdev) ((gp)->dev.parent = (xdev)) | 420 | #define gameport_set_dev_parent(gp,xdev) ((gp)->dev.parent = (xdev)) |
443 | #define gameport_set_port_data(gp,r) ((gp)->port_data = (r)) | 421 | #define gameport_set_port_data(gp,r) ((gp)->port_data = (r)) |
444 | #define gameport_get_port_data(gp) (gp)->port_data | 422 | #define gameport_get_port_data(gp) (gp)->port_data |
445 | #endif | 423 | #endif |
446 | #endif | ||
447 | 424 | ||
448 | /* PCI quirk list helper */ | 425 | /* PCI quirk list helper */ |
449 | struct snd_pci_quirk { | 426 | struct snd_pci_quirk { |
diff --git a/include/sound/info.h b/include/sound/info.h index 7c2ee1a21b00..112e8949e1a7 100644 --- a/include/sound/info.h +++ b/include/sound/info.h | |||
@@ -110,13 +110,13 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer); | |||
110 | static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {} | 110 | static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {} |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | int snd_iprintf(struct snd_info_buffer *buffer, char *fmt, ...) \ | 113 | int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...) \ |
114 | __attribute__ ((format (printf, 2, 3))); | 114 | __attribute__ ((format (printf, 2, 3))); |
115 | int snd_info_init(void); | 115 | int snd_info_init(void); |
116 | int snd_info_done(void); | 116 | int snd_info_done(void); |
117 | 117 | ||
118 | int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len); | 118 | int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len); |
119 | char *snd_info_get_str(char *dest, char *src, int len); | 119 | const char *snd_info_get_str(char *dest, const char *src, int len); |
120 | struct snd_info_entry *snd_info_create_module_entry(struct module *module, | 120 | struct snd_info_entry *snd_info_create_module_entry(struct module *module, |
121 | const char *name, | 121 | const char *name, |
122 | struct snd_info_entry *parent); | 122 | struct snd_info_entry *parent); |
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h index 7ccce94a5255..c42506212649 100644 --- a/include/sound/memalloc.h +++ b/include/sound/memalloc.h | |||
@@ -47,7 +47,11 @@ struct snd_dma_device { | |||
47 | #define SNDRV_DMA_TYPE_UNKNOWN 0 /* not defined */ | 47 | #define SNDRV_DMA_TYPE_UNKNOWN 0 /* not defined */ |
48 | #define SNDRV_DMA_TYPE_CONTINUOUS 1 /* continuous no-DMA memory */ | 48 | #define SNDRV_DMA_TYPE_CONTINUOUS 1 /* continuous no-DMA memory */ |
49 | #define SNDRV_DMA_TYPE_DEV 2 /* generic device continuous */ | 49 | #define SNDRV_DMA_TYPE_DEV 2 /* generic device continuous */ |
50 | #ifdef CONFIG_SND_DMA_SGBUF | ||
50 | #define SNDRV_DMA_TYPE_DEV_SG 3 /* generic device SG-buffer */ | 51 | #define SNDRV_DMA_TYPE_DEV_SG 3 /* generic device SG-buffer */ |
52 | #else | ||
53 | #define SNDRV_DMA_TYPE_DEV_SG SNDRV_DMA_TYPE_DEV /* no SG-buf support */ | ||
54 | #endif | ||
51 | 55 | ||
52 | /* | 56 | /* |
53 | * info for buffer allocation | 57 | * info for buffer allocation |
@@ -60,6 +64,7 @@ struct snd_dma_buffer { | |||
60 | void *private_data; /* private for allocator; don't touch */ | 64 | void *private_data; /* private for allocator; don't touch */ |
61 | }; | 65 | }; |
62 | 66 | ||
67 | #ifdef CONFIG_SND_DMA_SGBUF | ||
63 | /* | 68 | /* |
64 | * Scatter-Gather generic device pages | 69 | * Scatter-Gather generic device pages |
65 | */ | 70 | */ |
@@ -107,6 +112,7 @@ static inline void *snd_sgbuf_get_ptr(struct snd_sg_buf *sgbuf, size_t offset) | |||
107 | { | 112 | { |
108 | return sgbuf->table[offset >> PAGE_SHIFT].buf + offset % PAGE_SIZE; | 113 | return sgbuf->table[offset >> PAGE_SHIFT].buf + offset % PAGE_SIZE; |
109 | } | 114 | } |
115 | #endif /* CONFIG_SND_DMA_SGBUF */ | ||
110 | 116 | ||
111 | /* allocate/release a buffer */ | 117 | /* allocate/release a buffer */ |
112 | int snd_dma_alloc_pages(int type, struct device *dev, size_t size, | 118 | int snd_dma_alloc_pages(int type, struct device *dev, size_t size, |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 23893523dc8c..de6d981de5d6 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -902,6 +902,7 @@ int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm, | |||
902 | int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size); | 902 | int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size); |
903 | int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream); | 903 | int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream); |
904 | 904 | ||
905 | #ifdef CONFIG_SND_DMA_SGBUF | ||
905 | /* | 906 | /* |
906 | * SG-buffer handling | 907 | * SG-buffer handling |
907 | */ | 908 | */ |
@@ -927,6 +928,28 @@ struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, | |||
927 | unsigned int snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream, | 928 | unsigned int snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream, |
928 | unsigned int ofs, unsigned int size); | 929 | unsigned int ofs, unsigned int size); |
929 | 930 | ||
931 | #else /* !SND_DMA_SGBUF */ | ||
932 | /* | ||
933 | * fake using a continuous buffer | ||
934 | */ | ||
935 | static inline dma_addr_t | ||
936 | snd_pcm_sgbuf_get_addr(struct snd_pcm_substream *substream, unsigned int ofs) | ||
937 | { | ||
938 | return substream->runtime->dma_addr + ofs; | ||
939 | } | ||
940 | |||
941 | static inline void * | ||
942 | snd_pcm_sgbuf_get_ptr(struct snd_pcm_substream *substream, unsigned int ofs) | ||
943 | { | ||
944 | return substream->runtime->dma_area + ofs; | ||
945 | } | ||
946 | |||
947 | #define snd_pcm_sgbuf_ops_page NULL | ||
948 | |||
949 | #define snd_pcm_sgbuf_get_chunk_size(subs, ofs, size) (size) | ||
950 | |||
951 | #endif /* SND_DMA_SGBUF */ | ||
952 | |||
930 | /* handle mmap counter - PCM mmap callback should handle this counter properly */ | 953 | /* handle mmap counter - PCM mmap callback should handle this counter properly */ |
931 | static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area) | 954 | static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area) |
932 | { | 955 | { |
@@ -965,4 +988,6 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) | |||
965 | 988 | ||
966 | #define PCM_RUNTIME_CHECK(sub) snd_BUG_ON(!(sub) || !(sub)->runtime) | 989 | #define PCM_RUNTIME_CHECK(sub) snd_BUG_ON(!(sub) || !(sub)->runtime) |
967 | 990 | ||
991 | const char *snd_pcm_format_name(snd_pcm_format_t format); | ||
992 | |||
968 | #endif /* __SOUND_PCM_H */ | 993 | #endif /* __SOUND_PCM_H */ |
diff --git a/include/sound/tlv.h b/include/sound/tlv.h index d136ea2181ed..9fd5b19ccf5c 100644 --- a/include/sound/tlv.h +++ b/include/sound/tlv.h | |||
@@ -35,6 +35,8 @@ | |||
35 | #define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */ | 35 | #define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */ |
36 | #define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */ | 36 | #define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */ |
37 | #define SNDRV_CTL_TLVT_DB_RANGE 3 /* dB range container */ | 37 | #define SNDRV_CTL_TLVT_DB_RANGE 3 /* dB range container */ |
38 | #define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */ | ||
39 | #define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */ | ||
38 | 40 | ||
39 | #define TLV_DB_SCALE_ITEM(min, step, mute) \ | 41 | #define TLV_DB_SCALE_ITEM(min, step, mute) \ |
40 | SNDRV_CTL_TLVT_DB_SCALE, 2 * sizeof(unsigned int), \ | 42 | SNDRV_CTL_TLVT_DB_SCALE, 2 * sizeof(unsigned int), \ |
@@ -42,6 +44,18 @@ | |||
42 | #define DECLARE_TLV_DB_SCALE(name, min, step, mute) \ | 44 | #define DECLARE_TLV_DB_SCALE(name, min, step, mute) \ |
43 | unsigned int name[] = { TLV_DB_SCALE_ITEM(min, step, mute) } | 45 | unsigned int name[] = { TLV_DB_SCALE_ITEM(min, step, mute) } |
44 | 46 | ||
47 | /* dB scale specified with min/max values instead of step */ | ||
48 | #define TLV_DB_MINMAX_ITEM(min_dB, max_dB) \ | ||
49 | SNDRV_CTL_TLVT_DB_MINMAX, 2 * sizeof(unsigned int), \ | ||
50 | (min_dB), (max_dB) | ||
51 | #define TLV_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \ | ||
52 | SNDRV_CTL_TLVT_DB_MINMAX_MUTE, 2 * sizeof(unsigned int), \ | ||
53 | (min_dB), (max_dB) | ||
54 | #define DECLARE_TLV_DB_MINMAX(name, min_dB, max_dB) \ | ||
55 | unsigned int name[] = { TLV_DB_MINMAX_ITEM(min_dB, max_dB) } | ||
56 | #define DECLARE_TLV_DB_MINMAX_MUTE(name, min_dB, max_dB) \ | ||
57 | unsigned int name[] = { TLV_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) } | ||
58 | |||
45 | /* linear volume between min_dB and max_dB (.01dB unit) */ | 59 | /* linear volume between min_dB and max_dB (.01dB unit) */ |
46 | #define TLV_DB_LINEAR_ITEM(min_dB, max_dB) \ | 60 | #define TLV_DB_LINEAR_ITEM(min_dB, max_dB) \ |
47 | SNDRV_CTL_TLVT_DB_LINEAR, 2 * sizeof(unsigned int), \ | 61 | SNDRV_CTL_TLVT_DB_LINEAR, 2 * sizeof(unsigned int), \ |
diff --git a/include/sound/version.h b/include/sound/version.h index 456f1359e1c0..22939142dd23 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h */ | 1 | /* include/version.h */ |
2 | #define CONFIG_SND_VERSION "1.0.20" | 2 | #define CONFIG_SND_VERSION "1.0.21" |
3 | #define CONFIG_SND_DATE "" | 3 | #define CONFIG_SND_DATE "" |
diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h index 05ead6698434..444cd6ba0ba7 100644 --- a/include/sound/ymfpci.h +++ b/include/sound/ymfpci.h | |||
@@ -331,6 +331,7 @@ struct snd_ymfpci { | |||
331 | struct snd_ac97 *ac97; | 331 | struct snd_ac97 *ac97; |
332 | struct snd_rawmidi *rawmidi; | 332 | struct snd_rawmidi *rawmidi; |
333 | struct snd_timer *timer; | 333 | struct snd_timer *timer; |
334 | unsigned int timer_ticks; | ||
334 | 335 | ||
335 | struct pci_dev *pci; | 336 | struct pci_dev *pci; |
336 | struct snd_card *card; | 337 | struct snd_card *card; |