diff options
Diffstat (limited to 'sound')
33 files changed, 153 insertions, 89 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index 29450befb5da..38b20efc9c0b 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c | |||
@@ -245,7 +245,7 @@ static pxa2xx_pcm_client_t pxa2xx_ac97_pcm_client = { | |||
245 | 245 | ||
246 | #ifdef CONFIG_PM | 246 | #ifdef CONFIG_PM |
247 | 247 | ||
248 | static int pxa2xx_ac97_do_suspend(snd_card_t *card, unsigned int state) | 248 | static int pxa2xx_ac97_do_suspend(snd_card_t *card, pm_message_t state) |
249 | { | 249 | { |
250 | if (card->power_state != SNDRV_CTL_POWER_D3cold) { | 250 | if (card->power_state != SNDRV_CTL_POWER_D3cold) { |
251 | pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data; | 251 | pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data; |
diff --git a/sound/core/init.c b/sound/core/init.c index a5702014a704..c72a79115cca 100644 --- a/sound/core/init.c +++ b/sound/core/init.c | |||
@@ -828,7 +828,8 @@ static int snd_generic_suspend(struct device *dev, pm_message_t state, u32 level | |||
828 | card = get_snd_generic_card(dev); | 828 | card = get_snd_generic_card(dev); |
829 | if (card->power_state == SNDRV_CTL_POWER_D3hot) | 829 | if (card->power_state == SNDRV_CTL_POWER_D3hot) |
830 | return 0; | 830 | return 0; |
831 | card->pm_suspend(card, PMSG_SUSPEND); | 831 | if (card->pm_suspend) |
832 | card->pm_suspend(card, PMSG_SUSPEND); | ||
832 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 833 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
833 | return 0; | 834 | return 0; |
834 | } | 835 | } |
@@ -843,7 +844,8 @@ static int snd_generic_resume(struct device *dev, u32 level) | |||
843 | card = get_snd_generic_card(dev); | 844 | card = get_snd_generic_card(dev); |
844 | if (card->power_state == SNDRV_CTL_POWER_D0) | 845 | if (card->power_state == SNDRV_CTL_POWER_D0) |
845 | return 0; | 846 | return 0; |
846 | card->pm_resume(card); | 847 | if (card->pm_suspend) |
848 | card->pm_resume(card); | ||
847 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | 849 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
848 | return 0; | 850 | return 0; |
849 | } | 851 | } |
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index 91124ddbdda9..129abab5ce98 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c | |||
@@ -106,7 +106,7 @@ struct snd_mem_list { | |||
106 | 106 | ||
107 | static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size, | 107 | static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size, |
108 | dma_addr_t *dma_handle, | 108 | dma_addr_t *dma_handle, |
109 | unsigned int __nocast flags) | 109 | gfp_t flags) |
110 | { | 110 | { |
111 | void *ret; | 111 | void *ret; |
112 | u64 dma_mask, coherent_dma_mask; | 112 | u64 dma_mask, coherent_dma_mask; |
@@ -190,7 +190,7 @@ static void unmark_pages(struct page *page, int order) | |||
190 | * | 190 | * |
191 | * Returns the pointer of the buffer, or NULL if no enoguh memory. | 191 | * Returns the pointer of the buffer, or NULL if no enoguh memory. |
192 | */ | 192 | */ |
193 | void *snd_malloc_pages(size_t size, unsigned int gfp_flags) | 193 | void *snd_malloc_pages(size_t size, gfp_t gfp_flags) |
194 | { | 194 | { |
195 | int pg; | 195 | int pg; |
196 | void *res; | 196 | void *res; |
@@ -235,7 +235,7 @@ static void *snd_malloc_dev_pages(struct device *dev, size_t size, dma_addr_t *d | |||
235 | { | 235 | { |
236 | int pg; | 236 | int pg; |
237 | void *res; | 237 | void *res; |
238 | unsigned int gfp_flags; | 238 | gfp_t gfp_flags; |
239 | 239 | ||
240 | snd_assert(size > 0, return NULL); | 240 | snd_assert(size > 0, return NULL); |
241 | snd_assert(dma != NULL, return NULL); | 241 | snd_assert(dma != NULL, return NULL); |
diff --git a/sound/core/memory.c b/sound/core/memory.c index 8fa888fc53a0..7d8e2eebba51 100644 --- a/sound/core/memory.c +++ b/sound/core/memory.c | |||
@@ -89,7 +89,7 @@ void snd_memory_done(void) | |||
89 | } | 89 | } |
90 | } | 90 | } |
91 | 91 | ||
92 | static void *__snd_kmalloc(size_t size, unsigned int __nocast flags, void *caller) | 92 | static void *__snd_kmalloc(size_t size, gfp_t flags, void *caller) |
93 | { | 93 | { |
94 | unsigned long cpu_flags; | 94 | unsigned long cpu_flags; |
95 | struct snd_alloc_track *t; | 95 | struct snd_alloc_track *t; |
@@ -111,12 +111,12 @@ static void *__snd_kmalloc(size_t size, unsigned int __nocast flags, void *calle | |||
111 | } | 111 | } |
112 | 112 | ||
113 | #define _snd_kmalloc(size, flags) __snd_kmalloc((size), (flags), __builtin_return_address(0)); | 113 | #define _snd_kmalloc(size, flags) __snd_kmalloc((size), (flags), __builtin_return_address(0)); |
114 | void *snd_hidden_kmalloc(size_t size, unsigned int __nocast flags) | 114 | void *snd_hidden_kmalloc(size_t size, gfp_t flags) |
115 | { | 115 | { |
116 | return _snd_kmalloc(size, flags); | 116 | return _snd_kmalloc(size, flags); |
117 | } | 117 | } |
118 | 118 | ||
119 | void *snd_hidden_kzalloc(size_t size, unsigned int __nocast flags) | 119 | void *snd_hidden_kzalloc(size_t size, gfp_t flags) |
120 | { | 120 | { |
121 | void *ret = _snd_kmalloc(size, flags); | 121 | void *ret = _snd_kmalloc(size, flags); |
122 | if (ret) | 122 | if (ret) |
@@ -125,7 +125,7 @@ void *snd_hidden_kzalloc(size_t size, unsigned int __nocast flags) | |||
125 | } | 125 | } |
126 | EXPORT_SYMBOL(snd_hidden_kzalloc); | 126 | EXPORT_SYMBOL(snd_hidden_kzalloc); |
127 | 127 | ||
128 | void *snd_hidden_kcalloc(size_t n, size_t size, unsigned int __nocast flags) | 128 | void *snd_hidden_kcalloc(size_t n, size_t size, gfp_t flags) |
129 | { | 129 | { |
130 | void *ret = NULL; | 130 | void *ret = NULL; |
131 | if (n != 0 && size > INT_MAX / n) | 131 | if (n != 0 && size > INT_MAX / n) |
@@ -190,7 +190,7 @@ void snd_hidden_vfree(void *obj) | |||
190 | snd_wrapper_vfree(obj); | 190 | snd_wrapper_vfree(obj); |
191 | } | 191 | } |
192 | 192 | ||
193 | char *snd_hidden_kstrdup(const char *s, unsigned int __nocast flags) | 193 | char *snd_hidden_kstrdup(const char *s, gfp_t flags) |
194 | { | 194 | { |
195 | int len; | 195 | int len; |
196 | char *buf; | 196 | char *buf; |
diff --git a/sound/core/seq/instr/ainstr_gf1.c b/sound/core/seq/instr/ainstr_gf1.c index 207c2c54bf1d..0e4df8826eed 100644 --- a/sound/core/seq/instr/ainstr_gf1.c +++ b/sound/core/seq/instr/ainstr_gf1.c | |||
@@ -51,7 +51,7 @@ static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops, | |||
51 | gf1_wave_t *wp, *prev; | 51 | gf1_wave_t *wp, *prev; |
52 | gf1_xwave_t xp; | 52 | gf1_xwave_t xp; |
53 | int err; | 53 | int err; |
54 | unsigned int gfp_mask; | 54 | gfp_t gfp_mask; |
55 | unsigned int real_size; | 55 | unsigned int real_size; |
56 | 56 | ||
57 | gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL; | 57 | gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL; |
@@ -144,7 +144,8 @@ static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr, | |||
144 | snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data; | 144 | snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data; |
145 | gf1_instrument_t *ip; | 145 | gf1_instrument_t *ip; |
146 | gf1_xinstrument_t ix; | 146 | gf1_xinstrument_t ix; |
147 | int err, gfp_mask; | 147 | int err; |
148 | gfp_t gfp_mask; | ||
148 | 149 | ||
149 | if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) | 150 | if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) |
150 | return -EINVAL; | 151 | return -EINVAL; |
diff --git a/sound/core/seq/instr/ainstr_iw.c b/sound/core/seq/instr/ainstr_iw.c index b3cee092b1a4..7c19fbbc5d0f 100644 --- a/sound/core/seq/instr/ainstr_iw.c +++ b/sound/core/seq/instr/ainstr_iw.c | |||
@@ -58,7 +58,7 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype, | |||
58 | iwffff_xenv_t *ex, | 58 | iwffff_xenv_t *ex, |
59 | char __user **data, | 59 | char __user **data, |
60 | long *len, | 60 | long *len, |
61 | unsigned int __nocast gfp_mask) | 61 | gfp_t gfp_mask) |
62 | { | 62 | { |
63 | __u32 stype; | 63 | __u32 stype; |
64 | iwffff_env_record_t *rp, *rp_last; | 64 | iwffff_env_record_t *rp, *rp_last; |
@@ -129,7 +129,7 @@ static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops, | |||
129 | iwffff_wave_t *wp, *prev; | 129 | iwffff_wave_t *wp, *prev; |
130 | iwffff_xwave_t xp; | 130 | iwffff_xwave_t xp; |
131 | int err; | 131 | int err; |
132 | unsigned int gfp_mask; | 132 | gfp_t gfp_mask; |
133 | unsigned int real_size; | 133 | unsigned int real_size; |
134 | 134 | ||
135 | gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL; | 135 | gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL; |
@@ -236,7 +236,7 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr, | |||
236 | iwffff_layer_t *lp, *prev_lp; | 236 | iwffff_layer_t *lp, *prev_lp; |
237 | iwffff_xlayer_t lx; | 237 | iwffff_xlayer_t lx; |
238 | int err; | 238 | int err; |
239 | unsigned int gfp_mask; | 239 | gfp_t gfp_mask; |
240 | 240 | ||
241 | if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) | 241 | if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) |
242 | return -EINVAL; | 242 | return -EINVAL; |
diff --git a/sound/core/seq/instr/ainstr_simple.c b/sound/core/seq/instr/ainstr_simple.c index 6183d2151034..17ab94e76073 100644 --- a/sound/core/seq/instr/ainstr_simple.c +++ b/sound/core/seq/instr/ainstr_simple.c | |||
@@ -57,7 +57,8 @@ static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr, | |||
57 | snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data; | 57 | snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data; |
58 | simple_instrument_t *ip; | 58 | simple_instrument_t *ip; |
59 | simple_xinstrument_t ix; | 59 | simple_xinstrument_t ix; |
60 | int err, gfp_mask; | 60 | int err; |
61 | gfp_t gfp_mask; | ||
61 | unsigned int real_size; | 62 | unsigned int real_size; |
62 | 63 | ||
63 | if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) | 64 | if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) |
diff --git a/sound/core/wrappers.c b/sound/core/wrappers.c index 508e6d67ee19..296b716f1376 100644 --- a/sound/core/wrappers.c +++ b/sound/core/wrappers.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
28 | 28 | ||
29 | #ifdef CONFIG_SND_DEBUG_MEMORY | 29 | #ifdef CONFIG_SND_DEBUG_MEMORY |
30 | void *snd_wrapper_kmalloc(size_t size, unsigned int __nocast flags) | 30 | void *snd_wrapper_kmalloc(size_t size, gfp_t flags) |
31 | { | 31 | { |
32 | return kmalloc(size, flags); | 32 | return kmalloc(size, flags); |
33 | } | 33 | } |
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index e2d2babcd20b..4ba268f251e3 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c | |||
@@ -914,6 +914,7 @@ static int __init alsa_card_opl3sa2_init(void) | |||
914 | #endif | 914 | #endif |
915 | #ifdef CONFIG_PNP | 915 | #ifdef CONFIG_PNP |
916 | pnp_unregister_card_driver(&opl3sa2_pnpc_driver); | 916 | pnp_unregister_card_driver(&opl3sa2_pnpc_driver); |
917 | pnp_unregister_driver(&opl3sa2_pnp_driver); | ||
917 | #endif | 918 | #endif |
918 | return -ENODEV; | 919 | return -ENODEV; |
919 | } | 920 | } |
@@ -927,6 +928,7 @@ static void __exit alsa_card_opl3sa2_exit(void) | |||
927 | #ifdef CONFIG_PNP | 928 | #ifdef CONFIG_PNP |
928 | /* PnP cards first */ | 929 | /* PnP cards first */ |
929 | pnp_unregister_card_driver(&opl3sa2_pnpc_driver); | 930 | pnp_unregister_card_driver(&opl3sa2_pnpc_driver); |
931 | pnp_unregister_driver(&opl3sa2_pnp_driver); | ||
930 | #endif | 932 | #endif |
931 | for (idx = 0; idx < SNDRV_CARDS; idx++) | 933 | for (idx = 0; idx < SNDRV_CARDS; idx++) |
932 | snd_card_free(snd_opl3sa2_legacy[idx]); | 934 | snd_card_free(snd_opl3sa2_legacy[idx]); |
diff --git a/sound/oss/au1000.c b/sound/oss/au1000.c index 4491733c9e4e..2c2ae2ee01ac 100644 --- a/sound/oss/au1000.c +++ b/sound/oss/au1000.c | |||
@@ -1295,7 +1295,7 @@ static int au1000_mmap(struct file *file, struct vm_area_struct *vma) | |||
1295 | unsigned long size; | 1295 | unsigned long size; |
1296 | int ret = 0; | 1296 | int ret = 0; |
1297 | 1297 | ||
1298 | dbg(__FUNCTION__); | 1298 | dbg("%s", __FUNCTION__); |
1299 | 1299 | ||
1300 | lock_kernel(); | 1300 | lock_kernel(); |
1301 | down(&s->sem); | 1301 | down(&s->sem); |
diff --git a/sound/oss/dmasound/dmasound.h b/sound/oss/dmasound/dmasound.h index 9a2f50f0b184..222014cafc1a 100644 --- a/sound/oss/dmasound/dmasound.h +++ b/sound/oss/dmasound/dmasound.h | |||
@@ -116,7 +116,7 @@ typedef struct { | |||
116 | const char *name; | 116 | const char *name; |
117 | const char *name2; | 117 | const char *name2; |
118 | struct module *owner; | 118 | struct module *owner; |
119 | void *(*dma_alloc)(unsigned int, int); | 119 | void *(*dma_alloc)(unsigned int, gfp_t); |
120 | void (*dma_free)(void *, unsigned int); | 120 | void (*dma_free)(void *, unsigned int); |
121 | int (*irqinit)(void); | 121 | int (*irqinit)(void); |
122 | #ifdef MODULE | 122 | #ifdef MODULE |
diff --git a/sound/oss/dmasound/dmasound_atari.c b/sound/oss/dmasound/dmasound_atari.c index 8daaf87664ba..59eb53f89318 100644 --- a/sound/oss/dmasound/dmasound_atari.c +++ b/sound/oss/dmasound/dmasound_atari.c | |||
@@ -114,7 +114,7 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, | |||
114 | /*** Low level stuff *********************************************************/ | 114 | /*** Low level stuff *********************************************************/ |
115 | 115 | ||
116 | 116 | ||
117 | static void *AtaAlloc(unsigned int size, int flags); | 117 | static void *AtaAlloc(unsigned int size, gfp_t flags); |
118 | static void AtaFree(void *, unsigned int size); | 118 | static void AtaFree(void *, unsigned int size); |
119 | static int AtaIrqInit(void); | 119 | static int AtaIrqInit(void); |
120 | #ifdef MODULE | 120 | #ifdef MODULE |
@@ -810,7 +810,7 @@ static TRANS transFalconExpanding = { | |||
810 | * Atari (TT/Falcon) | 810 | * Atari (TT/Falcon) |
811 | */ | 811 | */ |
812 | 812 | ||
813 | static void *AtaAlloc(unsigned int size, int flags) | 813 | static void *AtaAlloc(unsigned int size, gfp_t flags) |
814 | { | 814 | { |
815 | return atari_stram_alloc(size, "dmasound"); | 815 | return atari_stram_alloc(size, "dmasound"); |
816 | } | 816 | } |
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c index 2ceb46f1d40f..b2bf8bac842d 100644 --- a/sound/oss/dmasound/dmasound_awacs.c +++ b/sound/oss/dmasound/dmasound_awacs.c | |||
@@ -271,7 +271,7 @@ int expand_read_bal; /* Balance factor for expanding reads (not volume!) */ | |||
271 | 271 | ||
272 | /*** Low level stuff *********************************************************/ | 272 | /*** Low level stuff *********************************************************/ |
273 | 273 | ||
274 | static void *PMacAlloc(unsigned int size, int flags); | 274 | static void *PMacAlloc(unsigned int size, gfp_t flags); |
275 | static void PMacFree(void *ptr, unsigned int size); | 275 | static void PMacFree(void *ptr, unsigned int size); |
276 | static int PMacIrqInit(void); | 276 | static int PMacIrqInit(void); |
277 | #ifdef MODULE | 277 | #ifdef MODULE |
@@ -614,7 +614,7 @@ tas_init_frame_rates(unsigned int *prop, unsigned int l) | |||
614 | /* | 614 | /* |
615 | * PCI PowerMac, with AWACS, Screamer, Burgundy, DACA or Tumbler and DBDMA. | 615 | * PCI PowerMac, with AWACS, Screamer, Burgundy, DACA or Tumbler and DBDMA. |
616 | */ | 616 | */ |
617 | static void *PMacAlloc(unsigned int size, int flags) | 617 | static void *PMacAlloc(unsigned int size, gfp_t flags) |
618 | { | 618 | { |
619 | return kmalloc(size, flags); | 619 | return kmalloc(size, flags); |
620 | } | 620 | } |
diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c index 558db5311e06..d59f60b26410 100644 --- a/sound/oss/dmasound/dmasound_paula.c +++ b/sound/oss/dmasound/dmasound_paula.c | |||
@@ -69,7 +69,7 @@ static int write_sq_block_size_half, write_sq_block_size_quarter; | |||
69 | /*** Low level stuff *********************************************************/ | 69 | /*** Low level stuff *********************************************************/ |
70 | 70 | ||
71 | 71 | ||
72 | static void *AmiAlloc(unsigned int size, int flags); | 72 | static void *AmiAlloc(unsigned int size, gfp_t flags); |
73 | static void AmiFree(void *obj, unsigned int size); | 73 | static void AmiFree(void *obj, unsigned int size); |
74 | static int AmiIrqInit(void); | 74 | static int AmiIrqInit(void); |
75 | #ifdef MODULE | 75 | #ifdef MODULE |
@@ -317,7 +317,7 @@ static inline void StopDMA(void) | |||
317 | enable_heartbeat(); | 317 | enable_heartbeat(); |
318 | } | 318 | } |
319 | 319 | ||
320 | static void *AmiAlloc(unsigned int size, int flags) | 320 | static void *AmiAlloc(unsigned int size, gfp_t flags) |
321 | { | 321 | { |
322 | return amiga_chip_alloc((long)size, "dmasound [Paula]"); | 322 | return amiga_chip_alloc((long)size, "dmasound [Paula]"); |
323 | } | 323 | } |
diff --git a/sound/oss/dmasound/dmasound_q40.c b/sound/oss/dmasound/dmasound_q40.c index 92c25a0174db..1ddaa6284b08 100644 --- a/sound/oss/dmasound/dmasound_q40.c +++ b/sound/oss/dmasound/dmasound_q40.c | |||
@@ -36,7 +36,7 @@ static int expand_data; /* Data for expanding */ | |||
36 | /*** Low level stuff *********************************************************/ | 36 | /*** Low level stuff *********************************************************/ |
37 | 37 | ||
38 | 38 | ||
39 | static void *Q40Alloc(unsigned int size, int flags); | 39 | static void *Q40Alloc(unsigned int size, gfp_t flags); |
40 | static void Q40Free(void *, unsigned int); | 40 | static void Q40Free(void *, unsigned int); |
41 | static int Q40IrqInit(void); | 41 | static int Q40IrqInit(void); |
42 | #ifdef MODULE | 42 | #ifdef MODULE |
@@ -358,7 +358,7 @@ static TRANS transQ40Compressing = { | |||
358 | 358 | ||
359 | /*** Low level stuff *********************************************************/ | 359 | /*** Low level stuff *********************************************************/ |
360 | 360 | ||
361 | static void *Q40Alloc(unsigned int size, int flags) | 361 | static void *Q40Alloc(unsigned int size, gfp_t flags) |
362 | { | 362 | { |
363 | return kmalloc(size, flags); /* change to vmalloc */ | 363 | return kmalloc(size, flags); /* change to vmalloc */ |
364 | } | 364 | } |
diff --git a/sound/oss/ite8172.c b/sound/oss/ite8172.c index 58f879fda975..26e5944b6ba8 100644 --- a/sound/oss/ite8172.c +++ b/sound/oss/ite8172.c | |||
@@ -1859,7 +1859,7 @@ static int it8172_release(struct inode *inode, struct file *file) | |||
1859 | struct it8172_state *s = (struct it8172_state *)file->private_data; | 1859 | struct it8172_state *s = (struct it8172_state *)file->private_data; |
1860 | 1860 | ||
1861 | #ifdef IT8172_VERBOSE_DEBUG | 1861 | #ifdef IT8172_VERBOSE_DEBUG |
1862 | dbg(__FUNCTION__); | 1862 | dbg("%s", __FUNCTION__); |
1863 | #endif | 1863 | #endif |
1864 | lock_kernel(); | 1864 | lock_kernel(); |
1865 | if (file->f_mode & FMODE_WRITE) | 1865 | if (file->f_mode & FMODE_WRITE) |
diff --git a/sound/pci/ac97/ac97_bus.c b/sound/pci/ac97/ac97_bus.c index 227f8b9f67ce..becbc420ba41 100644 --- a/sound/pci/ac97/ac97_bus.c +++ b/sound/pci/ac97/ac97_bus.c | |||
@@ -17,25 +17,21 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * Codec families have names seperated by commas, so we search for an | 20 | * Let drivers decide whether they want to support given codec from their |
21 | * individual codec name within the family string. | 21 | * probe method. Drivers have direct access to the ac97_t structure and may |
22 | * decide based on the id field amongst other things. | ||
22 | */ | 23 | */ |
23 | static int ac97_bus_match(struct device *dev, struct device_driver *drv) | 24 | static int ac97_bus_match(struct device *dev, struct device_driver *drv) |
24 | { | 25 | { |
25 | return (strstr(dev->bus_id, drv->name) != NULL); | 26 | return 1; |
26 | } | 27 | } |
27 | 28 | ||
28 | static int ac97_bus_suspend(struct device *dev, pm_message_t state) | 29 | static int ac97_bus_suspend(struct device *dev, pm_message_t state) |
29 | { | 30 | { |
30 | int ret = 0; | 31 | int ret = 0; |
31 | 32 | ||
32 | if (dev->driver && dev->driver->suspend) { | 33 | if (dev->driver && dev->driver->suspend) |
33 | ret = dev->driver->suspend(dev, state, SUSPEND_DISABLE); | 34 | ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN); |
34 | if (ret == 0) | ||
35 | ret = dev->driver->suspend(dev, state, SUSPEND_SAVE_STATE); | ||
36 | if (ret == 0) | ||
37 | ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN); | ||
38 | } | ||
39 | return ret; | 35 | return ret; |
40 | } | 36 | } |
41 | 37 | ||
@@ -43,13 +39,8 @@ static int ac97_bus_resume(struct device *dev) | |||
43 | { | 39 | { |
44 | int ret = 0; | 40 | int ret = 0; |
45 | 41 | ||
46 | if (dev->driver && dev->driver->resume) { | 42 | if (dev->driver && dev->driver->resume) |
47 | ret = dev->driver->resume(dev, RESUME_POWER_ON); | 43 | ret = dev->driver->resume(dev, RESUME_POWER_ON); |
48 | if (ret == 0) | ||
49 | ret = dev->driver->resume(dev, RESUME_RESTORE_STATE); | ||
50 | if (ret == 0) | ||
51 | ret = dev->driver->resume(dev, RESUME_ENABLE); | ||
52 | } | ||
53 | return ret; | 44 | return ret; |
54 | } | 45 | } |
55 | 46 | ||
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index e64cb07a39c2..41fc290149ed 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -1557,7 +1557,7 @@ static int snd_ac97_modem_build(snd_card_t * card, ac97_t * ac97) | |||
1557 | 1557 | ||
1558 | /* build modem switches */ | 1558 | /* build modem switches */ |
1559 | for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_modem_switches); idx++) | 1559 | for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_modem_switches); idx++) |
1560 | if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_modem_switches[idx], ac97))) < 0) | 1560 | if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_ac97_controls_modem_switches[idx], ac97))) < 0) |
1561 | return err; | 1561 | return err; |
1562 | 1562 | ||
1563 | /* build chip specific controls */ | 1563 | /* build chip specific controls */ |
@@ -1828,7 +1828,6 @@ static int snd_ac97_dev_register(snd_device_t *device) | |||
1828 | 1828 | ||
1829 | ac97->dev.bus = &ac97_bus_type; | 1829 | ac97->dev.bus = &ac97_bus_type; |
1830 | ac97->dev.parent = ac97->bus->card->dev; | 1830 | ac97->dev.parent = ac97->bus->card->dev; |
1831 | ac97->dev.platform_data = ac97; | ||
1832 | ac97->dev.release = ac97_device_release; | 1831 | ac97->dev.release = ac97_device_release; |
1833 | snprintf(ac97->dev.bus_id, BUS_ID_SIZE, "card%d-%d", ac97->bus->card->number, ac97->num); | 1832 | snprintf(ac97->dev.bus_id, BUS_ID_SIZE, "card%d-%d", ac97->bus->card->number, ac97->num); |
1834 | if ((err = device_register(&ac97->dev)) < 0) { | 1833 | if ((err = device_register(&ac97->dev)) < 0) { |
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 045ddc743edc..0238cc65d32a 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -2752,7 +2752,11 @@ AC97_DOUBLE("Modem Speaker Volume", 0x5c, 14, 12, 3, 1) | |||
2752 | 2752 | ||
2753 | static int patch_si3036_specific(ac97_t * ac97) | 2753 | static int patch_si3036_specific(ac97_t * ac97) |
2754 | { | 2754 | { |
2755 | return patch_build_controls(ac97, snd_ac97_controls_si3036, ARRAY_SIZE(snd_ac97_controls_si3036)); | 2755 | int idx, err; |
2756 | for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_si3036); idx++) | ||
2757 | if ((err = snd_ctl_add(ac97->bus->card, snd_ctl_new1(&snd_ac97_controls_si3036[idx], ac97))) < 0) | ||
2758 | return err; | ||
2759 | return 0; | ||
2756 | } | 2760 | } |
2757 | 2761 | ||
2758 | static struct snd_ac97_build_ops patch_si3036_ops = { | 2762 | static struct snd_ac97_build_ops patch_si3036_ops = { |
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index d683f7736a63..f35b558c29b2 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -1993,8 +1993,10 @@ static int __devinit snd_ali_mixer(ali_t * codec) | |||
1993 | if ((err = snd_ac97_mixer(codec->ac97_bus, &ac97, &codec->ac97[i])) < 0) { | 1993 | if ((err = snd_ac97_mixer(codec->ac97_bus, &ac97, &codec->ac97[i])) < 0) { |
1994 | snd_printk("ali mixer %d creating error.\n", i); | 1994 | snd_printk("ali mixer %d creating error.\n", i); |
1995 | if(i == 0) | 1995 | if(i == 0) |
1996 | return err; | 1996 | return err; |
1997 | } | 1997 | codec->num_of_codecs = 1; |
1998 | break; | ||
1999 | } | ||
1998 | } | 2000 | } |
1999 | 2001 | ||
2000 | if (codec->spdif_support) { | 2002 | if (codec->spdif_support) { |
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 8a59598167f9..c1a239a4dac6 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -405,7 +405,7 @@ static int snd_atiixp_acquire_codec(atiixp_t *chip) | |||
405 | 405 | ||
406 | while (atiixp_read(chip, PHYS_OUT_ADDR) & ATI_REG_PHYS_OUT_ADDR_EN) { | 406 | while (atiixp_read(chip, PHYS_OUT_ADDR) & ATI_REG_PHYS_OUT_ADDR_EN) { |
407 | if (! timeout--) { | 407 | if (! timeout--) { |
408 | snd_printk(KERN_WARNING "atiixp: codec acquire timeout\n"); | 408 | snd_printk(KERN_WARNING "atiixp-modem: codec acquire timeout\n"); |
409 | return -EBUSY; | 409 | return -EBUSY; |
410 | } | 410 | } |
411 | udelay(1); | 411 | udelay(1); |
@@ -436,7 +436,7 @@ static unsigned short snd_atiixp_codec_read(atiixp_t *chip, unsigned short codec | |||
436 | } while (--timeout); | 436 | } while (--timeout); |
437 | /* time out may happen during reset */ | 437 | /* time out may happen during reset */ |
438 | if (reg < 0x7c) | 438 | if (reg < 0x7c) |
439 | snd_printk(KERN_WARNING "atiixp: codec read timeout (reg %x)\n", reg); | 439 | snd_printk(KERN_WARNING "atiixp-modem: codec read timeout (reg %x)\n", reg); |
440 | return 0xffff; | 440 | return 0xffff; |
441 | } | 441 | } |
442 | 442 | ||
@@ -498,7 +498,7 @@ static int snd_atiixp_aclink_reset(atiixp_t *chip) | |||
498 | do_delay(); | 498 | do_delay(); |
499 | atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); | 499 | atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); |
500 | if (--timeout) { | 500 | if (--timeout) { |
501 | snd_printk(KERN_ERR "atiixp: codec reset timeout\n"); | 501 | snd_printk(KERN_ERR "atiixp-modem: codec reset timeout\n"); |
502 | break; | 502 | break; |
503 | } | 503 | } |
504 | } | 504 | } |
@@ -552,7 +552,7 @@ static int snd_atiixp_codec_detect(atiixp_t *chip) | |||
552 | atiixp_write(chip, IER, 0); /* disable irqs */ | 552 | atiixp_write(chip, IER, 0); /* disable irqs */ |
553 | 553 | ||
554 | if ((chip->codec_not_ready_bits & ALL_CODEC_NOT_READY) == ALL_CODEC_NOT_READY) { | 554 | if ((chip->codec_not_ready_bits & ALL_CODEC_NOT_READY) == ALL_CODEC_NOT_READY) { |
555 | snd_printk(KERN_ERR "atiixp: no codec detected!\n"); | 555 | snd_printk(KERN_ERR "atiixp-modem: no codec detected!\n"); |
556 | return -ENXIO; | 556 | return -ENXIO; |
557 | } | 557 | } |
558 | return 0; | 558 | return 0; |
@@ -635,7 +635,7 @@ static void snd_atiixp_xrun_dma(atiixp_t *chip, atiixp_dma_t *dma) | |||
635 | { | 635 | { |
636 | if (! dma->substream || ! dma->running) | 636 | if (! dma->substream || ! dma->running) |
637 | return; | 637 | return; |
638 | snd_printdd("atiixp: XRUN detected (DMA %d)\n", dma->ops->type); | 638 | snd_printdd("atiixp-modem: XRUN detected (DMA %d)\n", dma->ops->type); |
639 | snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN); | 639 | snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN); |
640 | } | 640 | } |
641 | 641 | ||
@@ -1081,14 +1081,14 @@ static int __devinit snd_atiixp_mixer_new(atiixp_t *chip, int clock) | |||
1081 | ac97.scaps = AC97_SCAP_SKIP_AUDIO; | 1081 | ac97.scaps = AC97_SCAP_SKIP_AUDIO; |
1082 | if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) { | 1082 | if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) { |
1083 | chip->ac97[i] = NULL; /* to be sure */ | 1083 | chip->ac97[i] = NULL; /* to be sure */ |
1084 | snd_printdd("atiixp: codec %d not available for modem\n", i); | 1084 | snd_printdd("atiixp-modem: codec %d not available for modem\n", i); |
1085 | continue; | 1085 | continue; |
1086 | } | 1086 | } |
1087 | codec_count++; | 1087 | codec_count++; |
1088 | } | 1088 | } |
1089 | 1089 | ||
1090 | if (! codec_count) { | 1090 | if (! codec_count) { |
1091 | snd_printk(KERN_ERR "atiixp: no codec available\n"); | 1091 | snd_printk(KERN_ERR "atiixp-modem: no codec available\n"); |
1092 | return -ENODEV; | 1092 | return -ENODEV; |
1093 | } | 1093 | } |
1094 | 1094 | ||
@@ -1159,7 +1159,7 @@ static void __devinit snd_atiixp_proc_init(atiixp_t *chip) | |||
1159 | { | 1159 | { |
1160 | snd_info_entry_t *entry; | 1160 | snd_info_entry_t *entry; |
1161 | 1161 | ||
1162 | if (! snd_card_proc_new(chip->card, "atiixp", &entry)) | 1162 | if (! snd_card_proc_new(chip->card, "atiixp-modem", &entry)) |
1163 | snd_info_set_text_ops(entry, chip, 1024, snd_atiixp_proc_read); | 1163 | snd_info_set_text_ops(entry, chip, 1024, snd_atiixp_proc_read); |
1164 | } | 1164 | } |
1165 | 1165 | ||
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index e87e8427f25f..e9cd8e054f25 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -756,9 +756,12 @@ static emu_chip_details_t emu_chip_details[] = { | |||
756 | .sblive51 = 1} , | 756 | .sblive51 = 1} , |
757 | /* Tested by alsa bugtrack user "hus" bug #1297 12th Aug 2005 */ | 757 | /* Tested by alsa bugtrack user "hus" bug #1297 12th Aug 2005 */ |
758 | {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80611102, | 758 | {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80611102, |
759 | .driver = "EMU10K1", .name = "SBLive! Platinum 5.1 [SB0060]", | 759 | .driver = "EMU10K1", .name = "SBLive 5.1 [SB0060]", |
760 | .id = "Live", | 760 | .id = "Live", |
761 | .emu10k1_chip = 1, | 761 | .emu10k1_chip = 1, |
762 | .ac97_chip = 2, /* ac97 is optional; both SBLive 5.1 and platinum | ||
763 | * share the same IDs! | ||
764 | */ | ||
762 | .sblive51 = 1} , | 765 | .sblive51 = 1} , |
763 | {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80511102, | 766 | {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80511102, |
764 | .driver = "EMU10K1", .name = "SBLive! Value [CT4850]", | 767 | .driver = "EMU10K1", .name = "SBLive! Value [CT4850]", |
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index d71a72e84bcc..7cc831ccd0cb 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c | |||
@@ -810,8 +810,14 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu, | |||
810 | ac97.private_data = emu; | 810 | ac97.private_data = emu; |
811 | ac97.private_free = snd_emu10k1_mixer_free_ac97; | 811 | ac97.private_free = snd_emu10k1_mixer_free_ac97; |
812 | ac97.scaps = AC97_SCAP_NO_SPDIF; | 812 | ac97.scaps = AC97_SCAP_NO_SPDIF; |
813 | if ((err = snd_ac97_mixer(pbus, &ac97, &emu->ac97)) < 0) | 813 | if ((err = snd_ac97_mixer(pbus, &ac97, &emu->ac97)) < 0) { |
814 | return err; | 814 | if (emu->card_capabilities->ac97_chip == 1) |
815 | return err; | ||
816 | snd_printd(KERN_INFO "emu10k1: AC97 is optional on this board\n"); | ||
817 | snd_printd(KERN_INFO" Proceeding without ac97 mixers...\n"); | ||
818 | snd_device_free(emu->card, pbus); | ||
819 | goto no_ac97; /* FIXME: get rid of ugly gotos.. */ | ||
820 | } | ||
815 | if (emu->audigy) { | 821 | if (emu->audigy) { |
816 | /* set master volume to 0 dB */ | 822 | /* set master volume to 0 dB */ |
817 | snd_ac97_write(emu->ac97, AC97_MASTER, 0x0000); | 823 | snd_ac97_write(emu->ac97, AC97_MASTER, 0x0000); |
@@ -836,6 +842,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu, | |||
836 | for (; *c; c++) | 842 | for (; *c; c++) |
837 | remove_ctl(card, *c); | 843 | remove_ctl(card, *c); |
838 | } else { | 844 | } else { |
845 | no_ac97: | ||
839 | if (emu->card_capabilities->ecard) | 846 | if (emu->card_capabilities->ecard) |
840 | strcpy(emu->card->mixername, "EMU APS"); | 847 | strcpy(emu->card->mixername, "EMU APS"); |
841 | else if (emu->audigy) | 848 | else if (emu->audigy) |
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 5b829a1a4c60..d0eb9f2250aa 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c | |||
@@ -881,10 +881,8 @@ int snd_hda_parse_generic_codec(struct hda_codec *codec) | |||
881 | struct hda_gspec *spec; | 881 | struct hda_gspec *spec; |
882 | int err; | 882 | int err; |
883 | 883 | ||
884 | if(!codec->afg) { | 884 | if(!codec->afg) |
885 | snd_printdd("hda_generic: no generic modem yet\n"); | 885 | return 0; |
886 | return -ENODEV; | ||
887 | } | ||
888 | 886 | ||
889 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 887 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
890 | if (spec == NULL) { | 888 | if (spec == NULL) { |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 9590ece2099d..6fe696e53ea6 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1137,6 +1137,7 @@ static snd_pcm_uframes_t azx_pcm_pointer(snd_pcm_substream_t *substream) | |||
1137 | pos = azx_sd_readl(azx_dev, SD_LPIB); | 1137 | pos = azx_sd_readl(azx_dev, SD_LPIB); |
1138 | if (chip->position_fix == POS_FIX_FIFO) | 1138 | if (chip->position_fix == POS_FIX_FIFO) |
1139 | pos += azx_dev->fifo_size; | 1139 | pos += azx_dev->fifo_size; |
1140 | #if 0 /* disabled temprarily, auto-correction doesn't work well... */ | ||
1140 | else if (chip->position_fix == POS_FIX_AUTO && azx_dev->period_updating) { | 1141 | else if (chip->position_fix == POS_FIX_AUTO && azx_dev->period_updating) { |
1141 | /* check the validity of DMA position */ | 1142 | /* check the validity of DMA position */ |
1142 | unsigned int diff = 0; | 1143 | unsigned int diff = 0; |
@@ -1157,6 +1158,10 @@ static snd_pcm_uframes_t azx_pcm_pointer(snd_pcm_substream_t *substream) | |||
1157 | } | 1158 | } |
1158 | azx_dev->period_updating = 0; | 1159 | azx_dev->period_updating = 0; |
1159 | } | 1160 | } |
1161 | #else | ||
1162 | else if (chip->position_fix == POS_FIX_AUTO) | ||
1163 | pos += azx_dev->fifo_size; | ||
1164 | #endif | ||
1160 | } | 1165 | } |
1161 | if (pos >= azx_dev->bufsize) | 1166 | if (pos >= azx_dev->bufsize) |
1162 | pos = 0; | 1167 | pos = 0; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 849b5b50c921..7327deb6df9f 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1385,8 +1385,8 @@ static snd_kcontrol_new_t alc880_test_mixer[] = { | |||
1385 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | 1385 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), |
1386 | ALC_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | 1386 | ALC_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), |
1387 | ALC_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), | 1387 | ALC_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), |
1388 | ALC_BIND_MUTE("CLFE Playback Volume", 0x0e, 2, HDA_INPUT), | 1388 | ALC_BIND_MUTE("CLFE Playback Switch", 0x0e, 2, HDA_INPUT), |
1389 | ALC_BIND_MUTE("Side Playback Volume", 0x0f, 2, HDA_INPUT), | 1389 | ALC_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), |
1390 | PIN_CTL_TEST("Front Pin Mode", 0x14), | 1390 | PIN_CTL_TEST("Front Pin Mode", 0x14), |
1391 | PIN_CTL_TEST("Surround Pin Mode", 0x15), | 1391 | PIN_CTL_TEST("Surround Pin Mode", 0x15), |
1392 | PIN_CTL_TEST("CLFE Pin Mode", 0x16), | 1392 | PIN_CTL_TEST("CLFE Pin Mode", 0x16), |
@@ -1409,18 +1409,6 @@ static snd_kcontrol_new_t alc880_test_mixer[] = { | |||
1409 | HDA_CODEC_MUTE("In-4 Playback Switch", 0x0b, 0x3, HDA_INPUT), | 1409 | HDA_CODEC_MUTE("In-4 Playback Switch", 0x0b, 0x3, HDA_INPUT), |
1410 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x4, HDA_INPUT), | 1410 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x4, HDA_INPUT), |
1411 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x4, HDA_INPUT), | 1411 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x4, HDA_INPUT), |
1412 | HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), | ||
1413 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), | ||
1414 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), | ||
1415 | HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), | ||
1416 | { | ||
1417 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
1418 | .name = "Input Source", | ||
1419 | .count = 2, | ||
1420 | .info = alc_mux_enum_info, | ||
1421 | .get = alc_mux_enum_get, | ||
1422 | .put = alc_mux_enum_put, | ||
1423 | }, | ||
1424 | { | 1412 | { |
1425 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1413 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1426 | .name = "Channel Mode", | 1414 | .name = "Channel Mode", |
@@ -2243,7 +2231,7 @@ static snd_kcontrol_new_t alc260_base_mixer[] = { | |||
2243 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT), | 2231 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT), |
2244 | ALC_BIND_MUTE("Headphone Playback Switch", 0x09, 2, HDA_INPUT), | 2232 | ALC_BIND_MUTE("Headphone Playback Switch", 0x09, 2, HDA_INPUT), |
2245 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), | 2233 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), |
2246 | ALC_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_OUTPUT), | 2234 | ALC_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_INPUT), |
2247 | HDA_CODEC_VOLUME("Capture Volume", 0x04, 0x0, HDA_INPUT), | 2235 | HDA_CODEC_VOLUME("Capture Volume", 0x04, 0x0, HDA_INPUT), |
2248 | HDA_CODEC_MUTE("Capture Switch", 0x04, 0x0, HDA_INPUT), | 2236 | HDA_CODEC_MUTE("Capture Switch", 0x04, 0x0, HDA_INPUT), |
2249 | { | 2237 | { |
@@ -2270,7 +2258,7 @@ static snd_kcontrol_new_t alc260_hp_mixer[] = { | |||
2270 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT), | 2258 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT), |
2271 | ALC_BIND_MUTE("Headphone Playback Switch", 0x09, 2, HDA_INPUT), | 2259 | ALC_BIND_MUTE("Headphone Playback Switch", 0x09, 2, HDA_INPUT), |
2272 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), | 2260 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), |
2273 | ALC_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_OUTPUT), | 2261 | ALC_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_INPUT), |
2274 | HDA_CODEC_VOLUME("Capture Volume", 0x05, 0x0, HDA_INPUT), | 2262 | HDA_CODEC_VOLUME("Capture Volume", 0x05, 0x0, HDA_INPUT), |
2275 | HDA_CODEC_MUTE("Capture Switch", 0x05, 0x0, HDA_INPUT), | 2263 | HDA_CODEC_MUTE("Capture Switch", 0x05, 0x0, HDA_INPUT), |
2276 | { | 2264 | { |
@@ -2501,7 +2489,7 @@ static snd_kcontrol_new_t alc882_base_mixer[] = { | |||
2501 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), | 2489 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), |
2502 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | 2490 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), |
2503 | ALC_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), | 2491 | ALC_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), |
2504 | ALC_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_OUTPUT), | 2492 | ALC_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), |
2505 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | 2493 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), |
2506 | ALC_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), | 2494 | ALC_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), |
2507 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | 2495 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), |
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 09f9cbe116a3..5561fd4091e8 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c | |||
@@ -442,7 +442,7 @@ static char* stateName[] = { | |||
442 | "Setup for play", | 442 | "Setup for play", |
443 | "Playing", | 443 | "Playing", |
444 | "Monitor mode on", | 444 | "Monitor mode on", |
445 | "Calibrating" | 445 | "Calibrating", |
446 | "Invalid" | 446 | "Invalid" |
447 | }; | 447 | }; |
448 | 448 | ||
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 6db7de6b9719..3c0205b91e10 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -2147,11 +2147,13 @@ static int __devinit check_dxs_list(struct pci_dev *pci) | |||
2147 | { .subvendor = 0x1019, .subdevice = 0x0996, .action = VIA_DXS_48K }, | 2147 | { .subvendor = 0x1019, .subdevice = 0x0996, .action = VIA_DXS_48K }, |
2148 | { .subvendor = 0x1019, .subdevice = 0x0a81, .action = VIA_DXS_NO_VRA }, /* ECS K7VTA3 v8.0 */ | 2148 | { .subvendor = 0x1019, .subdevice = 0x0a81, .action = VIA_DXS_NO_VRA }, /* ECS K7VTA3 v8.0 */ |
2149 | { .subvendor = 0x1019, .subdevice = 0x0a85, .action = VIA_DXS_NO_VRA }, /* ECS L7VMM2 */ | 2149 | { .subvendor = 0x1019, .subdevice = 0x0a85, .action = VIA_DXS_NO_VRA }, /* ECS L7VMM2 */ |
2150 | { .subvendor = 0x1019, .subdevice = 0xa101, .action = VIA_DXS_SRC }, | ||
2150 | { .subvendor = 0x1025, .subdevice = 0x0033, .action = VIA_DXS_NO_VRA }, /* Acer Inspire 1353LM */ | 2151 | { .subvendor = 0x1025, .subdevice = 0x0033, .action = VIA_DXS_NO_VRA }, /* Acer Inspire 1353LM */ |
2151 | { .subvendor = 0x1025, .subdevice = 0x0046, .action = VIA_DXS_SRC }, /* Acer Aspire 1524 WLMi */ | 2152 | { .subvendor = 0x1025, .subdevice = 0x0046, .action = VIA_DXS_SRC }, /* Acer Aspire 1524 WLMi */ |
2152 | { .subvendor = 0x1043, .subdevice = 0x8095, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8X (FIXME: possibly VIA_DXS_ENABLE?)*/ | 2153 | { .subvendor = 0x1043, .subdevice = 0x8095, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8X (FIXME: possibly VIA_DXS_ENABLE?)*/ |
2153 | { .subvendor = 0x1043, .subdevice = 0x80a1, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8-X */ | 2154 | { .subvendor = 0x1043, .subdevice = 0x80a1, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8-X */ |
2154 | { .subvendor = 0x1043, .subdevice = 0x80b0, .action = VIA_DXS_NO_VRA }, /* ASUS A7V600 & K8V*/ | 2155 | { .subvendor = 0x1043, .subdevice = 0x80b0, .action = VIA_DXS_NO_VRA }, /* ASUS A7V600 & K8V*/ |
2156 | { .subvendor = 0x1043, .subdevice = 0x810d, .action = VIA_DXS_SRC }, /* ASUS */ | ||
2155 | { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC }, /* ASUS A8V Deluxe */ | 2157 | { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC }, /* ASUS A8V Deluxe */ |
2156 | { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */ | 2158 | { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */ |
2157 | { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */ | 2159 | { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */ |
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index e35b48d29c45..392b2abd9f13 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c | |||
@@ -988,6 +988,7 @@ static int __init snd_pmac_detect(pmac_t *chip) | |||
988 | case 0x33: | 988 | case 0x33: |
989 | case 0x29: | 989 | case 0x29: |
990 | case 0x24: | 990 | case 0x24: |
991 | case 0x50: | ||
991 | case 0x5c: | 992 | case 0x5c: |
992 | chip->num_freqs = ARRAY_SIZE(tumbler_freqs); | 993 | chip->num_freqs = ARRAY_SIZE(tumbler_freqs); |
993 | chip->model = PMAC_SNAPPER; | 994 | chip->model = PMAC_SNAPPER; |
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index d5ae2055b896..2ead878bcb8f 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -1444,9 +1444,9 @@ static snd_pcm_hardware_t snd_usb_playback = | |||
1444 | SNDRV_PCM_INFO_BATCH | | 1444 | SNDRV_PCM_INFO_BATCH | |
1445 | SNDRV_PCM_INFO_INTERLEAVED | | 1445 | SNDRV_PCM_INFO_INTERLEAVED | |
1446 | SNDRV_PCM_INFO_BLOCK_TRANSFER, | 1446 | SNDRV_PCM_INFO_BLOCK_TRANSFER, |
1447 | .buffer_bytes_max = (256*1024), | 1447 | .buffer_bytes_max = 1024 * 1024, |
1448 | .period_bytes_min = 64, | 1448 | .period_bytes_min = 64, |
1449 | .period_bytes_max = (128*1024), | 1449 | .period_bytes_max = 512 * 1024, |
1450 | .periods_min = 2, | 1450 | .periods_min = 2, |
1451 | .periods_max = 1024, | 1451 | .periods_max = 1024, |
1452 | }; | 1452 | }; |
@@ -1458,9 +1458,9 @@ static snd_pcm_hardware_t snd_usb_capture = | |||
1458 | SNDRV_PCM_INFO_BATCH | | 1458 | SNDRV_PCM_INFO_BATCH | |
1459 | SNDRV_PCM_INFO_INTERLEAVED | | 1459 | SNDRV_PCM_INFO_INTERLEAVED | |
1460 | SNDRV_PCM_INFO_BLOCK_TRANSFER, | 1460 | SNDRV_PCM_INFO_BLOCK_TRANSFER, |
1461 | .buffer_bytes_max = (256*1024), | 1461 | .buffer_bytes_max = 1024 * 1024, |
1462 | .period_bytes_min = 64, | 1462 | .period_bytes_min = 64, |
1463 | .period_bytes_max = (128*1024), | 1463 | .period_bytes_max = 512 * 1024, |
1464 | .periods_min = 2, | 1464 | .periods_min = 2, |
1465 | .periods_max = 1024, | 1465 | .periods_max = 1024, |
1466 | }; | 1466 | }; |
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index e0d0365453b3..f1a2e2c2e02f 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c | |||
@@ -163,7 +163,7 @@ static const uint8_t snd_usbmidi_cin_length[] = { | |||
163 | /* | 163 | /* |
164 | * Submits the URB, with error handling. | 164 | * Submits the URB, with error handling. |
165 | */ | 165 | */ |
166 | static int snd_usbmidi_submit_urb(struct urb* urb, int flags) | 166 | static int snd_usbmidi_submit_urb(struct urb* urb, gfp_t flags) |
167 | { | 167 | { |
168 | int err = usb_submit_urb(urb, flags); | 168 | int err = usb_submit_urb(urb, flags); |
169 | if (err < 0 && err != -ENODEV) | 169 | if (err < 0 && err != -ENODEV) |
diff --git a/sound/usb/usbmixer_maps.c b/sound/usb/usbmixer_maps.c index f05500b05ec0..c1264434e50a 100644 --- a/sound/usb/usbmixer_maps.c +++ b/sound/usb/usbmixer_maps.c | |||
@@ -238,6 +238,16 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { | |||
238 | .selector_map = audigy2nx_selectors, | 238 | .selector_map = audigy2nx_selectors, |
239 | }, | 239 | }, |
240 | { | 240 | { |
241 | /* Hercules DJ Console (Windows Edition) */ | ||
242 | .id = USB_ID(0x06f8, 0xb000), | ||
243 | .ignore_ctl_error = 1, | ||
244 | }, | ||
245 | { | ||
246 | /* Hercules DJ Console (Macintosh Edition) */ | ||
247 | .id = USB_ID(0x06f8, 0xd002), | ||
248 | .ignore_ctl_error = 1, | ||
249 | }, | ||
250 | { | ||
241 | .id = USB_ID(0x08bb, 0x2702), | 251 | .id = USB_ID(0x08bb, 0x2702), |
242 | .map = linex_map, | 252 | .map = linex_map, |
243 | .ignore_ctl_error = 1, | 253 | .ignore_ctl_error = 1, |
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index f74e652a1e51..948759da6563 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h | |||
@@ -117,6 +117,10 @@ YAMAHA_DEVICE(0x103a, NULL), | |||
117 | YAMAHA_DEVICE(0x103b, NULL), | 117 | YAMAHA_DEVICE(0x103b, NULL), |
118 | YAMAHA_DEVICE(0x103c, NULL), | 118 | YAMAHA_DEVICE(0x103c, NULL), |
119 | YAMAHA_DEVICE(0x103d, NULL), | 119 | YAMAHA_DEVICE(0x103d, NULL), |
120 | YAMAHA_DEVICE(0x103e, NULL), | ||
121 | YAMAHA_DEVICE(0x103f, NULL), | ||
122 | YAMAHA_DEVICE(0x1040, NULL), | ||
123 | YAMAHA_DEVICE(0x1041, NULL), | ||
120 | YAMAHA_DEVICE(0x2000, "DGP-7"), | 124 | YAMAHA_DEVICE(0x2000, "DGP-7"), |
121 | YAMAHA_DEVICE(0x2001, "DGP-5"), | 125 | YAMAHA_DEVICE(0x2001, "DGP-5"), |
122 | YAMAHA_DEVICE(0x2002, NULL), | 126 | YAMAHA_DEVICE(0x2002, NULL), |
@@ -1010,6 +1014,40 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
1010 | } | 1014 | } |
1011 | } | 1015 | } |
1012 | }, | 1016 | }, |
1017 | { | ||
1018 | USB_DEVICE_VENDOR_SPEC(0x0582, 0x007a), | ||
1019 | .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { | ||
1020 | .vendor_name = "Roland", | ||
1021 | /* RD-700SX, RD-300SX */ | ||
1022 | .ifnum = 0, | ||
1023 | .type = QUIRK_MIDI_FIXED_ENDPOINT, | ||
1024 | .data = & (const snd_usb_midi_endpoint_info_t) { | ||
1025 | .out_cables = 0x0003, | ||
1026 | .in_cables = 0x0003 | ||
1027 | } | ||
1028 | } | ||
1029 | }, | ||
1030 | |||
1031 | /* Guillemot devices */ | ||
1032 | { | ||
1033 | /* | ||
1034 | * This is for the "Windows Edition" where the external MIDI ports are | ||
1035 | * the only MIDI ports; the control data is reported through HID | ||
1036 | * interfaces. The "Macintosh Edition" has ID 0xd002 and uses standard | ||
1037 | * compliant USB MIDI ports for external MIDI and controls. | ||
1038 | */ | ||
1039 | USB_DEVICE_VENDOR_SPEC(0x06f8, 0xb000), | ||
1040 | .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { | ||
1041 | .vendor_name = "Hercules", | ||
1042 | .product_name = "DJ Console (WE)", | ||
1043 | .ifnum = 4, | ||
1044 | .type = QUIRK_MIDI_FIXED_ENDPOINT, | ||
1045 | .data = & (const snd_usb_midi_endpoint_info_t) { | ||
1046 | .out_cables = 0x0001, | ||
1047 | .in_cables = 0x0001 | ||
1048 | } | ||
1049 | } | ||
1050 | }, | ||
1013 | 1051 | ||
1014 | /* Midiman/M-Audio devices */ | 1052 | /* Midiman/M-Audio devices */ |
1015 | { | 1053 | { |
@@ -1339,10 +1377,20 @@ YAMAHA_DEVICE(0x7010, "UB99"), | |||
1339 | } | 1377 | } |
1340 | }, | 1378 | }, |
1341 | 1379 | ||
1380 | /* TerraTec devices */ | ||
1381 | { | ||
1382 | USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012), | ||
1383 | .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { | ||
1384 | .vendor_name = "TerraTec", | ||
1385 | .product_name = "PHASE 26", | ||
1386 | .ifnum = 3, | ||
1387 | .type = QUIRK_MIDI_STANDARD_INTERFACE | ||
1388 | } | ||
1389 | }, | ||
1342 | { | 1390 | { |
1343 | USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013), | 1391 | USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013), |
1344 | .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { | 1392 | .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { |
1345 | .vendor_name = "Terratec", | 1393 | .vendor_name = "TerraTec", |
1346 | .product_name = "PHASE 26", | 1394 | .product_name = "PHASE 26", |
1347 | .ifnum = 3, | 1395 | .ifnum = 3, |
1348 | .type = QUIRK_MIDI_STANDARD_INTERFACE | 1396 | .type = QUIRK_MIDI_STANDARD_INTERFACE |