diff options
author | Paul Mackerras <paulus@samba.org> | 2006-07-31 20:37:25 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 20:37:25 -0400 |
commit | 57cad8084e0837e0f2c97da789ec9b3f36809be9 (patch) | |
tree | e9c790afb4286f78cb08d9664f58baa7e876fe55 /sound | |
parent | cb18bd40030c879cd93fef02fd579f74dbab473d (diff) | |
parent | 49b1e3ea19b1c95c2f012b8331ffb3b169e4c042 (diff) |
Merge branch 'merge'
Diffstat (limited to 'sound')
73 files changed, 915 insertions, 339 deletions
diff --git a/sound/aoa/Makefile b/sound/aoa/Makefile index d8de3e7df48d..a8c037f908f8 100644 --- a/sound/aoa/Makefile +++ b/sound/aoa/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-$(CONFIG_SND_AOA) += core/ | 1 | obj-$(CONFIG_SND_AOA) += core/ |
2 | obj-$(CONFIG_SND_AOA) += codecs/ | ||
3 | obj-$(CONFIG_SND_AOA) += fabrics/ | ||
4 | obj-$(CONFIG_SND_AOA_SOUNDBUS) += soundbus/ | 2 | obj-$(CONFIG_SND_AOA_SOUNDBUS) += soundbus/ |
3 | obj-$(CONFIG_SND_AOA) += fabrics/ | ||
4 | obj-$(CONFIG_SND_AOA) += codecs/ | ||
diff --git a/sound/aoa/codecs/snd-aoa-codec-tas-basstreble.h b/sound/aoa/codecs/snd-aoa-codec-tas-basstreble.h new file mode 100644 index 000000000000..69b61136fd54 --- /dev/null +++ b/sound/aoa/codecs/snd-aoa-codec-tas-basstreble.h | |||
@@ -0,0 +1,134 @@ | |||
1 | /* | ||
2 | * This file is only included exactly once! | ||
3 | * | ||
4 | * The tables here are derived from the tas3004 datasheet, | ||
5 | * modulo typo corrections and some smoothing... | ||
6 | */ | ||
7 | |||
8 | #define TAS3004_TREBLE_MIN 0 | ||
9 | #define TAS3004_TREBLE_MAX 72 | ||
10 | #define TAS3004_BASS_MIN 0 | ||
11 | #define TAS3004_BASS_MAX 72 | ||
12 | #define TAS3004_TREBLE_ZERO 36 | ||
13 | #define TAS3004_BASS_ZERO 36 | ||
14 | |||
15 | static u8 tas3004_treble_table[] = { | ||
16 | 150, /* -18 dB */ | ||
17 | 149, | ||
18 | 148, | ||
19 | 147, | ||
20 | 146, | ||
21 | 145, | ||
22 | 144, | ||
23 | 143, | ||
24 | 142, | ||
25 | 141, | ||
26 | 140, | ||
27 | 139, | ||
28 | 138, | ||
29 | 137, | ||
30 | 136, | ||
31 | 135, | ||
32 | 134, | ||
33 | 133, | ||
34 | 132, | ||
35 | 131, | ||
36 | 130, | ||
37 | 129, | ||
38 | 128, | ||
39 | 127, | ||
40 | 126, | ||
41 | 125, | ||
42 | 124, | ||
43 | 123, | ||
44 | 122, | ||
45 | 121, | ||
46 | 120, | ||
47 | 119, | ||
48 | 118, | ||
49 | 117, | ||
50 | 116, | ||
51 | 115, | ||
52 | 114, /* 0 dB */ | ||
53 | 113, | ||
54 | 112, | ||
55 | 111, | ||
56 | 109, | ||
57 | 108, | ||
58 | 107, | ||
59 | 105, | ||
60 | 104, | ||
61 | 103, | ||
62 | 101, | ||
63 | 99, | ||
64 | 98, | ||
65 | 96, | ||
66 | 93, | ||
67 | 91, | ||
68 | 89, | ||
69 | 86, | ||
70 | 83, | ||
71 | 81, | ||
72 | 77, | ||
73 | 74, | ||
74 | 71, | ||
75 | 67, | ||
76 | 63, | ||
77 | 59, | ||
78 | 54, | ||
79 | 49, | ||
80 | 44, | ||
81 | 38, | ||
82 | 32, | ||
83 | 26, | ||
84 | 19, | ||
85 | 10, | ||
86 | 4, | ||
87 | 2, | ||
88 | 1, /* +18 dB */ | ||
89 | }; | ||
90 | |||
91 | static inline u8 tas3004_treble(int idx) | ||
92 | { | ||
93 | return tas3004_treble_table[idx]; | ||
94 | } | ||
95 | |||
96 | /* I only save the difference here to the treble table | ||
97 | * so that the binary is smaller... | ||
98 | * I have also ignored completely differences of | ||
99 | * +/- 1 | ||
100 | */ | ||
101 | static s8 tas3004_bass_diff_to_treble[] = { | ||
102 | 2, /* 7 dB, offset 50 */ | ||
103 | 2, | ||
104 | 2, | ||
105 | 2, | ||
106 | 2, | ||
107 | 1, | ||
108 | 2, | ||
109 | 2, | ||
110 | 2, | ||
111 | 3, | ||
112 | 4, | ||
113 | 4, | ||
114 | 5, | ||
115 | 6, | ||
116 | 7, | ||
117 | 8, | ||
118 | 9, | ||
119 | 10, | ||
120 | 11, | ||
121 | 14, | ||
122 | 13, | ||
123 | 8, | ||
124 | 1, /* 18 dB */ | ||
125 | }; | ||
126 | |||
127 | static inline u8 tas3004_bass(int idx) | ||
128 | { | ||
129 | u8 result = tas3004_treble_table[idx]; | ||
130 | |||
131 | if (idx >= 50) | ||
132 | result += tas3004_bass_diff_to_treble[idx-50]; | ||
133 | return result; | ||
134 | } | ||
diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c index 2e39ff6ee349..16c0b6b0a805 100644 --- a/sound/aoa/codecs/snd-aoa-codec-tas.c +++ b/sound/aoa/codecs/snd-aoa-codec-tas.c | |||
@@ -72,22 +72,29 @@ MODULE_DESCRIPTION("tas codec driver for snd-aoa"); | |||
72 | 72 | ||
73 | #include "snd-aoa-codec-tas.h" | 73 | #include "snd-aoa-codec-tas.h" |
74 | #include "snd-aoa-codec-tas-gain-table.h" | 74 | #include "snd-aoa-codec-tas-gain-table.h" |
75 | #include "snd-aoa-codec-tas-basstreble.h" | ||
75 | #include "../aoa.h" | 76 | #include "../aoa.h" |
76 | #include "../soundbus/soundbus.h" | 77 | #include "../soundbus/soundbus.h" |
77 | 78 | ||
78 | |||
79 | #define PFX "snd-aoa-codec-tas: " | 79 | #define PFX "snd-aoa-codec-tas: " |
80 | 80 | ||
81 | |||
81 | struct tas { | 82 | struct tas { |
82 | struct aoa_codec codec; | 83 | struct aoa_codec codec; |
83 | struct i2c_client i2c; | 84 | struct i2c_client i2c; |
84 | u32 muted_l:1, muted_r:1, | 85 | u32 mute_l:1, mute_r:1 , |
85 | controls_created:1; | 86 | controls_created:1 , |
87 | drc_enabled:1, | ||
88 | hw_enabled:1; | ||
86 | u8 cached_volume_l, cached_volume_r; | 89 | u8 cached_volume_l, cached_volume_r; |
87 | u8 mixer_l[3], mixer_r[3]; | 90 | u8 mixer_l[3], mixer_r[3]; |
91 | u8 bass, treble; | ||
88 | u8 acr; | 92 | u8 acr; |
93 | int drc_range; | ||
89 | }; | 94 | }; |
90 | 95 | ||
96 | static int tas_reset_init(struct tas *tas); | ||
97 | |||
91 | static struct tas *codec_to_tas(struct aoa_codec *codec) | 98 | static struct tas *codec_to_tas(struct aoa_codec *codec) |
92 | { | 99 | { |
93 | return container_of(codec, struct tas, codec); | 100 | return container_of(codec, struct tas, codec); |
@@ -101,6 +108,44 @@ static inline int tas_write_reg(struct tas *tas, u8 reg, u8 len, u8 *data) | |||
101 | return i2c_smbus_write_i2c_block_data(&tas->i2c, reg, len, data); | 108 | return i2c_smbus_write_i2c_block_data(&tas->i2c, reg, len, data); |
102 | } | 109 | } |
103 | 110 | ||
111 | static void tas3004_set_drc(struct tas *tas) | ||
112 | { | ||
113 | unsigned char val[6]; | ||
114 | |||
115 | if (tas->drc_enabled) | ||
116 | val[0] = 0x50; /* 3:1 above threshold */ | ||
117 | else | ||
118 | val[0] = 0x51; /* disabled */ | ||
119 | val[1] = 0x02; /* 1:1 below threshold */ | ||
120 | if (tas->drc_range > 0xef) | ||
121 | val[2] = 0xef; | ||
122 | else if (tas->drc_range < 0) | ||
123 | val[2] = 0x00; | ||
124 | else | ||
125 | val[2] = tas->drc_range; | ||
126 | val[3] = 0xb0; | ||
127 | val[4] = 0x60; | ||
128 | val[5] = 0xa0; | ||
129 | |||
130 | tas_write_reg(tas, TAS_REG_DRC, 6, val); | ||
131 | } | ||
132 | |||
133 | static void tas_set_treble(struct tas *tas) | ||
134 | { | ||
135 | u8 tmp; | ||
136 | |||
137 | tmp = tas3004_treble(tas->treble); | ||
138 | tas_write_reg(tas, TAS_REG_TREBLE, 1, &tmp); | ||
139 | } | ||
140 | |||
141 | static void tas_set_bass(struct tas *tas) | ||
142 | { | ||
143 | u8 tmp; | ||
144 | |||
145 | tmp = tas3004_bass(tas->bass); | ||
146 | tas_write_reg(tas, TAS_REG_BASS, 1, &tmp); | ||
147 | } | ||
148 | |||
104 | static void tas_set_volume(struct tas *tas) | 149 | static void tas_set_volume(struct tas *tas) |
105 | { | 150 | { |
106 | u8 block[6]; | 151 | u8 block[6]; |
@@ -113,8 +158,8 @@ static void tas_set_volume(struct tas *tas) | |||
113 | if (left > 177) left = 177; | 158 | if (left > 177) left = 177; |
114 | if (right > 177) right = 177; | 159 | if (right > 177) right = 177; |
115 | 160 | ||
116 | if (tas->muted_l) left = 0; | 161 | if (tas->mute_l) left = 0; |
117 | if (tas->muted_r) right = 0; | 162 | if (tas->mute_r) right = 0; |
118 | 163 | ||
119 | /* analysing the volume and mixer tables shows | 164 | /* analysing the volume and mixer tables shows |
120 | * that they are similar enough when we shift | 165 | * that they are similar enough when we shift |
@@ -202,7 +247,8 @@ static int tas_snd_vol_put(struct snd_kcontrol *kcontrol, | |||
202 | 247 | ||
203 | tas->cached_volume_l = ucontrol->value.integer.value[0]; | 248 | tas->cached_volume_l = ucontrol->value.integer.value[0]; |
204 | tas->cached_volume_r = ucontrol->value.integer.value[1]; | 249 | tas->cached_volume_r = ucontrol->value.integer.value[1]; |
205 | tas_set_volume(tas); | 250 | if (tas->hw_enabled) |
251 | tas_set_volume(tas); | ||
206 | return 1; | 252 | return 1; |
207 | } | 253 | } |
208 | 254 | ||
@@ -230,8 +276,8 @@ static int tas_snd_mute_get(struct snd_kcontrol *kcontrol, | |||
230 | { | 276 | { |
231 | struct tas *tas = snd_kcontrol_chip(kcontrol); | 277 | struct tas *tas = snd_kcontrol_chip(kcontrol); |
232 | 278 | ||
233 | ucontrol->value.integer.value[0] = !tas->muted_l; | 279 | ucontrol->value.integer.value[0] = !tas->mute_l; |
234 | ucontrol->value.integer.value[1] = !tas->muted_r; | 280 | ucontrol->value.integer.value[1] = !tas->mute_r; |
235 | return 0; | 281 | return 0; |
236 | } | 282 | } |
237 | 283 | ||
@@ -240,13 +286,14 @@ static int tas_snd_mute_put(struct snd_kcontrol *kcontrol, | |||
240 | { | 286 | { |
241 | struct tas *tas = snd_kcontrol_chip(kcontrol); | 287 | struct tas *tas = snd_kcontrol_chip(kcontrol); |
242 | 288 | ||
243 | if (tas->muted_l == !ucontrol->value.integer.value[0] | 289 | if (tas->mute_l == !ucontrol->value.integer.value[0] |
244 | && tas->muted_r == !ucontrol->value.integer.value[1]) | 290 | && tas->mute_r == !ucontrol->value.integer.value[1]) |
245 | return 0; | 291 | return 0; |
246 | 292 | ||
247 | tas->muted_l = !ucontrol->value.integer.value[0]; | 293 | tas->mute_l = !ucontrol->value.integer.value[0]; |
248 | tas->muted_r = !ucontrol->value.integer.value[1]; | 294 | tas->mute_r = !ucontrol->value.integer.value[1]; |
249 | tas_set_volume(tas); | 295 | if (tas->hw_enabled) |
296 | tas_set_volume(tas); | ||
250 | return 1; | 297 | return 1; |
251 | } | 298 | } |
252 | 299 | ||
@@ -294,7 +341,8 @@ static int tas_snd_mixer_put(struct snd_kcontrol *kcontrol, | |||
294 | tas->mixer_l[idx] = ucontrol->value.integer.value[0]; | 341 | tas->mixer_l[idx] = ucontrol->value.integer.value[0]; |
295 | tas->mixer_r[idx] = ucontrol->value.integer.value[1]; | 342 | tas->mixer_r[idx] = ucontrol->value.integer.value[1]; |
296 | 343 | ||
297 | tas_set_mixer(tas); | 344 | if (tas->hw_enabled) |
345 | tas_set_mixer(tas); | ||
298 | return 1; | 346 | return 1; |
299 | } | 347 | } |
300 | 348 | ||
@@ -309,9 +357,93 @@ static struct snd_kcontrol_new n##_control = { \ | |||
309 | .private_value = idx, \ | 357 | .private_value = idx, \ |
310 | } | 358 | } |
311 | 359 | ||
312 | MIXER_CONTROL(pcm1, "PCM1", 0); | 360 | MIXER_CONTROL(pcm1, "PCM", 0); |
313 | MIXER_CONTROL(monitor, "Monitor", 2); | 361 | MIXER_CONTROL(monitor, "Monitor", 2); |
314 | 362 | ||
363 | static int tas_snd_drc_range_info(struct snd_kcontrol *kcontrol, | ||
364 | struct snd_ctl_elem_info *uinfo) | ||
365 | { | ||
366 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | ||
367 | uinfo->count = 1; | ||
368 | uinfo->value.integer.min = 0; | ||
369 | uinfo->value.integer.max = TAS3004_DRC_MAX; | ||
370 | return 0; | ||
371 | } | ||
372 | |||
373 | static int tas_snd_drc_range_get(struct snd_kcontrol *kcontrol, | ||
374 | struct snd_ctl_elem_value *ucontrol) | ||
375 | { | ||
376 | struct tas *tas = snd_kcontrol_chip(kcontrol); | ||
377 | |||
378 | ucontrol->value.integer.value[0] = tas->drc_range; | ||
379 | return 0; | ||
380 | } | ||
381 | |||
382 | static int tas_snd_drc_range_put(struct snd_kcontrol *kcontrol, | ||
383 | struct snd_ctl_elem_value *ucontrol) | ||
384 | { | ||
385 | struct tas *tas = snd_kcontrol_chip(kcontrol); | ||
386 | |||
387 | if (tas->drc_range == ucontrol->value.integer.value[0]) | ||
388 | return 0; | ||
389 | |||
390 | tas->drc_range = ucontrol->value.integer.value[0]; | ||
391 | if (tas->hw_enabled) | ||
392 | tas3004_set_drc(tas); | ||
393 | return 1; | ||
394 | } | ||
395 | |||
396 | static struct snd_kcontrol_new drc_range_control = { | ||
397 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
398 | .name = "DRC Range", | ||
399 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | ||
400 | .info = tas_snd_drc_range_info, | ||
401 | .get = tas_snd_drc_range_get, | ||
402 | .put = tas_snd_drc_range_put, | ||
403 | }; | ||
404 | |||
405 | static int tas_snd_drc_switch_info(struct snd_kcontrol *kcontrol, | ||
406 | struct snd_ctl_elem_info *uinfo) | ||
407 | { | ||
408 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
409 | uinfo->count = 1; | ||
410 | uinfo->value.integer.min = 0; | ||
411 | uinfo->value.integer.max = 1; | ||
412 | return 0; | ||
413 | } | ||
414 | |||
415 | static int tas_snd_drc_switch_get(struct snd_kcontrol *kcontrol, | ||
416 | struct snd_ctl_elem_value *ucontrol) | ||
417 | { | ||
418 | struct tas *tas = snd_kcontrol_chip(kcontrol); | ||
419 | |||
420 | ucontrol->value.integer.value[0] = tas->drc_enabled; | ||
421 | return 0; | ||
422 | } | ||
423 | |||
424 | static int tas_snd_drc_switch_put(struct snd_kcontrol *kcontrol, | ||
425 | struct snd_ctl_elem_value *ucontrol) | ||
426 | { | ||
427 | struct tas *tas = snd_kcontrol_chip(kcontrol); | ||
428 | |||
429 | if (tas->drc_enabled == ucontrol->value.integer.value[0]) | ||
430 | return 0; | ||
431 | |||
432 | tas->drc_enabled = ucontrol->value.integer.value[0]; | ||
433 | if (tas->hw_enabled) | ||
434 | tas3004_set_drc(tas); | ||
435 | return 1; | ||
436 | } | ||
437 | |||
438 | static struct snd_kcontrol_new drc_switch_control = { | ||
439 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
440 | .name = "DRC Range Switch", | ||
441 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | ||
442 | .info = tas_snd_drc_switch_info, | ||
443 | .get = tas_snd_drc_switch_get, | ||
444 | .put = tas_snd_drc_switch_put, | ||
445 | }; | ||
446 | |||
315 | static int tas_snd_capture_source_info(struct snd_kcontrol *kcontrol, | 447 | static int tas_snd_capture_source_info(struct snd_kcontrol *kcontrol, |
316 | struct snd_ctl_elem_info *uinfo) | 448 | struct snd_ctl_elem_info *uinfo) |
317 | { | 449 | { |
@@ -346,7 +478,8 @@ static int tas_snd_capture_source_put(struct snd_kcontrol *kcontrol, | |||
346 | tas->acr |= TAS_ACR_INPUT_B; | 478 | tas->acr |= TAS_ACR_INPUT_B; |
347 | if (oldacr == tas->acr) | 479 | if (oldacr == tas->acr) |
348 | return 0; | 480 | return 0; |
349 | tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr); | 481 | if (tas->hw_enabled) |
482 | tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr); | ||
350 | return 1; | 483 | return 1; |
351 | } | 484 | } |
352 | 485 | ||
@@ -370,6 +503,89 @@ static struct snd_kcontrol_new capture_source_control = { | |||
370 | .put = tas_snd_capture_source_put, | 503 | .put = tas_snd_capture_source_put, |
371 | }; | 504 | }; |
372 | 505 | ||
506 | static int tas_snd_treble_info(struct snd_kcontrol *kcontrol, | ||
507 | struct snd_ctl_elem_info *uinfo) | ||
508 | { | ||
509 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | ||
510 | uinfo->count = 1; | ||
511 | uinfo->value.integer.min = TAS3004_TREBLE_MIN; | ||
512 | uinfo->value.integer.max = TAS3004_TREBLE_MAX; | ||
513 | return 0; | ||
514 | } | ||
515 | |||
516 | static int tas_snd_treble_get(struct snd_kcontrol *kcontrol, | ||
517 | struct snd_ctl_elem_value *ucontrol) | ||
518 | { | ||
519 | struct tas *tas = snd_kcontrol_chip(kcontrol); | ||
520 | |||
521 | ucontrol->value.integer.value[0] = tas->treble; | ||
522 | return 0; | ||
523 | } | ||
524 | |||
525 | static int tas_snd_treble_put(struct snd_kcontrol *kcontrol, | ||
526 | struct snd_ctl_elem_value *ucontrol) | ||
527 | { | ||
528 | struct tas *tas = snd_kcontrol_chip(kcontrol); | ||
529 | |||
530 | if (tas->treble == ucontrol->value.integer.value[0]) | ||
531 | return 0; | ||
532 | |||
533 | tas->treble = ucontrol->value.integer.value[0]; | ||
534 | if (tas->hw_enabled) | ||
535 | tas_set_treble(tas); | ||
536 | return 1; | ||
537 | } | ||
538 | |||
539 | static struct snd_kcontrol_new treble_control = { | ||
540 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
541 | .name = "Treble", | ||
542 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | ||
543 | .info = tas_snd_treble_info, | ||
544 | .get = tas_snd_treble_get, | ||
545 | .put = tas_snd_treble_put, | ||
546 | }; | ||
547 | |||
548 | static int tas_snd_bass_info(struct snd_kcontrol *kcontrol, | ||
549 | struct snd_ctl_elem_info *uinfo) | ||
550 | { | ||
551 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | ||
552 | uinfo->count = 1; | ||
553 | uinfo->value.integer.min = TAS3004_BASS_MIN; | ||
554 | uinfo->value.integer.max = TAS3004_BASS_MAX; | ||
555 | return 0; | ||
556 | } | ||
557 | |||
558 | static int tas_snd_bass_get(struct snd_kcontrol *kcontrol, | ||
559 | struct snd_ctl_elem_value *ucontrol) | ||
560 | { | ||
561 | struct tas *tas = snd_kcontrol_chip(kcontrol); | ||
562 | |||
563 | ucontrol->value.integer.value[0] = tas->bass; | ||
564 | return 0; | ||
565 | } | ||
566 | |||
567 | static int tas_snd_bass_put(struct snd_kcontrol *kcontrol, | ||
568 | struct snd_ctl_elem_value *ucontrol) | ||
569 | { | ||
570 | struct tas *tas = snd_kcontrol_chip(kcontrol); | ||
571 | |||
572 | if (tas->bass == ucontrol->value.integer.value[0]) | ||
573 | return 0; | ||
574 | |||
575 | tas->bass = ucontrol->value.integer.value[0]; | ||
576 | if (tas->hw_enabled) | ||
577 | tas_set_bass(tas); | ||
578 | return 1; | ||
579 | } | ||
580 | |||
581 | static struct snd_kcontrol_new bass_control = { | ||
582 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
583 | .name = "Bass", | ||
584 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | ||
585 | .info = tas_snd_bass_info, | ||
586 | .get = tas_snd_bass_get, | ||
587 | .put = tas_snd_bass_put, | ||
588 | }; | ||
373 | 589 | ||
374 | static struct transfer_info tas_transfers[] = { | 590 | static struct transfer_info tas_transfers[] = { |
375 | { | 591 | { |
@@ -399,26 +615,67 @@ static int tas_usable(struct codec_info_item *cii, | |||
399 | static int tas_reset_init(struct tas *tas) | 615 | static int tas_reset_init(struct tas *tas) |
400 | { | 616 | { |
401 | u8 tmp; | 617 | u8 tmp; |
618 | |||
619 | tas->codec.gpio->methods->all_amps_off(tas->codec.gpio); | ||
620 | msleep(5); | ||
402 | tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0); | 621 | tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0); |
403 | msleep(1); | 622 | msleep(5); |
404 | tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 1); | 623 | tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 1); |
405 | msleep(1); | 624 | msleep(20); |
406 | tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0); | 625 | tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0); |
407 | msleep(1); | 626 | msleep(10); |
408 | 627 | tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio); | |
409 | tas->acr &= ~TAS_ACR_ANALOG_PDOWN; | ||
410 | tas->acr |= TAS_ACR_B_MONAUREAL | TAS_ACR_B_MON_SEL_RIGHT; | ||
411 | if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr)) | ||
412 | return -ENODEV; | ||
413 | 628 | ||
414 | tmp = TAS_MCS_SCLK64 | TAS_MCS_SPORT_MODE_I2S | TAS_MCS_SPORT_WL_24BIT; | 629 | tmp = TAS_MCS_SCLK64 | TAS_MCS_SPORT_MODE_I2S | TAS_MCS_SPORT_WL_24BIT; |
415 | if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp)) | 630 | if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp)) |
416 | return -ENODEV; | 631 | return -ENODEV; |
417 | 632 | ||
633 | tas->acr |= TAS_ACR_ANALOG_PDOWN | TAS_ACR_B_MONAUREAL | | ||
634 | TAS_ACR_B_MON_SEL_RIGHT; | ||
635 | if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr)) | ||
636 | return -ENODEV; | ||
637 | |||
418 | tmp = 0; | 638 | tmp = 0; |
419 | if (tas_write_reg(tas, TAS_REG_MCS2, 1, &tmp)) | 639 | if (tas_write_reg(tas, TAS_REG_MCS2, 1, &tmp)) |
420 | return -ENODEV; | 640 | return -ENODEV; |
421 | 641 | ||
642 | tas3004_set_drc(tas); | ||
643 | |||
644 | /* Set treble & bass to 0dB */ | ||
645 | tas->treble = TAS3004_TREBLE_ZERO; | ||
646 | tas->bass = TAS3004_BASS_ZERO; | ||
647 | tas_set_treble(tas); | ||
648 | tas_set_bass(tas); | ||
649 | |||
650 | tas->acr &= ~TAS_ACR_ANALOG_PDOWN; | ||
651 | if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr)) | ||
652 | return -ENODEV; | ||
653 | |||
654 | return 0; | ||
655 | } | ||
656 | |||
657 | static int tas_switch_clock(struct codec_info_item *cii, enum clock_switch clock) | ||
658 | { | ||
659 | struct tas *tas = cii->codec_data; | ||
660 | |||
661 | switch(clock) { | ||
662 | case CLOCK_SWITCH_PREPARE_SLAVE: | ||
663 | /* Clocks are going away, mute mute mute */ | ||
664 | tas->codec.gpio->methods->all_amps_off(tas->codec.gpio); | ||
665 | tas->hw_enabled = 0; | ||
666 | break; | ||
667 | case CLOCK_SWITCH_SLAVE: | ||
668 | /* Clocks are back, re-init the codec */ | ||
669 | tas_reset_init(tas); | ||
670 | tas_set_volume(tas); | ||
671 | tas_set_mixer(tas); | ||
672 | tas->hw_enabled = 1; | ||
673 | tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio); | ||
674 | break; | ||
675 | default: | ||
676 | /* doesn't happen as of now */ | ||
677 | return -EINVAL; | ||
678 | } | ||
422 | return 0; | 679 | return 0; |
423 | } | 680 | } |
424 | 681 | ||
@@ -427,6 +684,7 @@ static int tas_reset_init(struct tas *tas) | |||
427 | * our i2c device is suspended, and then take note of that! */ | 684 | * our i2c device is suspended, and then take note of that! */ |
428 | static int tas_suspend(struct tas *tas) | 685 | static int tas_suspend(struct tas *tas) |
429 | { | 686 | { |
687 | tas->hw_enabled = 0; | ||
430 | tas->acr |= TAS_ACR_ANALOG_PDOWN; | 688 | tas->acr |= TAS_ACR_ANALOG_PDOWN; |
431 | tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr); | 689 | tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr); |
432 | return 0; | 690 | return 0; |
@@ -438,6 +696,7 @@ static int tas_resume(struct tas *tas) | |||
438 | tas_reset_init(tas); | 696 | tas_reset_init(tas); |
439 | tas_set_volume(tas); | 697 | tas_set_volume(tas); |
440 | tas_set_mixer(tas); | 698 | tas_set_mixer(tas); |
699 | tas->hw_enabled = 1; | ||
441 | return 0; | 700 | return 0; |
442 | } | 701 | } |
443 | 702 | ||
@@ -463,6 +722,7 @@ static struct codec_info tas_codec_info = { | |||
463 | .bus_factor = 64, | 722 | .bus_factor = 64, |
464 | .owner = THIS_MODULE, | 723 | .owner = THIS_MODULE, |
465 | .usable = tas_usable, | 724 | .usable = tas_usable, |
725 | .switch_clock = tas_switch_clock, | ||
466 | #ifdef CONFIG_PM | 726 | #ifdef CONFIG_PM |
467 | .suspend = _tas_suspend, | 727 | .suspend = _tas_suspend, |
468 | .resume = _tas_resume, | 728 | .resume = _tas_resume, |
@@ -483,6 +743,7 @@ static int tas_init_codec(struct aoa_codec *codec) | |||
483 | printk(KERN_ERR PFX "tas failed to initialise\n"); | 743 | printk(KERN_ERR PFX "tas failed to initialise\n"); |
484 | return -ENXIO; | 744 | return -ENXIO; |
485 | } | 745 | } |
746 | tas->hw_enabled = 1; | ||
486 | 747 | ||
487 | if (tas->codec.soundbus_dev->attach_codec(tas->codec.soundbus_dev, | 748 | if (tas->codec.soundbus_dev->attach_codec(tas->codec.soundbus_dev, |
488 | aoa_get_card(), | 749 | aoa_get_card(), |
@@ -515,6 +776,22 @@ static int tas_init_codec(struct aoa_codec *codec) | |||
515 | if (err) | 776 | if (err) |
516 | goto error; | 777 | goto error; |
517 | 778 | ||
779 | err = aoa_snd_ctl_add(snd_ctl_new1(&drc_range_control, tas)); | ||
780 | if (err) | ||
781 | goto error; | ||
782 | |||
783 | err = aoa_snd_ctl_add(snd_ctl_new1(&drc_switch_control, tas)); | ||
784 | if (err) | ||
785 | goto error; | ||
786 | |||
787 | err = aoa_snd_ctl_add(snd_ctl_new1(&treble_control, tas)); | ||
788 | if (err) | ||
789 | goto error; | ||
790 | |||
791 | err = aoa_snd_ctl_add(snd_ctl_new1(&bass_control, tas)); | ||
792 | if (err) | ||
793 | goto error; | ||
794 | |||
518 | return 0; | 795 | return 0; |
519 | error: | 796 | error: |
520 | tas->codec.soundbus_dev->detach_codec(tas->codec.soundbus_dev, tas); | 797 | tas->codec.soundbus_dev->detach_codec(tas->codec.soundbus_dev, tas); |
@@ -548,6 +825,8 @@ static int tas_create(struct i2c_adapter *adapter, | |||
548 | tas->i2c.driver = &tas_driver; | 825 | tas->i2c.driver = &tas_driver; |
549 | tas->i2c.adapter = adapter; | 826 | tas->i2c.adapter = adapter; |
550 | tas->i2c.addr = addr; | 827 | tas->i2c.addr = addr; |
828 | /* seems that half is a saner default */ | ||
829 | tas->drc_range = TAS3004_DRC_MAX / 2; | ||
551 | strlcpy(tas->i2c.name, "tas audio codec", I2C_NAME_SIZE-1); | 830 | strlcpy(tas->i2c.name, "tas audio codec", I2C_NAME_SIZE-1); |
552 | 831 | ||
553 | if (i2c_attach_client(&tas->i2c)) { | 832 | if (i2c_attach_client(&tas->i2c)) { |
@@ -564,7 +843,9 @@ static int tas_create(struct i2c_adapter *adapter, | |||
564 | if (aoa_codec_register(&tas->codec)) { | 843 | if (aoa_codec_register(&tas->codec)) { |
565 | goto detach; | 844 | goto detach; |
566 | } | 845 | } |
567 | printk(KERN_DEBUG "snd-aoa-codec-tas: created and attached tas instance\n"); | 846 | printk(KERN_DEBUG |
847 | "snd-aoa-codec-tas: tas found, addr 0x%02x on %s\n", | ||
848 | addr, node->full_name); | ||
568 | return 0; | 849 | return 0; |
569 | detach: | 850 | detach: |
570 | i2c_detach_client(&tas->i2c); | 851 | i2c_detach_client(&tas->i2c); |
diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.h b/sound/aoa/codecs/snd-aoa-codec-tas.h index daf81f45d83a..ae177e3466e6 100644 --- a/sound/aoa/codecs/snd-aoa-codec-tas.h +++ b/sound/aoa/codecs/snd-aoa-codec-tas.h | |||
@@ -44,4 +44,12 @@ | |||
44 | #define TAS_REG_LEFT_BIQUAD6 0x10 | 44 | #define TAS_REG_LEFT_BIQUAD6 0x10 |
45 | #define TAS_REG_RIGHT_BIQUAD6 0x19 | 45 | #define TAS_REG_RIGHT_BIQUAD6 0x19 |
46 | 46 | ||
47 | #define TAS_REG_LEFT_LOUDNESS 0x21 | ||
48 | #define TAS_REG_RIGHT_LOUDNESS 0x22 | ||
49 | #define TAS_REG_LEFT_LOUDNESS_GAIN 0x23 | ||
50 | #define TAS_REG_RIGHT_LOUDNESS_GAIN 0x24 | ||
51 | |||
52 | #define TAS3001_DRC_MAX 0x5f | ||
53 | #define TAS3004_DRC_MAX 0xef | ||
54 | |||
47 | #endif /* __SND_AOA_CODECTASH */ | 55 | #endif /* __SND_AOA_CODECTASH */ |
diff --git a/sound/aoa/core/snd-aoa-gpio-pmf.c b/sound/aoa/core/snd-aoa-gpio-pmf.c index 0e9b9bb2a6de..3d57fd1aec4b 100644 --- a/sound/aoa/core/snd-aoa-gpio-pmf.c +++ b/sound/aoa/core/snd-aoa-gpio-pmf.c | |||
@@ -14,9 +14,13 @@ | |||
14 | static void pmf_gpio_set_##name(struct gpio_runtime *rt, int on)\ | 14 | static void pmf_gpio_set_##name(struct gpio_runtime *rt, int on)\ |
15 | { \ | 15 | { \ |
16 | struct pmf_args args = { .count = 1, .u[0].v = !on }; \ | 16 | struct pmf_args args = { .count = 1, .u[0].v = !on }; \ |
17 | \ | 17 | int rc; \ |
18 | \ | ||
18 | if (unlikely(!rt)) return; \ | 19 | if (unlikely(!rt)) return; \ |
19 | pmf_call_function(rt->node, #name "-mute", &args); \ | 20 | rc = pmf_call_function(rt->node, #name "-mute", &args); \ |
21 | if (rc) \ | ||
22 | printk(KERN_WARNING "pmf_gpio_set_" #name \ | ||
23 | " failed, rc: %d\n", rc); \ | ||
20 | rt->implementation_private &= ~(1<<bit); \ | 24 | rt->implementation_private &= ~(1<<bit); \ |
21 | rt->implementation_private |= (!!on << bit); \ | 25 | rt->implementation_private |= (!!on << bit); \ |
22 | } \ | 26 | } \ |
@@ -33,9 +37,13 @@ PMF_GPIO(lineout, 2); | |||
33 | static void pmf_gpio_set_hw_reset(struct gpio_runtime *rt, int on) | 37 | static void pmf_gpio_set_hw_reset(struct gpio_runtime *rt, int on) |
34 | { | 38 | { |
35 | struct pmf_args args = { .count = 1, .u[0].v = !!on }; | 39 | struct pmf_args args = { .count = 1, .u[0].v = !!on }; |
40 | int rc; | ||
36 | 41 | ||
37 | if (unlikely(!rt)) return; | 42 | if (unlikely(!rt)) return; |
38 | pmf_call_function(rt->node, "hw-reset", &args); | 43 | rc = pmf_call_function(rt->node, "hw-reset", &args); |
44 | if (rc) | ||
45 | printk(KERN_WARNING "pmf_gpio_set_hw_reset" | ||
46 | " failed, rc: %d\n", rc); | ||
39 | } | 47 | } |
40 | 48 | ||
41 | static void pmf_gpio_all_amps_off(struct gpio_runtime *rt) | 49 | static void pmf_gpio_all_amps_off(struct gpio_runtime *rt) |
diff --git a/sound/aoa/fabrics/snd-aoa-fabric-layout.c b/sound/aoa/fabrics/snd-aoa-fabric-layout.c index cbc8a3b5cea4..172eb95476c0 100644 --- a/sound/aoa/fabrics/snd-aoa-fabric-layout.c +++ b/sound/aoa/fabrics/snd-aoa-fabric-layout.c | |||
@@ -77,24 +77,39 @@ struct layout { | |||
77 | int pcmid; | 77 | int pcmid; |
78 | }; | 78 | }; |
79 | 79 | ||
80 | MODULE_ALIAS("sound-layout-36"); | ||
80 | MODULE_ALIAS("sound-layout-41"); | 81 | MODULE_ALIAS("sound-layout-41"); |
81 | MODULE_ALIAS("sound-layout-45"); | 82 | MODULE_ALIAS("sound-layout-45"); |
83 | MODULE_ALIAS("sound-layout-47"); | ||
84 | MODULE_ALIAS("sound-layout-48"); | ||
85 | MODULE_ALIAS("sound-layout-49"); | ||
86 | MODULE_ALIAS("sound-layout-50"); | ||
82 | MODULE_ALIAS("sound-layout-51"); | 87 | MODULE_ALIAS("sound-layout-51"); |
88 | MODULE_ALIAS("sound-layout-56"); | ||
89 | MODULE_ALIAS("sound-layout-57"); | ||
83 | MODULE_ALIAS("sound-layout-58"); | 90 | MODULE_ALIAS("sound-layout-58"); |
84 | MODULE_ALIAS("sound-layout-60"); | 91 | MODULE_ALIAS("sound-layout-60"); |
85 | MODULE_ALIAS("sound-layout-61"); | 92 | MODULE_ALIAS("sound-layout-61"); |
93 | MODULE_ALIAS("sound-layout-62"); | ||
86 | MODULE_ALIAS("sound-layout-64"); | 94 | MODULE_ALIAS("sound-layout-64"); |
87 | MODULE_ALIAS("sound-layout-65"); | 95 | MODULE_ALIAS("sound-layout-65"); |
96 | MODULE_ALIAS("sound-layout-66"); | ||
97 | MODULE_ALIAS("sound-layout-67"); | ||
88 | MODULE_ALIAS("sound-layout-68"); | 98 | MODULE_ALIAS("sound-layout-68"); |
89 | MODULE_ALIAS("sound-layout-69"); | 99 | MODULE_ALIAS("sound-layout-69"); |
90 | MODULE_ALIAS("sound-layout-70"); | 100 | MODULE_ALIAS("sound-layout-70"); |
91 | MODULE_ALIAS("sound-layout-72"); | 101 | MODULE_ALIAS("sound-layout-72"); |
102 | MODULE_ALIAS("sound-layout-76"); | ||
92 | MODULE_ALIAS("sound-layout-80"); | 103 | MODULE_ALIAS("sound-layout-80"); |
93 | MODULE_ALIAS("sound-layout-82"); | 104 | MODULE_ALIAS("sound-layout-82"); |
94 | MODULE_ALIAS("sound-layout-84"); | 105 | MODULE_ALIAS("sound-layout-84"); |
95 | MODULE_ALIAS("sound-layout-86"); | 106 | MODULE_ALIAS("sound-layout-86"); |
107 | MODULE_ALIAS("sound-layout-90"); | ||
96 | MODULE_ALIAS("sound-layout-92"); | 108 | MODULE_ALIAS("sound-layout-92"); |
109 | MODULE_ALIAS("sound-layout-94"); | ||
97 | MODULE_ALIAS("sound-layout-96"); | 110 | MODULE_ALIAS("sound-layout-96"); |
111 | MODULE_ALIAS("sound-layout-98"); | ||
112 | MODULE_ALIAS("sound-layout-100"); | ||
98 | 113 | ||
99 | /* onyx with all but microphone connected */ | 114 | /* onyx with all but microphone connected */ |
100 | static struct codec_connection onyx_connections_nomic[] = { | 115 | static struct codec_connection onyx_connections_nomic[] = { |
@@ -950,11 +965,12 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev) | |||
950 | layout_id = (unsigned int *) get_property(sound, "layout-id", NULL); | 965 | layout_id = (unsigned int *) get_property(sound, "layout-id", NULL); |
951 | if (!layout_id) | 966 | if (!layout_id) |
952 | goto outnodev; | 967 | goto outnodev; |
953 | printk(KERN_INFO "snd-aoa-fabric-layout: found bus with layout %d ", *layout_id); | 968 | printk(KERN_INFO "snd-aoa-fabric-layout: found bus with layout %d\n", |
969 | *layout_id); | ||
954 | 970 | ||
955 | layout = find_layout_by_id(*layout_id); | 971 | layout = find_layout_by_id(*layout_id); |
956 | if (!layout) { | 972 | if (!layout) { |
957 | printk("(no idea how to handle)\n"); | 973 | printk(KERN_ERR "snd-aoa-fabric-layout: unknown layout\n"); |
958 | goto outnodev; | 974 | goto outnodev; |
959 | } | 975 | } |
960 | 976 | ||
@@ -972,15 +988,17 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev) | |||
972 | case 51: /* PowerBook5,4 */ | 988 | case 51: /* PowerBook5,4 */ |
973 | case 58: /* Mac Mini */ | 989 | case 58: /* Mac Mini */ |
974 | ldev->gpio.methods = ftr_gpio_methods; | 990 | ldev->gpio.methods = ftr_gpio_methods; |
991 | printk(KERN_DEBUG | ||
992 | "snd-aoa-fabric-layout: Using direct GPIOs\n"); | ||
975 | break; | 993 | break; |
976 | default: | 994 | default: |
977 | ldev->gpio.methods = pmf_gpio_methods; | 995 | ldev->gpio.methods = pmf_gpio_methods; |
996 | printk(KERN_DEBUG | ||
997 | "snd-aoa-fabric-layout: Using PMF GPIOs\n"); | ||
978 | } | 998 | } |
979 | ldev->selfptr_headphone.ptr = ldev; | 999 | ldev->selfptr_headphone.ptr = ldev; |
980 | ldev->selfptr_lineout.ptr = ldev; | 1000 | ldev->selfptr_lineout.ptr = ldev; |
981 | sdev->ofdev.dev.driver_data = ldev; | 1001 | sdev->ofdev.dev.driver_data = ldev; |
982 | |||
983 | printk("(using)\n"); | ||
984 | list_add(&ldev->list, &layouts_list); | 1002 | list_add(&ldev->list, &layouts_list); |
985 | layouts_list_items++; | 1003 | layouts_list_items++; |
986 | 1004 | ||
diff --git a/sound/aoa/soundbus/core.c b/sound/aoa/soundbus/core.c index abe84a76c835..47b3e3768df0 100644 --- a/sound/aoa/soundbus/core.c +++ b/sound/aoa/soundbus/core.c | |||
@@ -194,16 +194,6 @@ static struct bus_type soundbus_bus_type = { | |||
194 | .dev_attrs = soundbus_dev_attrs, | 194 | .dev_attrs = soundbus_dev_attrs, |
195 | }; | 195 | }; |
196 | 196 | ||
197 | static int __init soundbus_init(void) | ||
198 | { | ||
199 | return bus_register(&soundbus_bus_type); | ||
200 | } | ||
201 | |||
202 | static void __exit soundbus_exit(void) | ||
203 | { | ||
204 | bus_unregister(&soundbus_bus_type); | ||
205 | } | ||
206 | |||
207 | int soundbus_add_one(struct soundbus_dev *dev) | 197 | int soundbus_add_one(struct soundbus_dev *dev) |
208 | { | 198 | { |
209 | static int devcount; | 199 | static int devcount; |
@@ -246,5 +236,15 @@ void soundbus_unregister_driver(struct soundbus_driver *drv) | |||
246 | } | 236 | } |
247 | EXPORT_SYMBOL_GPL(soundbus_unregister_driver); | 237 | EXPORT_SYMBOL_GPL(soundbus_unregister_driver); |
248 | 238 | ||
249 | module_init(soundbus_init); | 239 | static int __init soundbus_init(void) |
240 | { | ||
241 | return bus_register(&soundbus_bus_type); | ||
242 | } | ||
243 | |||
244 | static void __exit soundbus_exit(void) | ||
245 | { | ||
246 | bus_unregister(&soundbus_bus_type); | ||
247 | } | ||
248 | |||
249 | subsys_initcall(soundbus_init); | ||
250 | module_exit(soundbus_exit); | 250 | module_exit(soundbus_exit); |
diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-control.c b/sound/aoa/soundbus/i2sbus/i2sbus-control.c index f50407952d3c..87beb4ad4d63 100644 --- a/sound/aoa/soundbus/i2sbus/i2sbus-control.c +++ b/sound/aoa/soundbus/i2sbus/i2sbus-control.c | |||
@@ -6,12 +6,16 @@ | |||
6 | * GPL v2, can be found in COPYING. | 6 | * GPL v2, can be found in COPYING. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <asm/io.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
11 | |||
12 | #include <asm/io.h> | ||
11 | #include <asm/prom.h> | 13 | #include <asm/prom.h> |
12 | #include <asm/macio.h> | 14 | #include <asm/macio.h> |
13 | #include <asm/pmac_feature.h> | 15 | #include <asm/pmac_feature.h> |
14 | #include <asm/pmac_pfunc.h> | 16 | #include <asm/pmac_pfunc.h> |
17 | #include <asm/keylargo.h> | ||
18 | |||
15 | #include "i2sbus.h" | 19 | #include "i2sbus.h" |
16 | 20 | ||
17 | int i2sbus_control_init(struct macio_dev* dev, struct i2sbus_control **c) | 21 | int i2sbus_control_init(struct macio_dev* dev, struct i2sbus_control **c) |
@@ -22,26 +26,12 @@ int i2sbus_control_init(struct macio_dev* dev, struct i2sbus_control **c) | |||
22 | 26 | ||
23 | INIT_LIST_HEAD(&(*c)->list); | 27 | INIT_LIST_HEAD(&(*c)->list); |
24 | 28 | ||
25 | if (of_address_to_resource(dev->ofdev.node, 0, &(*c)->rsrc)) | 29 | (*c)->macio = dev->bus->chip; |
26 | goto err; | ||
27 | /* we really should be using feature calls instead of mapping | ||
28 | * these registers. It's safe for now since no one else is | ||
29 | * touching them... */ | ||
30 | (*c)->controlregs = ioremap((*c)->rsrc.start, | ||
31 | sizeof(struct i2s_control_regs)); | ||
32 | if (!(*c)->controlregs) | ||
33 | goto err; | ||
34 | |||
35 | return 0; | 30 | return 0; |
36 | err: | ||
37 | kfree(*c); | ||
38 | *c = NULL; | ||
39 | return -ENODEV; | ||
40 | } | 31 | } |
41 | 32 | ||
42 | void i2sbus_control_destroy(struct i2sbus_control *c) | 33 | void i2sbus_control_destroy(struct i2sbus_control *c) |
43 | { | 34 | { |
44 | iounmap(c->controlregs); | ||
45 | kfree(c); | 35 | kfree(c); |
46 | } | 36 | } |
47 | 37 | ||
@@ -93,19 +83,22 @@ int i2sbus_control_enable(struct i2sbus_control *c, | |||
93 | struct i2sbus_dev *i2sdev) | 83 | struct i2sbus_dev *i2sdev) |
94 | { | 84 | { |
95 | struct pmf_args args = { .count = 0 }; | 85 | struct pmf_args args = { .count = 0 }; |
96 | int cc; | 86 | struct macio_chip *macio = c->macio; |
97 | 87 | ||
98 | if (i2sdev->enable) | 88 | if (i2sdev->enable) |
99 | return pmf_call_one(i2sdev->enable, &args); | 89 | return pmf_call_one(i2sdev->enable, &args); |
100 | 90 | ||
91 | if (macio == NULL || macio->base == NULL) | ||
92 | return -ENODEV; | ||
93 | |||
101 | switch (i2sdev->bus_number) { | 94 | switch (i2sdev->bus_number) { |
102 | case 0: | 95 | case 0: |
103 | cc = in_le32(&c->controlregs->cell_control); | 96 | /* these need to be locked or done through |
104 | out_le32(&c->controlregs->cell_control, cc | CTRL_CLOCK_INTF_0_ENABLE); | 97 | * newly created feature calls! */ |
98 | MACIO_BIS(KEYLARGO_FCR1, KL1_I2S0_ENABLE); | ||
105 | break; | 99 | break; |
106 | case 1: | 100 | case 1: |
107 | cc = in_le32(&c->controlregs->cell_control); | 101 | MACIO_BIS(KEYLARGO_FCR1, KL1_I2S1_ENABLE); |
108 | out_le32(&c->controlregs->cell_control, cc | CTRL_CLOCK_INTF_1_ENABLE); | ||
109 | break; | 102 | break; |
110 | default: | 103 | default: |
111 | return -ENODEV; | 104 | return -ENODEV; |
@@ -118,7 +111,7 @@ int i2sbus_control_cell(struct i2sbus_control *c, | |||
118 | int enable) | 111 | int enable) |
119 | { | 112 | { |
120 | struct pmf_args args = { .count = 0 }; | 113 | struct pmf_args args = { .count = 0 }; |
121 | int cc; | 114 | struct macio_chip *macio = c->macio; |
122 | 115 | ||
123 | switch (enable) { | 116 | switch (enable) { |
124 | case 0: | 117 | case 0: |
@@ -133,18 +126,22 @@ int i2sbus_control_cell(struct i2sbus_control *c, | |||
133 | printk(KERN_ERR "i2sbus: INVALID CELL ENABLE VALUE\n"); | 126 | printk(KERN_ERR "i2sbus: INVALID CELL ENABLE VALUE\n"); |
134 | return -ENODEV; | 127 | return -ENODEV; |
135 | } | 128 | } |
129 | |||
130 | if (macio == NULL || macio->base == NULL) | ||
131 | return -ENODEV; | ||
132 | |||
136 | switch (i2sdev->bus_number) { | 133 | switch (i2sdev->bus_number) { |
137 | case 0: | 134 | case 0: |
138 | cc = in_le32(&c->controlregs->cell_control); | 135 | if (enable) |
139 | cc &= ~CTRL_CLOCK_CELL_0_ENABLE; | 136 | MACIO_BIS(KEYLARGO_FCR1, KL1_I2S0_CELL_ENABLE); |
140 | cc |= enable * CTRL_CLOCK_CELL_0_ENABLE; | 137 | else |
141 | out_le32(&c->controlregs->cell_control, cc); | 138 | MACIO_BIC(KEYLARGO_FCR1, KL1_I2S0_CELL_ENABLE); |
142 | break; | 139 | break; |
143 | case 1: | 140 | case 1: |
144 | cc = in_le32(&c->controlregs->cell_control); | 141 | if (enable) |
145 | cc &= ~CTRL_CLOCK_CELL_1_ENABLE; | 142 | MACIO_BIS(KEYLARGO_FCR1, KL1_I2S1_CELL_ENABLE); |
146 | cc |= enable * CTRL_CLOCK_CELL_1_ENABLE; | 143 | else |
147 | out_le32(&c->controlregs->cell_control, cc); | 144 | MACIO_BIC(KEYLARGO_FCR1, KL1_I2S1_CELL_ENABLE); |
148 | break; | 145 | break; |
149 | default: | 146 | default: |
150 | return -ENODEV; | 147 | return -ENODEV; |
@@ -157,7 +154,7 @@ int i2sbus_control_clock(struct i2sbus_control *c, | |||
157 | int enable) | 154 | int enable) |
158 | { | 155 | { |
159 | struct pmf_args args = { .count = 0 }; | 156 | struct pmf_args args = { .count = 0 }; |
160 | int cc; | 157 | struct macio_chip *macio = c->macio; |
161 | 158 | ||
162 | switch (enable) { | 159 | switch (enable) { |
163 | case 0: | 160 | case 0: |
@@ -172,18 +169,22 @@ int i2sbus_control_clock(struct i2sbus_control *c, | |||
172 | printk(KERN_ERR "i2sbus: INVALID CLOCK ENABLE VALUE\n"); | 169 | printk(KERN_ERR "i2sbus: INVALID CLOCK ENABLE VALUE\n"); |
173 | return -ENODEV; | 170 | return -ENODEV; |
174 | } | 171 | } |
172 | |||
173 | if (macio == NULL || macio->base == NULL) | ||
174 | return -ENODEV; | ||
175 | |||
175 | switch (i2sdev->bus_number) { | 176 | switch (i2sdev->bus_number) { |
176 | case 0: | 177 | case 0: |
177 | cc = in_le32(&c->controlregs->cell_control); | 178 | if (enable) |
178 | cc &= ~CTRL_CLOCK_CLOCK_0_ENABLE; | 179 | MACIO_BIS(KEYLARGO_FCR1, KL1_I2S0_CLK_ENABLE_BIT); |
179 | cc |= enable * CTRL_CLOCK_CLOCK_0_ENABLE; | 180 | else |
180 | out_le32(&c->controlregs->cell_control, cc); | 181 | MACIO_BIC(KEYLARGO_FCR1, KL1_I2S0_CLK_ENABLE_BIT); |
181 | break; | 182 | break; |
182 | case 1: | 183 | case 1: |
183 | cc = in_le32(&c->controlregs->cell_control); | 184 | if (enable) |
184 | cc &= ~CTRL_CLOCK_CLOCK_1_ENABLE; | 185 | MACIO_BIS(KEYLARGO_FCR1, KL1_I2S1_CLK_ENABLE_BIT); |
185 | cc |= enable * CTRL_CLOCK_CLOCK_1_ENABLE; | 186 | else |
186 | out_le32(&c->controlregs->cell_control, cc); | 187 | MACIO_BIC(KEYLARGO_FCR1, KL1_I2S1_CLK_ENABLE_BIT); |
187 | break; | 188 | break; |
188 | default: | 189 | default: |
189 | return -ENODEV; | 190 | return -ENODEV; |
diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-control.h b/sound/aoa/soundbus/i2sbus/i2sbus-control.h deleted file mode 100644 index bb05550f730b..000000000000 --- a/sound/aoa/soundbus/i2sbus/i2sbus-control.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * i2sbus driver -- bus register definitions | ||
3 | * | ||
4 | * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> | ||
5 | * | ||
6 | * GPL v2, can be found in COPYING. | ||
7 | */ | ||
8 | #ifndef __I2SBUS_CONTROLREGS_H | ||
9 | #define __I2SBUS_CONTROLREGS_H | ||
10 | |||
11 | /* i2s control registers, at least what we know about them */ | ||
12 | |||
13 | #define __PAD(m,n) u8 __pad##m[n] | ||
14 | #define _PAD(line, n) __PAD(line, n) | ||
15 | #define PAD(n) _PAD(__LINE__, (n)) | ||
16 | struct i2s_control_regs { | ||
17 | PAD(0x38); | ||
18 | __le32 fcr0; /* 0x38 (unknown) */ | ||
19 | __le32 cell_control; /* 0x3c (fcr1) */ | ||
20 | __le32 fcr2; /* 0x40 (unknown) */ | ||
21 | __le32 fcr3; /* 0x44 (fcr3) */ | ||
22 | __le32 clock_control; /* 0x48 (unknown) */ | ||
23 | PAD(4); | ||
24 | /* total size: 0x50 bytes */ | ||
25 | } __attribute__((__packed__)); | ||
26 | |||
27 | #define CTRL_CLOCK_CELL_0_ENABLE (1<<10) | ||
28 | #define CTRL_CLOCK_CLOCK_0_ENABLE (1<<12) | ||
29 | #define CTRL_CLOCK_SWRESET_0 (1<<11) | ||
30 | #define CTRL_CLOCK_INTF_0_ENABLE (1<<13) | ||
31 | |||
32 | #define CTRL_CLOCK_CELL_1_ENABLE (1<<17) | ||
33 | #define CTRL_CLOCK_CLOCK_1_ENABLE (1<<18) | ||
34 | #define CTRL_CLOCK_SWRESET_1 (1<<19) | ||
35 | #define CTRL_CLOCK_INTF_1_ENABLE (1<<20) | ||
36 | |||
37 | #endif /* __I2SBUS_CONTROLREGS_H */ | ||
diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-core.c b/sound/aoa/soundbus/i2sbus/i2sbus-core.c index 01c0724335a3..23190aa6bc7b 100644 --- a/sound/aoa/soundbus/i2sbus/i2sbus-core.c +++ b/sound/aoa/soundbus/i2sbus/i2sbus-core.c | |||
@@ -7,13 +7,16 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <asm/macio.h> | ||
11 | #include <asm/dbdma.h> | ||
12 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
13 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/dma-mapping.h> | ||
13 | |||
14 | #include <sound/driver.h> | 14 | #include <sound/driver.h> |
15 | #include <sound/core.h> | 15 | #include <sound/core.h> |
16 | #include <linux/dma-mapping.h> | 16 | |
17 | #include <asm/macio.h> | ||
18 | #include <asm/dbdma.h> | ||
19 | |||
17 | #include "../soundbus.h" | 20 | #include "../soundbus.h" |
18 | #include "i2sbus.h" | 21 | #include "i2sbus.h" |
19 | 22 | ||
@@ -24,6 +27,11 @@ MODULE_DESCRIPTION("Apple Soundbus: I2S support"); | |||
24 | * string that macio puts into the relevant device */ | 27 | * string that macio puts into the relevant device */ |
25 | MODULE_ALIAS("of:Ni2sTi2sC"); | 28 | MODULE_ALIAS("of:Ni2sTi2sC"); |
26 | 29 | ||
30 | static int force; | ||
31 | module_param(force, int, 0444); | ||
32 | MODULE_PARM_DESC(force, "Force loading i2sbus even when" | ||
33 | " no layout-id property is present"); | ||
34 | |||
27 | static struct of_device_id i2sbus_match[] = { | 35 | static struct of_device_id i2sbus_match[] = { |
28 | { .name = "i2s" }, | 36 | { .name = "i2s" }, |
29 | { } | 37 | { } |
@@ -73,12 +81,12 @@ static void i2sbus_release_dev(struct device *dev) | |||
73 | if (i2sdev->intfregs) iounmap(i2sdev->intfregs); | 81 | if (i2sdev->intfregs) iounmap(i2sdev->intfregs); |
74 | if (i2sdev->out.dbdma) iounmap(i2sdev->out.dbdma); | 82 | if (i2sdev->out.dbdma) iounmap(i2sdev->out.dbdma); |
75 | if (i2sdev->in.dbdma) iounmap(i2sdev->in.dbdma); | 83 | if (i2sdev->in.dbdma) iounmap(i2sdev->in.dbdma); |
76 | for (i=0;i<3;i++) | 84 | for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) |
77 | if (i2sdev->allocated_resource[i]) | 85 | if (i2sdev->allocated_resource[i]) |
78 | release_and_free_resource(i2sdev->allocated_resource[i]); | 86 | release_and_free_resource(i2sdev->allocated_resource[i]); |
79 | free_dbdma_descriptor_ring(i2sdev, &i2sdev->out.dbdma_ring); | 87 | free_dbdma_descriptor_ring(i2sdev, &i2sdev->out.dbdma_ring); |
80 | free_dbdma_descriptor_ring(i2sdev, &i2sdev->in.dbdma_ring); | 88 | free_dbdma_descriptor_ring(i2sdev, &i2sdev->in.dbdma_ring); |
81 | for (i=0;i<3;i++) | 89 | for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) |
82 | free_irq(i2sdev->interrupts[i], i2sdev); | 90 | free_irq(i2sdev->interrupts[i], i2sdev); |
83 | i2sbus_control_remove_dev(i2sdev->control, i2sdev); | 91 | i2sbus_control_remove_dev(i2sdev->control, i2sdev); |
84 | mutex_destroy(&i2sdev->lock); | 92 | mutex_destroy(&i2sdev->lock); |
@@ -101,10 +109,49 @@ static irqreturn_t i2sbus_bus_intr(int irq, void *devid, struct pt_regs *regs) | |||
101 | return IRQ_HANDLED; | 109 | return IRQ_HANDLED; |
102 | } | 110 | } |
103 | 111 | ||
104 | static int force; | 112 | |
105 | module_param(force, int, 0444); | 113 | /* |
106 | MODULE_PARM_DESC(force, "Force loading i2sbus even when" | 114 | * XXX FIXME: We test the layout_id's here to get the proper way of |
107 | " no layout-id property is present"); | 115 | * mapping in various registers, thanks to bugs in Apple device-trees. |
116 | * We could instead key off the machine model and the name of the i2s | ||
117 | * node (i2s-a). This we'll do when we move it all to macio_asic.c | ||
118 | * and have that export items for each sub-node too. | ||
119 | */ | ||
120 | static int i2sbus_get_and_fixup_rsrc(struct device_node *np, int index, | ||
121 | int layout, struct resource *res) | ||
122 | { | ||
123 | struct device_node *parent; | ||
124 | int pindex, rc = -ENXIO; | ||
125 | u32 *reg; | ||
126 | |||
127 | /* Machines with layout 76 and 36 (K2 based) have a weird device | ||
128 | * tree what we need to special case. | ||
129 | * Normal machines just fetch the resource from the i2s-X node. | ||
130 | * Darwin further divides normal machines into old and new layouts | ||
131 | * with a subtely different code path but that doesn't seem necessary | ||
132 | * in practice, they just bloated it. In addition, even on our K2 | ||
133 | * case the i2s-modem node, if we ever want to handle it, uses the | ||
134 | * normal layout | ||
135 | */ | ||
136 | if (layout != 76 && layout != 36) | ||
137 | return of_address_to_resource(np, index, res); | ||
138 | |||
139 | parent = of_get_parent(np); | ||
140 | pindex = (index == aoa_resource_i2smmio) ? 0 : 1; | ||
141 | rc = of_address_to_resource(parent, pindex, res); | ||
142 | if (rc) | ||
143 | goto bail; | ||
144 | reg = (u32 *)get_property(np, "reg", NULL); | ||
145 | if (reg == NULL) { | ||
146 | rc = -ENXIO; | ||
147 | goto bail; | ||
148 | } | ||
149 | res->start += reg[index * 2]; | ||
150 | res->end = res->start + reg[index * 2 + 1] - 1; | ||
151 | bail: | ||
152 | of_node_put(parent); | ||
153 | return rc; | ||
154 | } | ||
108 | 155 | ||
109 | /* FIXME: look at device node refcounting */ | 156 | /* FIXME: look at device node refcounting */ |
110 | static int i2sbus_add_dev(struct macio_dev *macio, | 157 | static int i2sbus_add_dev(struct macio_dev *macio, |
@@ -113,7 +160,8 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
113 | { | 160 | { |
114 | struct i2sbus_dev *dev; | 161 | struct i2sbus_dev *dev; |
115 | struct device_node *child = NULL, *sound = NULL; | 162 | struct device_node *child = NULL, *sound = NULL; |
116 | int i; | 163 | struct resource *r; |
164 | int i, layout = 0, rlen; | ||
117 | static const char *rnames[] = { "i2sbus: %s (control)", | 165 | static const char *rnames[] = { "i2sbus: %s (control)", |
118 | "i2sbus: %s (tx)", | 166 | "i2sbus: %s (tx)", |
119 | "i2sbus: %s (rx)" }; | 167 | "i2sbus: %s (rx)" }; |
@@ -129,9 +177,6 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
129 | if (strncmp(np->name, "i2s-", 4)) | 177 | if (strncmp(np->name, "i2s-", 4)) |
130 | return 0; | 178 | return 0; |
131 | 179 | ||
132 | if (macio_irq_count(macio) != 3) | ||
133 | return 0; | ||
134 | |||
135 | dev = kzalloc(sizeof(struct i2sbus_dev), GFP_KERNEL); | 180 | dev = kzalloc(sizeof(struct i2sbus_dev), GFP_KERNEL); |
136 | if (!dev) | 181 | if (!dev) |
137 | return 0; | 182 | return 0; |
@@ -147,8 +192,9 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
147 | u32 *layout_id; | 192 | u32 *layout_id; |
148 | layout_id = (u32*) get_property(sound, "layout-id", NULL); | 193 | layout_id = (u32*) get_property(sound, "layout-id", NULL); |
149 | if (layout_id) { | 194 | if (layout_id) { |
195 | layout = *layout_id; | ||
150 | snprintf(dev->sound.modalias, 32, | 196 | snprintf(dev->sound.modalias, 32, |
151 | "sound-layout-%d", *layout_id); | 197 | "sound-layout-%d", layout); |
152 | force = 1; | 198 | force = 1; |
153 | } | 199 | } |
154 | } | 200 | } |
@@ -178,23 +224,32 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
178 | dev->bus_number = np->name[4] - 'a'; | 224 | dev->bus_number = np->name[4] - 'a'; |
179 | INIT_LIST_HEAD(&dev->sound.codec_list); | 225 | INIT_LIST_HEAD(&dev->sound.codec_list); |
180 | 226 | ||
181 | for (i=0;i<3;i++) { | 227 | for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) { |
182 | dev->interrupts[i] = -1; | 228 | dev->interrupts[i] = -1; |
183 | snprintf(dev->rnames[i], sizeof(dev->rnames[i]), rnames[i], np->name); | 229 | snprintf(dev->rnames[i], sizeof(dev->rnames[i]), |
230 | rnames[i], np->name); | ||
184 | } | 231 | } |
185 | for (i=0;i<3;i++) { | 232 | for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) { |
186 | if (request_irq(macio_irq(macio, i), ints[i], 0, | 233 | int irq = irq_of_parse_and_map(np, i); |
187 | dev->rnames[i], dev)) | 234 | if (request_irq(irq, ints[i], 0, dev->rnames[i], dev)) |
188 | goto err; | 235 | goto err; |
189 | dev->interrupts[i] = macio_irq(macio, i); | 236 | dev->interrupts[i] = irq; |
190 | } | 237 | } |
191 | 238 | ||
192 | for (i=0;i<3;i++) { | 239 | |
193 | if (of_address_to_resource(np, i, &dev->resources[i])) | 240 | /* Resource handling is problematic as some device-trees contain |
241 | * useless crap (ugh ugh ugh). We work around that here by calling | ||
242 | * specific functions for calculating the appropriate resources. | ||
243 | * | ||
244 | * This will all be moved to macio_asic.c at one point | ||
245 | */ | ||
246 | for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) { | ||
247 | if (i2sbus_get_and_fixup_rsrc(np,i,layout,&dev->resources[i])) | ||
194 | goto err; | 248 | goto err; |
195 | /* if only we could use our resource dev->resources[i]... | 249 | /* If only we could use our resource dev->resources[i]... |
196 | * but request_resource doesn't know about parents and | 250 | * but request_resource doesn't know about parents and |
197 | * contained resources... */ | 251 | * contained resources... |
252 | */ | ||
198 | dev->allocated_resource[i] = | 253 | dev->allocated_resource[i] = |
199 | request_mem_region(dev->resources[i].start, | 254 | request_mem_region(dev->resources[i].start, |
200 | dev->resources[i].end - | 255 | dev->resources[i].end - |
@@ -205,13 +260,25 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
205 | goto err; | 260 | goto err; |
206 | } | 261 | } |
207 | } | 262 | } |
208 | /* should do sanity checking here about length of them */ | 263 | |
209 | dev->intfregs = ioremap(dev->resources[0].start, | 264 | r = &dev->resources[aoa_resource_i2smmio]; |
210 | dev->resources[0].end-dev->resources[0].start+1); | 265 | rlen = r->end - r->start + 1; |
211 | dev->out.dbdma = ioremap(dev->resources[1].start, | 266 | if (rlen < sizeof(struct i2s_interface_regs)) |
212 | dev->resources[1].end-dev->resources[1].start+1); | 267 | goto err; |
213 | dev->in.dbdma = ioremap(dev->resources[2].start, | 268 | dev->intfregs = ioremap(r->start, rlen); |
214 | dev->resources[2].end-dev->resources[2].start+1); | 269 | |
270 | r = &dev->resources[aoa_resource_txdbdma]; | ||
271 | rlen = r->end - r->start + 1; | ||
272 | if (rlen < sizeof(struct dbdma_regs)) | ||
273 | goto err; | ||
274 | dev->out.dbdma = ioremap(r->start, rlen); | ||
275 | |||
276 | r = &dev->resources[aoa_resource_rxdbdma]; | ||
277 | rlen = r->end - r->start + 1; | ||
278 | if (rlen < sizeof(struct dbdma_regs)) | ||
279 | goto err; | ||
280 | dev->in.dbdma = ioremap(r->start, rlen); | ||
281 | |||
215 | if (!dev->intfregs || !dev->out.dbdma || !dev->in.dbdma) | 282 | if (!dev->intfregs || !dev->out.dbdma || !dev->in.dbdma) |
216 | goto err; | 283 | goto err; |
217 | 284 | ||
diff --git a/sound/aoa/soundbus/i2sbus/i2sbus.h b/sound/aoa/soundbus/i2sbus/i2sbus.h index cfa5162e3b0f..0c69d209be50 100644 --- a/sound/aoa/soundbus/i2sbus/i2sbus.h +++ b/sound/aoa/soundbus/i2sbus/i2sbus.h | |||
@@ -7,20 +7,22 @@ | |||
7 | */ | 7 | */ |
8 | #ifndef __I2SBUS_H | 8 | #ifndef __I2SBUS_H |
9 | #define __I2SBUS_H | 9 | #define __I2SBUS_H |
10 | #include <asm/dbdma.h> | ||
11 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
12 | #include <sound/pcm.h> | ||
13 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
14 | #include <linux/mutex.h> | 12 | #include <linux/mutex.h> |
13 | |||
14 | #include <sound/pcm.h> | ||
15 | |||
15 | #include <asm/prom.h> | 16 | #include <asm/prom.h> |
17 | #include <asm/pmac_feature.h> | ||
18 | #include <asm/dbdma.h> | ||
19 | |||
16 | #include "i2sbus-interface.h" | 20 | #include "i2sbus-interface.h" |
17 | #include "i2sbus-control.h" | ||
18 | #include "../soundbus.h" | 21 | #include "../soundbus.h" |
19 | 22 | ||
20 | struct i2sbus_control { | 23 | struct i2sbus_control { |
21 | volatile struct i2s_control_regs __iomem *controlregs; | ||
22 | struct resource rsrc; | ||
23 | struct list_head list; | 24 | struct list_head list; |
25 | struct macio_chip *macio; | ||
24 | }; | 26 | }; |
25 | 27 | ||
26 | #define MAX_DBDMA_COMMANDS 32 | 28 | #define MAX_DBDMA_COMMANDS 32 |
@@ -45,6 +47,12 @@ struct pcm_info { | |||
45 | volatile struct dbdma_regs __iomem *dbdma; | 47 | volatile struct dbdma_regs __iomem *dbdma; |
46 | }; | 48 | }; |
47 | 49 | ||
50 | enum { | ||
51 | aoa_resource_i2smmio = 0, | ||
52 | aoa_resource_txdbdma, | ||
53 | aoa_resource_rxdbdma, | ||
54 | }; | ||
55 | |||
48 | struct i2sbus_dev { | 56 | struct i2sbus_dev { |
49 | struct soundbus_dev sound; | 57 | struct soundbus_dev sound; |
50 | struct macio_dev *macio; | 58 | struct macio_dev *macio; |
diff --git a/sound/core/sound.c b/sound/core/sound.c index 264f2efd1af8..7edd1fc58b17 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -244,7 +244,7 @@ int snd_register_device(int type, struct snd_card *card, int dev, | |||
244 | struct device *device = NULL; | 244 | struct device *device = NULL; |
245 | 245 | ||
246 | snd_assert(name, return -EINVAL); | 246 | snd_assert(name, return -EINVAL); |
247 | preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL); | 247 | preg = kmalloc(sizeof *preg, GFP_KERNEL); |
248 | if (preg == NULL) | 248 | if (preg == NULL) |
249 | return -ENOMEM; | 249 | return -ENOMEM; |
250 | preg->type = type; | 250 | preg->type = type; |
@@ -252,7 +252,6 @@ int snd_register_device(int type, struct snd_card *card, int dev, | |||
252 | preg->device = dev; | 252 | preg->device = dev; |
253 | preg->f_ops = f_ops; | 253 | preg->f_ops = f_ops; |
254 | preg->private_data = private_data; | 254 | preg->private_data = private_data; |
255 | strcpy(preg->name, name); | ||
256 | mutex_lock(&sound_mutex); | 255 | mutex_lock(&sound_mutex); |
257 | #ifdef CONFIG_SND_DYNAMIC_MINORS | 256 | #ifdef CONFIG_SND_DYNAMIC_MINORS |
258 | minor = snd_find_free_minor(); | 257 | minor = snd_find_free_minor(); |
diff --git a/sound/core/timer.c b/sound/core/timer.c index 78199f58b93a..0a984e881c10 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c | |||
@@ -628,8 +628,9 @@ static void snd_timer_tasklet(unsigned long arg) | |||
628 | struct snd_timer_instance *ti; | 628 | struct snd_timer_instance *ti; |
629 | struct list_head *p; | 629 | struct list_head *p; |
630 | unsigned long resolution, ticks; | 630 | unsigned long resolution, ticks; |
631 | unsigned long flags; | ||
631 | 632 | ||
632 | spin_lock(&timer->lock); | 633 | spin_lock_irqsave(&timer->lock, flags); |
633 | /* now process all callbacks */ | 634 | /* now process all callbacks */ |
634 | while (!list_empty(&timer->sack_list_head)) { | 635 | while (!list_empty(&timer->sack_list_head)) { |
635 | p = timer->sack_list_head.next; /* get first item */ | 636 | p = timer->sack_list_head.next; /* get first item */ |
@@ -649,7 +650,7 @@ static void snd_timer_tasklet(unsigned long arg) | |||
649 | spin_lock(&timer->lock); | 650 | spin_lock(&timer->lock); |
650 | ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK; | 651 | ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK; |
651 | } | 652 | } |
652 | spin_unlock(&timer->lock); | 653 | spin_unlock_irqrestore(&timer->lock, flags); |
653 | } | 654 | } |
654 | 655 | ||
655 | /* | 656 | /* |
diff --git a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c index cb89f7eb9236..64388cb8d6e5 100644 --- a/sound/i2c/cs8427.c +++ b/sound/i2c/cs8427.c | |||
@@ -76,23 +76,28 @@ int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg, | |||
76 | buf[0] = reg & 0x7f; | 76 | buf[0] = reg & 0x7f; |
77 | buf[1] = val; | 77 | buf[1] = val; |
78 | if ((err = snd_i2c_sendbytes(device, buf, 2)) != 2) { | 78 | if ((err = snd_i2c_sendbytes(device, buf, 2)) != 2) { |
79 | snd_printk(KERN_ERR "unable to send bytes 0x%02x:0x%02x to CS8427 (%i)\n", buf[0], buf[1], err); | 79 | snd_printk(KERN_ERR "unable to send bytes 0x%02x:0x%02x " |
80 | "to CS8427 (%i)\n", buf[0], buf[1], err); | ||
80 | return err < 0 ? err : -EIO; | 81 | return err < 0 ? err : -EIO; |
81 | } | 82 | } |
82 | return 0; | 83 | return 0; |
83 | } | 84 | } |
84 | 85 | ||
86 | EXPORT_SYMBOL(snd_cs8427_reg_write); | ||
87 | |||
85 | static int snd_cs8427_reg_read(struct snd_i2c_device *device, unsigned char reg) | 88 | static int snd_cs8427_reg_read(struct snd_i2c_device *device, unsigned char reg) |
86 | { | 89 | { |
87 | int err; | 90 | int err; |
88 | unsigned char buf; | 91 | unsigned char buf; |
89 | 92 | ||
90 | if ((err = snd_i2c_sendbytes(device, ®, 1)) != 1) { | 93 | if ((err = snd_i2c_sendbytes(device, ®, 1)) != 1) { |
91 | snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg); | 94 | snd_printk(KERN_ERR "unable to send register 0x%x byte " |
95 | "to CS8427\n", reg); | ||
92 | return err < 0 ? err : -EIO; | 96 | return err < 0 ? err : -EIO; |
93 | } | 97 | } |
94 | if ((err = snd_i2c_readbytes(device, &buf, 1)) != 1) { | 98 | if ((err = snd_i2c_readbytes(device, &buf, 1)) != 1) { |
95 | snd_printk(KERN_ERR "unable to read register 0x%x byte from CS8427\n", reg); | 99 | snd_printk(KERN_ERR "unable to read register 0x%x byte " |
100 | "from CS8427\n", reg); | ||
96 | return err < 0 ? err : -EIO; | 101 | return err < 0 ? err : -EIO; |
97 | } | 102 | } |
98 | return buf; | 103 | return buf; |
@@ -121,7 +126,8 @@ static int snd_cs8427_send_corudata(struct snd_i2c_device *device, | |||
121 | int count) | 126 | int count) |
122 | { | 127 | { |
123 | struct cs8427 *chip = device->private_data; | 128 | struct cs8427 *chip = device->private_data; |
124 | char *hw_data = udata ? chip->playback.hw_udata : chip->playback.hw_status; | 129 | char *hw_data = udata ? |
130 | chip->playback.hw_udata : chip->playback.hw_status; | ||
125 | char data[32]; | 131 | char data[32]; |
126 | int err, idx; | 132 | int err, idx; |
127 | 133 | ||
@@ -134,11 +140,11 @@ static int snd_cs8427_send_corudata(struct snd_i2c_device *device, | |||
134 | memset(data, 0, sizeof(data)); | 140 | memset(data, 0, sizeof(data)); |
135 | if (memcmp(hw_data, data, count) == 0) { | 141 | if (memcmp(hw_data, data, count) == 0) { |
136 | chip->regmap[CS8427_REG_UDATABUF] &= ~CS8427_UBMMASK; | 142 | chip->regmap[CS8427_REG_UDATABUF] &= ~CS8427_UBMMASK; |
137 | chip->regmap[CS8427_REG_UDATABUF] |= CS8427_UBMZEROS | CS8427_EFTUI; | 143 | chip->regmap[CS8427_REG_UDATABUF] |= CS8427_UBMZEROS | |
138 | if ((err = snd_cs8427_reg_write(device, CS8427_REG_UDATABUF, | 144 | CS8427_EFTUI; |
139 | chip->regmap[CS8427_REG_UDATABUF])) < 0) | 145 | err = snd_cs8427_reg_write(device, CS8427_REG_UDATABUF, |
140 | return err; | 146 | chip->regmap[CS8427_REG_UDATABUF]); |
141 | return 0; | 147 | return err < 0 ? err : 0; |
142 | } | 148 | } |
143 | } | 149 | } |
144 | data[0] = CS8427_REG_AUTOINC | CS8427_REG_CORU_DATABUF; | 150 | data[0] = CS8427_REG_AUTOINC | CS8427_REG_CORU_DATABUF; |
@@ -161,24 +167,32 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, | |||
161 | { | 167 | { |
162 | static unsigned char initvals1[] = { | 168 | static unsigned char initvals1[] = { |
163 | CS8427_REG_CONTROL1 | CS8427_REG_AUTOINC, | 169 | CS8427_REG_CONTROL1 | CS8427_REG_AUTOINC, |
164 | /* CS8427_REG_CONTROL1: RMCK to OMCK, valid PCM audio, disable mutes, TCBL=output */ | 170 | /* CS8427_REG_CONTROL1: RMCK to OMCK, valid PCM audio, disable mutes, |
171 | TCBL=output */ | ||
165 | CS8427_SWCLK | CS8427_TCBLDIR, | 172 | CS8427_SWCLK | CS8427_TCBLDIR, |
166 | /* CS8427_REG_CONTROL2: hold last valid audio sample, RMCK=256*Fs, normal stereo operation */ | 173 | /* CS8427_REG_CONTROL2: hold last valid audio sample, RMCK=256*Fs, |
174 | normal stereo operation */ | ||
167 | 0x00, | 175 | 0x00, |
168 | /* CS8427_REG_DATAFLOW: output drivers normal operation, Tx<=serial, Rx=>serial */ | 176 | /* CS8427_REG_DATAFLOW: output drivers normal operation, Tx<=serial, |
177 | Rx=>serial */ | ||
169 | CS8427_TXDSERIAL | CS8427_SPDAES3RECEIVER, | 178 | CS8427_TXDSERIAL | CS8427_SPDAES3RECEIVER, |
170 | /* CS8427_REG_CLOCKSOURCE: Run off, CMCK=256*Fs, output time base = OMCK, input time base = | 179 | /* CS8427_REG_CLOCKSOURCE: Run off, CMCK=256*Fs, |
171 | recovered input clock, recovered input clock source is ILRCK changed to AES3INPUT (workaround, see snd_cs8427_reset) */ | 180 | output time base = OMCK, input time base = recovered input clock, |
181 | recovered input clock source is ILRCK changed to AES3INPUT | ||
182 | (workaround, see snd_cs8427_reset) */ | ||
172 | CS8427_RXDILRCK, | 183 | CS8427_RXDILRCK, |
173 | /* CS8427_REG_SERIALINPUT: Serial audio input port data format = I2S, 24-bit, 64*Fsi */ | 184 | /* CS8427_REG_SERIALINPUT: Serial audio input port data format = I2S, |
185 | 24-bit, 64*Fsi */ | ||
174 | CS8427_SIDEL | CS8427_SILRPOL, | 186 | CS8427_SIDEL | CS8427_SILRPOL, |
175 | /* CS8427_REG_SERIALOUTPUT: Serial audio output port data format = I2S, 24-bit, 64*Fsi */ | 187 | /* CS8427_REG_SERIALOUTPUT: Serial audio output port data format |
188 | = I2S, 24-bit, 64*Fsi */ | ||
176 | CS8427_SODEL | CS8427_SOLRPOL, | 189 | CS8427_SODEL | CS8427_SOLRPOL, |
177 | }; | 190 | }; |
178 | static unsigned char initvals2[] = { | 191 | static unsigned char initvals2[] = { |
179 | CS8427_REG_RECVERRMASK | CS8427_REG_AUTOINC, | 192 | CS8427_REG_RECVERRMASK | CS8427_REG_AUTOINC, |
180 | /* CS8427_REG_RECVERRMASK: unmask the input PLL clock, V, confidence, biphase, parity status bits */ | 193 | /* CS8427_REG_RECVERRMASK: unmask the input PLL clock, V, confidence, |
181 | /* CS8427_UNLOCK | CS8427_V | CS8427_CONF | CS8427_BIP | CS8427_PAR, */ | 194 | biphase, parity status bits */ |
195 | /* CS8427_UNLOCK | CS8427_V | CS8427_CONF | CS8427_BIP | CS8427_PAR,*/ | ||
182 | 0xff, /* set everything */ | 196 | 0xff, /* set everything */ |
183 | /* CS8427_REG_CSDATABUF: | 197 | /* CS8427_REG_CSDATABUF: |
184 | Registers 32-55 window to CS buffer | 198 | Registers 32-55 window to CS buffer |
@@ -201,7 +215,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, | |||
201 | struct snd_i2c_device *device; | 215 | struct snd_i2c_device *device; |
202 | unsigned char buf[24]; | 216 | unsigned char buf[24]; |
203 | 217 | ||
204 | if ((err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7), | 218 | if ((err = snd_i2c_device_create(bus, "CS8427", |
219 | CS8427_ADDR | (addr & 7), | ||
205 | &device)) < 0) | 220 | &device)) < 0) |
206 | return err; | 221 | return err; |
207 | chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL); | 222 | chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL); |
@@ -212,8 +227,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, | |||
212 | device->private_free = snd_cs8427_free; | 227 | device->private_free = snd_cs8427_free; |
213 | 228 | ||
214 | snd_i2c_lock(bus); | 229 | snd_i2c_lock(bus); |
215 | if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) != | 230 | err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER); |
216 | CS8427_VER8427A) { | 231 | if (err != CS8427_VER8427A) { |
217 | snd_i2c_unlock(bus); | 232 | snd_i2c_unlock(bus); |
218 | snd_printk(KERN_ERR "unable to find CS8427 signature " | 233 | snd_printk(KERN_ERR "unable to find CS8427 signature " |
219 | "(expected 0x%x, read 0x%x),\n", | 234 | "(expected 0x%x, read 0x%x),\n", |
@@ -222,7 +237,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, | |||
222 | return -EFAULT; | 237 | return -EFAULT; |
223 | } | 238 | } |
224 | /* turn off run bit while making changes to configuration */ | 239 | /* turn off run bit while making changes to configuration */ |
225 | if ((err = snd_cs8427_reg_write(device, CS8427_REG_CLOCKSOURCE, 0x00)) < 0) | 240 | err = snd_cs8427_reg_write(device, CS8427_REG_CLOCKSOURCE, 0x00); |
241 | if (err < 0) | ||
226 | goto __fail; | 242 | goto __fail; |
227 | /* send initial values */ | 243 | /* send initial values */ |
228 | memcpy(chip->regmap + (initvals1[0] & 0x7f), initvals1 + 1, 6); | 244 | memcpy(chip->regmap + (initvals1[0] & 0x7f), initvals1 + 1, 6); |
@@ -282,6 +298,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, | |||
282 | return err < 0 ? err : -EIO; | 298 | return err < 0 ? err : -EIO; |
283 | } | 299 | } |
284 | 300 | ||
301 | EXPORT_SYMBOL(snd_cs8427_create); | ||
302 | |||
285 | /* | 303 | /* |
286 | * Reset the chip using run bit, also lock PLL using ILRCK and | 304 | * Reset the chip using run bit, also lock PLL using ILRCK and |
287 | * put back AES3INPUT. This workaround is described in latest | 305 | * put back AES3INPUT. This workaround is described in latest |
@@ -296,7 +314,8 @@ static void snd_cs8427_reset(struct snd_i2c_device *cs8427) | |||
296 | snd_assert(cs8427, return); | 314 | snd_assert(cs8427, return); |
297 | chip = cs8427->private_data; | 315 | chip = cs8427->private_data; |
298 | snd_i2c_lock(cs8427->bus); | 316 | snd_i2c_lock(cs8427->bus); |
299 | if ((chip->regmap[CS8427_REG_CLOCKSOURCE] & CS8427_RXDAES3INPUT) == CS8427_RXDAES3INPUT) /* AES3 bit is set */ | 317 | if ((chip->regmap[CS8427_REG_CLOCKSOURCE] & CS8427_RXDAES3INPUT) == |
318 | CS8427_RXDAES3INPUT) /* AES3 bit is set */ | ||
300 | aes3input = 1; | 319 | aes3input = 1; |
301 | chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~(CS8427_RUN | CS8427_RXDMASK); | 320 | chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~(CS8427_RUN | CS8427_RXDMASK); |
302 | snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, | 321 | snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, |
@@ -367,12 +386,15 @@ static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol, | |||
367 | 386 | ||
368 | snd_i2c_lock(device->bus); | 387 | snd_i2c_lock(device->bus); |
369 | if ((err = snd_i2c_sendbytes(device, ®, 1)) != 1) { | 388 | if ((err = snd_i2c_sendbytes(device, ®, 1)) != 1) { |
370 | snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg); | 389 | snd_printk(KERN_ERR "unable to send register 0x%x byte " |
390 | "to CS8427\n", reg); | ||
371 | snd_i2c_unlock(device->bus); | 391 | snd_i2c_unlock(device->bus); |
372 | return err < 0 ? err : -EIO; | 392 | return err < 0 ? err : -EIO; |
373 | } | 393 | } |
374 | if ((err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10)) != 10) { | 394 | err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10); |
375 | snd_printk(KERN_ERR "unable to read Q-subcode bytes from CS8427\n"); | 395 | if (err != 10) { |
396 | snd_printk(KERN_ERR "unable to read Q-subcode bytes " | ||
397 | "from CS8427\n"); | ||
376 | snd_i2c_unlock(device->bus); | 398 | snd_i2c_unlock(device->bus); |
377 | return err < 0 ? err : -EIO; | 399 | return err < 0 ? err : -EIO; |
378 | } | 400 | } |
@@ -380,7 +402,8 @@ static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol, | |||
380 | return 0; | 402 | return 0; |
381 | } | 403 | } |
382 | 404 | ||
383 | static int snd_cs8427_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 405 | static int snd_cs8427_spdif_info(struct snd_kcontrol *kcontrol, |
406 | struct snd_ctl_elem_info *uinfo) | ||
384 | { | 407 | { |
385 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; | 408 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; |
386 | uinfo->count = 1; | 409 | uinfo->count = 1; |
@@ -413,7 +436,8 @@ static int snd_cs8427_spdif_put(struct snd_kcontrol *kcontrol, | |||
413 | snd_i2c_lock(device->bus); | 436 | snd_i2c_lock(device->bus); |
414 | change = memcmp(ucontrol->value.iec958.status, status, 24) != 0; | 437 | change = memcmp(ucontrol->value.iec958.status, status, 24) != 0; |
415 | memcpy(status, ucontrol->value.iec958.status, 24); | 438 | memcpy(status, ucontrol->value.iec958.status, 24); |
416 | if (change && (kcontrol->private_value ? runtime != NULL : runtime == NULL)) { | 439 | if (change && (kcontrol->private_value ? |
440 | runtime != NULL : runtime == NULL)) { | ||
417 | err = snd_cs8427_send_corudata(device, 0, status, 24); | 441 | err = snd_cs8427_send_corudata(device, 0, status, 24); |
418 | if (err < 0) | 442 | if (err < 0) |
419 | change = err; | 443 | change = err; |
@@ -442,7 +466,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { | |||
442 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 466 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
443 | .info = snd_cs8427_in_status_info, | 467 | .info = snd_cs8427_in_status_info, |
444 | .name = "IEC958 CS8427 Input Status", | 468 | .name = "IEC958 CS8427 Input Status", |
445 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 469 | .access = (SNDRV_CTL_ELEM_ACCESS_READ | |
470 | SNDRV_CTL_ELEM_ACCESS_VOLATILE), | ||
446 | .get = snd_cs8427_in_status_get, | 471 | .get = snd_cs8427_in_status_get, |
447 | .private_value = 15, | 472 | .private_value = 15, |
448 | }, | 473 | }, |
@@ -450,7 +475,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { | |||
450 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 475 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
451 | .info = snd_cs8427_in_status_info, | 476 | .info = snd_cs8427_in_status_info, |
452 | .name = "IEC958 CS8427 Error Status", | 477 | .name = "IEC958 CS8427 Error Status", |
453 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 478 | .access = (SNDRV_CTL_ELEM_ACCESS_READ | |
479 | SNDRV_CTL_ELEM_ACCESS_VOLATILE), | ||
454 | .get = snd_cs8427_in_status_get, | 480 | .get = snd_cs8427_in_status_get, |
455 | .private_value = 16, | 481 | .private_value = 16, |
456 | }, | 482 | }, |
@@ -470,7 +496,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { | |||
470 | .private_value = 0 | 496 | .private_value = 0 |
471 | }, | 497 | }, |
472 | { | 498 | { |
473 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, | 499 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | |
500 | SNDRV_CTL_ELEM_ACCESS_INACTIVE), | ||
474 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 501 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
475 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), | 502 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), |
476 | .info = snd_cs8427_spdif_info, | 503 | .info = snd_cs8427_spdif_info, |
@@ -482,7 +509,8 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { | |||
482 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 509 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
483 | .info = snd_cs8427_qsubcode_info, | 510 | .info = snd_cs8427_qsubcode_info, |
484 | .name = "IEC958 Q-subcode Capture Default", | 511 | .name = "IEC958 Q-subcode Capture Default", |
485 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 512 | .access = (SNDRV_CTL_ELEM_ACCESS_READ | |
513 | SNDRV_CTL_ELEM_ACCESS_VOLATILE), | ||
486 | .get = snd_cs8427_qsubcode_get | 514 | .get = snd_cs8427_qsubcode_get |
487 | }}; | 515 | }}; |
488 | 516 | ||
@@ -505,7 +533,8 @@ int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427, | |||
505 | err = snd_ctl_add(cs8427->bus->card, kctl); | 533 | err = snd_ctl_add(cs8427->bus->card, kctl); |
506 | if (err < 0) | 534 | if (err < 0) |
507 | return err; | 535 | return err; |
508 | if (!strcmp(kctl->id.name, SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM))) | 536 | if (! strcmp(kctl->id.name, |
537 | SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM))) | ||
509 | chip->playback.pcm_ctl = kctl; | 538 | chip->playback.pcm_ctl = kctl; |
510 | } | 539 | } |
511 | 540 | ||
@@ -515,6 +544,8 @@ int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427, | |||
515 | return 0; | 544 | return 0; |
516 | } | 545 | } |
517 | 546 | ||
547 | EXPORT_SYMBOL(snd_cs8427_iec958_build); | ||
548 | |||
518 | int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active) | 549 | int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active) |
519 | { | 550 | { |
520 | struct cs8427 *chip; | 551 | struct cs8427 *chip; |
@@ -522,13 +553,17 @@ int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active) | |||
522 | snd_assert(cs8427, return -ENXIO); | 553 | snd_assert(cs8427, return -ENXIO); |
523 | chip = cs8427->private_data; | 554 | chip = cs8427->private_data; |
524 | if (active) | 555 | if (active) |
525 | memcpy(chip->playback.pcm_status, chip->playback.def_status, 24); | 556 | memcpy(chip->playback.pcm_status, |
557 | chip->playback.def_status, 24); | ||
526 | chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; | 558 | chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; |
527 | snd_ctl_notify(cs8427->bus->card, SNDRV_CTL_EVENT_MASK_VALUE | | 559 | snd_ctl_notify(cs8427->bus->card, |
528 | SNDRV_CTL_EVENT_MASK_INFO, &chip->playback.pcm_ctl->id); | 560 | SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO, |
561 | &chip->playback.pcm_ctl->id); | ||
529 | return 0; | 562 | return 0; |
530 | } | 563 | } |
531 | 564 | ||
565 | EXPORT_SYMBOL(snd_cs8427_iec958_active); | ||
566 | |||
532 | int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate) | 567 | int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate) |
533 | { | 568 | { |
534 | struct cs8427 *chip; | 569 | struct cs8427 *chip; |
@@ -568,6 +603,8 @@ int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate) | |||
568 | return err < 0 ? err : 0; | 603 | return err < 0 ? err : 0; |
569 | } | 604 | } |
570 | 605 | ||
606 | EXPORT_SYMBOL(snd_cs8427_iec958_pcm); | ||
607 | |||
571 | static int __init alsa_cs8427_module_init(void) | 608 | static int __init alsa_cs8427_module_init(void) |
572 | { | 609 | { |
573 | return 0; | 610 | return 0; |
@@ -579,10 +616,3 @@ static void __exit alsa_cs8427_module_exit(void) | |||
579 | 616 | ||
580 | module_init(alsa_cs8427_module_init) | 617 | module_init(alsa_cs8427_module_init) |
581 | module_exit(alsa_cs8427_module_exit) | 618 | module_exit(alsa_cs8427_module_exit) |
582 | |||
583 | EXPORT_SYMBOL(snd_cs8427_create); | ||
584 | EXPORT_SYMBOL(snd_cs8427_reset); | ||
585 | EXPORT_SYMBOL(snd_cs8427_reg_write); | ||
586 | EXPORT_SYMBOL(snd_cs8427_iec958_build); | ||
587 | EXPORT_SYMBOL(snd_cs8427_iec958_active); | ||
588 | EXPORT_SYMBOL(snd_cs8427_iec958_pcm); | ||
diff --git a/sound/isa/cs423x/Makefile b/sound/isa/cs423x/Makefile index d2afaea30cbc..2fb4f7409d7c 100644 --- a/sound/isa/cs423x/Makefile +++ b/sound/isa/cs423x/Makefile | |||
@@ -11,6 +11,7 @@ snd-cs4236-objs := cs4236.o | |||
11 | 11 | ||
12 | # Toplevel Module Dependency | 12 | # Toplevel Module Dependency |
13 | obj-$(CONFIG_SND_AZT2320) += snd-cs4231-lib.o | 13 | obj-$(CONFIG_SND_AZT2320) += snd-cs4231-lib.o |
14 | obj-$(CONFIG_SND_MIRO) += snd-cs4231-lib.o | ||
14 | obj-$(CONFIG_SND_OPL3SA2) += snd-cs4231-lib.o | 15 | obj-$(CONFIG_SND_OPL3SA2) += snd-cs4231-lib.o |
15 | obj-$(CONFIG_SND_CS4231) += snd-cs4231.o snd-cs4231-lib.o | 16 | obj-$(CONFIG_SND_CS4231) += snd-cs4231.o snd-cs4231-lib.o |
16 | obj-$(CONFIG_SND_CS4232) += snd-cs4232.o snd-cs4231-lib.o | 17 | obj-$(CONFIG_SND_CS4232) += snd-cs4232.o snd-cs4231-lib.o |
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c index 22cdddbfd824..532c56e35ca4 100644 --- a/sound/isa/gus/gusextreme.c +++ b/sound/isa/gus/gusextreme.c | |||
@@ -87,7 +87,7 @@ MODULE_PARM_DESC(channels, "GF1 channels for GUS Extreme driver."); | |||
87 | module_param_array(pcm_channels, int, NULL, 0444); | 87 | module_param_array(pcm_channels, int, NULL, 0444); |
88 | MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver."); | 88 | MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver."); |
89 | 89 | ||
90 | struct platform_device *devices[SNDRV_CARDS]; | 90 | static struct platform_device *devices[SNDRV_CARDS]; |
91 | 91 | ||
92 | 92 | ||
93 | #define PFX "gusextreme: " | 93 | #define PFX "gusextreme: " |
diff --git a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c index 180661c5ffdc..4f0846feb73f 100644 --- a/sound/isa/wavefront/wavefront_fx.c +++ b/sound/isa/wavefront/wavefront_fx.c | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | /* weird stuff, derived from port I/O tracing with dosemu */ | 35 | /* weird stuff, derived from port I/O tracing with dosemu */ |
36 | 36 | ||
37 | static unsigned char page_zero[] __initdata = { | 37 | static unsigned char page_zero[] __devinitdata = { |
38 | 0x01, 0x7c, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00, | 38 | 0x01, 0x7c, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00, |
39 | 0x11, 0x00, 0x20, 0x00, 0x32, 0x00, 0x40, 0x00, 0x13, 0x00, 0x00, | 39 | 0x11, 0x00, 0x20, 0x00, 0x32, 0x00, 0x40, 0x00, 0x13, 0x00, 0x00, |
40 | 0x00, 0x14, 0x02, 0x76, 0x00, 0x60, 0x00, 0x80, 0x02, 0x00, 0x00, | 40 | 0x00, 0x14, 0x02, 0x76, 0x00, 0x60, 0x00, 0x80, 0x02, 0x00, 0x00, |
@@ -61,7 +61,7 @@ static unsigned char page_zero[] __initdata = { | |||
61 | 0x1d, 0x02, 0xdf | 61 | 0x1d, 0x02, 0xdf |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static unsigned char page_one[] __initdata = { | 64 | static unsigned char page_one[] __devinitdata = { |
65 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00, | 65 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00, |
66 | 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xd8, 0x00, 0x00, | 66 | 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xd8, 0x00, 0x00, |
67 | 0x02, 0x20, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01, | 67 | 0x02, 0x20, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01, |
@@ -88,7 +88,7 @@ static unsigned char page_one[] __initdata = { | |||
88 | 0x60, 0x00, 0x1b | 88 | 0x60, 0x00, 0x1b |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static unsigned char page_two[] __initdata = { | 91 | static unsigned char page_two[] __devinitdata = { |
92 | 0xc4, 0x00, 0x44, 0x07, 0x44, 0x00, 0x40, 0x25, 0x01, 0x06, 0xc4, | 92 | 0xc4, 0x00, 0x44, 0x07, 0x44, 0x00, 0x40, 0x25, 0x01, 0x06, 0xc4, |
93 | 0x07, 0x40, 0x25, 0x01, 0x00, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00, | 93 | 0x07, 0x40, 0x25, 0x01, 0x00, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00, |
94 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 94 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
@@ -103,7 +103,7 @@ static unsigned char page_two[] __initdata = { | |||
103 | 0x46, 0x05, 0x46, 0x07, 0x46, 0x07, 0x44 | 103 | 0x46, 0x05, 0x46, 0x07, 0x46, 0x07, 0x44 |
104 | }; | 104 | }; |
105 | 105 | ||
106 | static unsigned char page_three[] __initdata = { | 106 | static unsigned char page_three[] __devinitdata = { |
107 | 0x07, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x40, 0x00, 0x40, 0x06, | 107 | 0x07, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x40, 0x00, 0x40, 0x06, |
108 | 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 108 | 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
109 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 109 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
@@ -118,7 +118,7 @@ static unsigned char page_three[] __initdata = { | |||
118 | 0x02, 0x00, 0x42, 0x00, 0xc0, 0x00, 0x40 | 118 | 0x02, 0x00, 0x42, 0x00, 0xc0, 0x00, 0x40 |
119 | }; | 119 | }; |
120 | 120 | ||
121 | static unsigned char page_four[] __initdata = { | 121 | static unsigned char page_four[] __devinitdata = { |
122 | 0x63, 0x03, 0x26, 0x02, 0x2c, 0x00, 0x24, 0x00, 0x2e, 0x02, 0x02, | 122 | 0x63, 0x03, 0x26, 0x02, 0x2c, 0x00, 0x24, 0x00, 0x2e, 0x02, 0x02, |
123 | 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 123 | 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
124 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 124 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
@@ -133,7 +133,7 @@ static unsigned char page_four[] __initdata = { | |||
133 | 0x02, 0x62, 0x02, 0x20, 0x01, 0x21, 0x01 | 133 | 0x02, 0x62, 0x02, 0x20, 0x01, 0x21, 0x01 |
134 | }; | 134 | }; |
135 | 135 | ||
136 | static unsigned char page_six[] __initdata = { | 136 | static unsigned char page_six[] __devinitdata = { |
137 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00, | 137 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00, |
138 | 0x00, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e, | 138 | 0x00, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e, |
139 | 0x00, 0x00, 0x10, 0x00, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x00, | 139 | 0x00, 0x00, 0x10, 0x00, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x00, |
@@ -154,7 +154,7 @@ static unsigned char page_six[] __initdata = { | |||
154 | 0x80, 0x00, 0x7e, 0x80, 0x80 | 154 | 0x80, 0x00, 0x7e, 0x80, 0x80 |
155 | }; | 155 | }; |
156 | 156 | ||
157 | static unsigned char page_seven[] __initdata = { | 157 | static unsigned char page_seven[] __devinitdata = { |
158 | 0x0f, 0xff, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, | 158 | 0x0f, 0xff, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, |
159 | 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, | 159 | 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, |
160 | 0x08, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0f, | 160 | 0x08, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0f, |
@@ -181,7 +181,7 @@ static unsigned char page_seven[] __initdata = { | |||
181 | 0x00, 0x02, 0x00 | 181 | 0x00, 0x02, 0x00 |
182 | }; | 182 | }; |
183 | 183 | ||
184 | static unsigned char page_zero_v2[] __initdata = { | 184 | static unsigned char page_zero_v2[] __devinitdata = { |
185 | 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 185 | 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
186 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 186 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
187 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 187 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
@@ -193,7 +193,7 @@ static unsigned char page_zero_v2[] __initdata = { | |||
193 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | 193 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
194 | }; | 194 | }; |
195 | 195 | ||
196 | static unsigned char page_one_v2[] __initdata = { | 196 | static unsigned char page_one_v2[] __devinitdata = { |
197 | 0x01, 0xc0, 0x01, 0xfa, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, | 197 | 0x01, 0xc0, 0x01, 0xfa, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, |
198 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 198 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
199 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 199 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
@@ -205,21 +205,21 @@ static unsigned char page_one_v2[] __initdata = { | |||
205 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | 205 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
206 | }; | 206 | }; |
207 | 207 | ||
208 | static unsigned char page_two_v2[] __initdata = { | 208 | static unsigned char page_two_v2[] __devinitdata = { |
209 | 0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 209 | 0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
210 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 210 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
211 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 211 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
212 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 212 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
213 | 0x00, 0x00, 0x00, 0x00 | 213 | 0x00, 0x00, 0x00, 0x00 |
214 | }; | 214 | }; |
215 | static unsigned char page_three_v2[] __initdata = { | 215 | static unsigned char page_three_v2[] __devinitdata = { |
216 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 216 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
217 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 217 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
218 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 218 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
219 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 219 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
220 | 0x00, 0x00, 0x00, 0x00 | 220 | 0x00, 0x00, 0x00, 0x00 |
221 | }; | 221 | }; |
222 | static unsigned char page_four_v2[] __initdata = { | 222 | static unsigned char page_four_v2[] __devinitdata = { |
223 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 223 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
224 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 224 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
225 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 225 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
@@ -227,7 +227,7 @@ static unsigned char page_four_v2[] __initdata = { | |||
227 | 0x00, 0x00, 0x00, 0x00 | 227 | 0x00, 0x00, 0x00, 0x00 |
228 | }; | 228 | }; |
229 | 229 | ||
230 | static unsigned char page_seven_v2[] __initdata = { | 230 | static unsigned char page_seven_v2[] __devinitdata = { |
231 | 0x0f, 0xff, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 231 | 0x0f, 0xff, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
233 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 233 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
@@ -239,7 +239,7 @@ static unsigned char page_seven_v2[] __initdata = { | |||
239 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | 239 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
240 | }; | 240 | }; |
241 | 241 | ||
242 | static unsigned char mod_v2[] __initdata = { | 242 | static unsigned char mod_v2[] __devinitdata = { |
243 | 0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02, | 243 | 0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02, |
244 | 0x00, 0x01, 0x03, 0x02, 0x00, 0x01, 0x04, 0x02, 0x00, 0x01, 0x05, | 244 | 0x00, 0x01, 0x03, 0x02, 0x00, 0x01, 0x04, 0x02, 0x00, 0x01, 0x05, |
245 | 0x02, 0x00, 0x01, 0x06, 0x02, 0x00, 0x01, 0x07, 0x02, 0x00, 0xb0, | 245 | 0x02, 0x00, 0x01, 0x06, 0x02, 0x00, 0x01, 0x07, 0x02, 0x00, 0xb0, |
@@ -269,7 +269,7 @@ static unsigned char mod_v2[] __initdata = { | |||
269 | 0x02, 0x01, 0x01, 0x04, 0x02, 0x01, 0x01, 0x05, 0x02, 0x01, 0x01, | 269 | 0x02, 0x01, 0x01, 0x04, 0x02, 0x01, 0x01, 0x05, 0x02, 0x01, 0x01, |
270 | 0x06, 0x02, 0x01, 0x01, 0x07, 0x02, 0x01 | 270 | 0x06, 0x02, 0x01, 0x01, 0x07, 0x02, 0x01 |
271 | }; | 271 | }; |
272 | static unsigned char coefficients[] __initdata = { | 272 | static unsigned char coefficients[] __devinitdata = { |
273 | 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x00, 0x4b, 0x03, | 273 | 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x00, 0x4b, 0x03, |
274 | 0x11, 0x00, 0x4d, 0x01, 0x32, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, | 274 | 0x11, 0x00, 0x4d, 0x01, 0x32, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, |
275 | 0x00, 0x00, 0x07, 0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x01, | 275 | 0x00, 0x00, 0x07, 0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x01, |
@@ -305,14 +305,14 @@ static unsigned char coefficients[] __initdata = { | |||
305 | 0x06, 0x6c, 0x4c, 0x6c, 0x06, 0x50, 0x52, 0xe2, 0x06, 0x42, 0x02, | 305 | 0x06, 0x6c, 0x4c, 0x6c, 0x06, 0x50, 0x52, 0xe2, 0x06, 0x42, 0x02, |
306 | 0xba | 306 | 0xba |
307 | }; | 307 | }; |
308 | static unsigned char coefficients2[] __initdata = { | 308 | static unsigned char coefficients2[] __devinitdata = { |
309 | 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x45, 0x0f, | 309 | 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x45, 0x0f, |
310 | 0xff, 0x07, 0x48, 0x0f, 0xff, 0x07, 0x7b, 0x04, 0xcc, 0x07, 0x7d, | 310 | 0xff, 0x07, 0x48, 0x0f, 0xff, 0x07, 0x7b, 0x04, 0xcc, 0x07, 0x7d, |
311 | 0x04, 0xcc, 0x07, 0x7c, 0x00, 0x00, 0x07, 0x7e, 0x00, 0x00, 0x07, | 311 | 0x04, 0xcc, 0x07, 0x7c, 0x00, 0x00, 0x07, 0x7e, 0x00, 0x00, 0x07, |
312 | 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x47, 0x00, 0x00, | 312 | 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x47, 0x00, 0x00, |
313 | 0x07, 0x4a, 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x07, 0x4e, 0x00, 0x00 | 313 | 0x07, 0x4a, 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x07, 0x4e, 0x00, 0x00 |
314 | }; | 314 | }; |
315 | static unsigned char coefficients3[] __initdata = { | 315 | static unsigned char coefficients3[] __devinitdata = { |
316 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x00, 0x51, 0x00, | 316 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x00, 0x51, 0x00, |
317 | 0x51, 0x00, 0x7a, 0x00, 0x7a, 0x00, 0xa3, 0x00, 0xa3, 0x00, 0xcc, | 317 | 0x51, 0x00, 0x7a, 0x00, 0x7a, 0x00, 0xa3, 0x00, 0xa3, 0x00, 0xcc, |
318 | 0x00, 0xcc, 0x00, 0xf5, 0x00, 0xf5, 0x01, 0x1e, 0x01, 0x1e, 0x01, | 318 | 0x00, 0xcc, 0x00, 0xf5, 0x00, 0xf5, 0x01, 0x1e, 0x01, 0x1e, 0x01, |
@@ -563,7 +563,7 @@ snd_wavefront_fx_ioctl (struct snd_hwdep *sdev, struct file *file, | |||
563 | */ | 563 | */ |
564 | 564 | ||
565 | 565 | ||
566 | int __init | 566 | int __devinit |
567 | snd_wavefront_fx_start (snd_wavefront_t *dev) | 567 | snd_wavefront_fx_start (snd_wavefront_t *dev) |
568 | 568 | ||
569 | { | 569 | { |
diff --git a/sound/isa/wavefront/wavefront_midi.c b/sound/isa/wavefront/wavefront_midi.c index 15888ba2169b..cb3460094324 100644 --- a/sound/isa/wavefront/wavefront_midi.c +++ b/sound/isa/wavefront/wavefront_midi.c | |||
@@ -474,7 +474,7 @@ snd_wavefront_midi_disable_virtual (snd_wavefront_card_t *card) | |||
474 | spin_unlock_irqrestore (&card->wavefront.midi.virtual, flags); | 474 | spin_unlock_irqrestore (&card->wavefront.midi.virtual, flags); |
475 | } | 475 | } |
476 | 476 | ||
477 | int __init | 477 | int __devinit |
478 | snd_wavefront_midi_start (snd_wavefront_card_t *card) | 478 | snd_wavefront_midi_start (snd_wavefront_card_t *card) |
479 | 479 | ||
480 | { | 480 | { |
diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index 68aa091e8961..bed329edbdd7 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c | |||
@@ -1738,7 +1738,7 @@ snd_wavefront_internal_interrupt (snd_wavefront_card_t *card) | |||
1738 | 7 Unused | 1738 | 7 Unused |
1739 | */ | 1739 | */ |
1740 | 1740 | ||
1741 | static int __init | 1741 | static int __devinit |
1742 | snd_wavefront_interrupt_bits (int irq) | 1742 | snd_wavefront_interrupt_bits (int irq) |
1743 | 1743 | ||
1744 | { | 1744 | { |
@@ -1766,7 +1766,7 @@ snd_wavefront_interrupt_bits (int irq) | |||
1766 | return bits; | 1766 | return bits; |
1767 | } | 1767 | } |
1768 | 1768 | ||
1769 | static void __init | 1769 | static void __devinit |
1770 | wavefront_should_cause_interrupt (snd_wavefront_t *dev, | 1770 | wavefront_should_cause_interrupt (snd_wavefront_t *dev, |
1771 | int val, int port, int timeout) | 1771 | int val, int port, int timeout) |
1772 | 1772 | ||
@@ -1787,7 +1787,7 @@ wavefront_should_cause_interrupt (snd_wavefront_t *dev, | |||
1787 | } | 1787 | } |
1788 | } | 1788 | } |
1789 | 1789 | ||
1790 | static int __init | 1790 | static int __devinit |
1791 | wavefront_reset_to_cleanliness (snd_wavefront_t *dev) | 1791 | wavefront_reset_to_cleanliness (snd_wavefront_t *dev) |
1792 | 1792 | ||
1793 | { | 1793 | { |
@@ -1946,7 +1946,7 @@ wavefront_reset_to_cleanliness (snd_wavefront_t *dev) | |||
1946 | #include <asm/uaccess.h> | 1946 | #include <asm/uaccess.h> |
1947 | 1947 | ||
1948 | 1948 | ||
1949 | static int __init | 1949 | static int __devinit |
1950 | wavefront_download_firmware (snd_wavefront_t *dev, char *path) | 1950 | wavefront_download_firmware (snd_wavefront_t *dev, char *path) |
1951 | 1951 | ||
1952 | { | 1952 | { |
@@ -2047,7 +2047,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path) | |||
2047 | } | 2047 | } |
2048 | 2048 | ||
2049 | 2049 | ||
2050 | static int __init | 2050 | static int __devinit |
2051 | wavefront_do_reset (snd_wavefront_t *dev) | 2051 | wavefront_do_reset (snd_wavefront_t *dev) |
2052 | 2052 | ||
2053 | { | 2053 | { |
@@ -2136,7 +2136,7 @@ wavefront_do_reset (snd_wavefront_t *dev) | |||
2136 | return 1; | 2136 | return 1; |
2137 | } | 2137 | } |
2138 | 2138 | ||
2139 | int __init | 2139 | int __devinit |
2140 | snd_wavefront_start (snd_wavefront_t *dev) | 2140 | snd_wavefront_start (snd_wavefront_t *dev) |
2141 | 2141 | ||
2142 | { | 2142 | { |
@@ -2178,7 +2178,7 @@ snd_wavefront_start (snd_wavefront_t *dev) | |||
2178 | return (0); | 2178 | return (0); |
2179 | } | 2179 | } |
2180 | 2180 | ||
2181 | int __init | 2181 | int __devinit |
2182 | snd_wavefront_detect (snd_wavefront_card_t *card) | 2182 | snd_wavefront_detect (snd_wavefront_card_t *card) |
2183 | 2183 | ||
2184 | { | 2184 | { |
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index 23e54cedfd4a..d7ad32f514da 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig | |||
@@ -460,17 +460,19 @@ config SND_FM801 | |||
460 | To compile this driver as a module, choose M here: the module | 460 | To compile this driver as a module, choose M here: the module |
461 | will be called snd-fm801. | 461 | will be called snd-fm801. |
462 | 462 | ||
463 | config SND_FM801_TEA575X | 463 | config SND_FM801_TEA575X_BOOL |
464 | tristate "ForteMedia FM801 + TEA5757 tuner" | 464 | bool "ForteMedia FM801 + TEA5757 tuner" |
465 | depends on SND_FM801 | 465 | depends on SND_FM801 |
466 | select VIDEO_DEV | ||
467 | help | 466 | help |
468 | Say Y here to include support for soundcards based on the ForteMedia | 467 | Say Y here to include support for soundcards based on the ForteMedia |
469 | FM801 chip with a TEA5757 tuner connected to GPIO1-3 pins (Media | 468 | FM801 chip with a TEA5757 tuner connected to GPIO1-3 pins (Media |
470 | Forte SF256-PCS-02). | 469 | Forte SF256-PCS-02) into the snd-fm801 driver. |
471 | 470 | ||
472 | To compile this driver as a module, choose M here: the module | 471 | config SND_FM801_TEA575X |
473 | will be called snd-fm801-tea575x. | 472 | tristate |
473 | depends on SND_FM801_TEA575X_BOOL | ||
474 | default SND_FM801 | ||
475 | select VIDEO_DEV | ||
474 | 476 | ||
475 | config SND_HDA_INTEL | 477 | config SND_HDA_INTEL |
476 | tristate "Intel HD Audio" | 478 | tristate "Intel HD Audio" |
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index f7aef8c9cf43..0786d0edaca5 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c | |||
@@ -241,14 +241,14 @@ ad1889_channel_reset(struct snd_ad1889 *chip, unsigned int channel) | |||
241 | } | 241 | } |
242 | } | 242 | } |
243 | 243 | ||
244 | static inline u16 | 244 | static u16 |
245 | snd_ad1889_ac97_read(struct snd_ac97 *ac97, unsigned short reg) | 245 | snd_ad1889_ac97_read(struct snd_ac97 *ac97, unsigned short reg) |
246 | { | 246 | { |
247 | struct snd_ad1889 *chip = ac97->private_data; | 247 | struct snd_ad1889 *chip = ac97->private_data; |
248 | return ad1889_readw(chip, AD_AC97_BASE + reg); | 248 | return ad1889_readw(chip, AD_AC97_BASE + reg); |
249 | } | 249 | } |
250 | 250 | ||
251 | static inline void | 251 | static void |
252 | snd_ad1889_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val) | 252 | snd_ad1889_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val) |
253 | { | 253 | { |
254 | struct snd_ad1889 *chip = ac97->private_data; | 254 | struct snd_ad1889 *chip = ac97->private_data; |
@@ -873,7 +873,7 @@ skip_hw: | |||
873 | return 0; | 873 | return 0; |
874 | } | 874 | } |
875 | 875 | ||
876 | static inline int | 876 | static int |
877 | snd_ad1889_dev_free(struct snd_device *device) | 877 | snd_ad1889_dev_free(struct snd_device *device) |
878 | { | 878 | { |
879 | struct snd_ad1889 *chip = device->device_data; | 879 | struct snd_ad1889 *chip = device->device_data; |
@@ -1051,7 +1051,7 @@ snd_ad1889_remove(struct pci_dev *pci) | |||
1051 | pci_set_drvdata(pci, NULL); | 1051 | pci_set_drvdata(pci, NULL); |
1052 | } | 1052 | } |
1053 | 1053 | ||
1054 | static struct pci_device_id snd_ad1889_ids[] __devinitdata = { | 1054 | static struct pci_device_id snd_ad1889_ids[] = { |
1055 | { PCI_DEVICE(PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS) }, | 1055 | { PCI_DEVICE(PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS) }, |
1056 | { 0, }, | 1056 | { 0, }, |
1057 | }; | 1057 | }; |
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index e0a815e53d1c..74668398eac5 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -279,7 +279,7 @@ struct snd_ali { | |||
279 | #endif | 279 | #endif |
280 | }; | 280 | }; |
281 | 281 | ||
282 | static struct pci_device_id snd_ali_ids[] __devinitdata = { | 282 | static struct pci_device_id snd_ali_ids[] = { |
283 | {PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0}, | 283 | {PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0}, |
284 | {0, } | 284 | {0, } |
285 | }; | 285 | }; |
diff --git a/sound/pci/als300.c b/sound/pci/als300.c index a9c38963188a..96cfb8ae5055 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c | |||
@@ -146,7 +146,7 @@ struct snd_als300_substream_data { | |||
146 | int block_counter_register; | 146 | int block_counter_register; |
147 | }; | 147 | }; |
148 | 148 | ||
149 | static struct pci_device_id snd_als300_ids[] __devinitdata = { | 149 | static struct pci_device_id snd_als300_ids[] = { |
150 | { 0x4005, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300 }, | 150 | { 0x4005, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300 }, |
151 | { 0x4005, 0x0308, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300_PLUS }, | 151 | { 0x4005, 0x0308, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300_PLUS }, |
152 | { 0, } | 152 | { 0, } |
diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c index a9f08066459a..9e596f750cbd 100644 --- a/sound/pci/als4000.c +++ b/sound/pci/als4000.c | |||
@@ -116,7 +116,7 @@ struct snd_card_als4000 { | |||
116 | #endif | 116 | #endif |
117 | }; | 117 | }; |
118 | 118 | ||
119 | static struct pci_device_id snd_als4000_ids[] __devinitdata = { | 119 | static struct pci_device_id snd_als4000_ids[] = { |
120 | { 0x4005, 0x4000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ALS4000 */ | 120 | { 0x4005, 0x4000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ALS4000 */ |
121 | { 0, } | 121 | { 0, } |
122 | }; | 122 | }; |
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 9fbb065a810b..347e25ff073d 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -284,7 +284,7 @@ struct atiixp { | |||
284 | 284 | ||
285 | /* | 285 | /* |
286 | */ | 286 | */ |
287 | static struct pci_device_id snd_atiixp_ids[] __devinitdata = { | 287 | static struct pci_device_id snd_atiixp_ids[] = { |
288 | { 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ | 288 | { 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ |
289 | { 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */ | 289 | { 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */ |
290 | { 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ | 290 | { 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ |
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 7dcf4941dce2..a89d67c4598b 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -262,7 +262,7 @@ struct atiixp_modem { | |||
262 | 262 | ||
263 | /* | 263 | /* |
264 | */ | 264 | */ |
265 | static struct pci_device_id snd_atiixp_ids[] __devinitdata = { | 265 | static struct pci_device_id snd_atiixp_ids[] = { |
266 | { 0x1002, 0x434d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ | 266 | { 0x1002, 0x434d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ |
267 | { 0x1002, 0x4378, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ | 267 | { 0x1002, 0x4378, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ |
268 | { 0, } | 268 | { 0, } |
diff --git a/sound/pci/au88x0/au8810.c b/sound/pci/au88x0/au8810.c index bd3352998ad0..fce22c7af0ea 100644 --- a/sound/pci/au88x0/au8810.c +++ b/sound/pci/au88x0/au8810.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "au8810.h" | 1 | #include "au8810.h" |
2 | #include "au88x0.h" | 2 | #include "au88x0.h" |
3 | static struct pci_device_id snd_vortex_ids[] __devinitdata = { | 3 | static struct pci_device_id snd_vortex_ids[] = { |
4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE, | 4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE, |
5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,}, | 5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,}, |
6 | {0,} | 6 | {0,} |
diff --git a/sound/pci/au88x0/au8820.c b/sound/pci/au88x0/au8820.c index 7e3fd8372d8d..d1fbcce07257 100644 --- a/sound/pci/au88x0/au8820.c +++ b/sound/pci/au88x0/au8820.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "au8820.h" | 1 | #include "au8820.h" |
2 | #include "au88x0.h" | 2 | #include "au88x0.h" |
3 | static struct pci_device_id snd_vortex_ids[] __devinitdata = { | 3 | static struct pci_device_id snd_vortex_ids[] = { |
4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_1, | 4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_1, |
5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, | 5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, |
6 | {0,} | 6 | {0,} |
diff --git a/sound/pci/au88x0/au8830.c b/sound/pci/au88x0/au8830.c index b840f6608a61..d4f2717c14fb 100644 --- a/sound/pci/au88x0/au8830.c +++ b/sound/pci/au88x0/au8830.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "au8830.h" | 1 | #include "au8830.h" |
2 | #include "au88x0.h" | 2 | #include "au88x0.h" |
3 | static struct pci_device_id snd_vortex_ids[] __devinitdata = { | 3 | static struct pci_device_id snd_vortex_ids[] = { |
4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_2, | 4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_2, |
5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, | 5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, |
6 | {0,} | 6 | {0,} |
diff --git a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h index f078b716d2b0..b1cfc3c79d07 100644 --- a/sound/pci/au88x0/au88x0.h +++ b/sound/pci/au88x0/au88x0.h | |||
@@ -270,7 +270,8 @@ static void vortex_mix_setvolumebyte(vortex_t * vortex, unsigned char mix, | |||
270 | 270 | ||
271 | /* A3D functions. */ | 271 | /* A3D functions. */ |
272 | #ifndef CHIP_AU8820 | 272 | #ifndef CHIP_AU8820 |
273 | static void vortex_Vort3D(vortex_t * v, int en); | 273 | static void vortex_Vort3D_enable(vortex_t * v); |
274 | static void vortex_Vort3D_disable(vortex_t * v); | ||
274 | static void vortex_Vort3D_connect(vortex_t * vortex, int en); | 275 | static void vortex_Vort3D_connect(vortex_t * vortex, int en); |
275 | static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en); | 276 | static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en); |
276 | #endif | 277 | #endif |
diff --git a/sound/pci/au88x0/au88x0_a3d.c b/sound/pci/au88x0/au88x0_a3d.c index d215f393ea64..649849e540d3 100644 --- a/sound/pci/au88x0/au88x0_a3d.c +++ b/sound/pci/au88x0/au88x0_a3d.c | |||
@@ -593,24 +593,23 @@ static int Vort3DRend_Initialize(vortex_t * v, unsigned short mode) | |||
593 | static int vortex_a3d_register_controls(vortex_t * vortex); | 593 | static int vortex_a3d_register_controls(vortex_t * vortex); |
594 | static void vortex_a3d_unregister_controls(vortex_t * vortex); | 594 | static void vortex_a3d_unregister_controls(vortex_t * vortex); |
595 | /* A3D base support init/shudown */ | 595 | /* A3D base support init/shudown */ |
596 | static void vortex_Vort3D(vortex_t * v, int en) | 596 | static void __devinit vortex_Vort3D_enable(vortex_t * v) |
597 | { | 597 | { |
598 | int i; | 598 | int i; |
599 | if (en) { | 599 | |
600 | Vort3DRend_Initialize(v, XT_HEADPHONE); | 600 | Vort3DRend_Initialize(v, XT_HEADPHONE); |
601 | for (i = 0; i < NR_A3D; i++) { | 601 | for (i = 0; i < NR_A3D; i++) { |
602 | vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2); | 602 | vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2); |
603 | a3dsrc_ZeroStateA3D(&(v->a3d[0])); | 603 | a3dsrc_ZeroStateA3D(&(v->a3d[0])); |
604 | } | ||
605 | } else { | ||
606 | vortex_XtalkHw_Disable(v); | ||
607 | } | 604 | } |
608 | /* Register ALSA controls */ | 605 | /* Register ALSA controls */ |
609 | if (en) { | 606 | vortex_a3d_register_controls(v); |
610 | vortex_a3d_register_controls(v); | 607 | } |
611 | } else { | 608 | |
612 | vortex_a3d_unregister_controls(v); | 609 | static void vortex_Vort3D_disable(vortex_t * v) |
613 | } | 610 | { |
611 | vortex_XtalkHw_Disable(v); | ||
612 | vortex_a3d_unregister_controls(v); | ||
614 | } | 613 | } |
615 | 614 | ||
616 | /* Make A3D subsystem connections. */ | 615 | /* Make A3D subsystem connections. */ |
@@ -855,7 +854,7 @@ static struct snd_kcontrol_new vortex_a3d_kcontrol __devinitdata = { | |||
855 | }; | 854 | }; |
856 | 855 | ||
857 | /* Control (un)registration. */ | 856 | /* Control (un)registration. */ |
858 | static int vortex_a3d_register_controls(vortex_t * vortex) | 857 | static int __devinit vortex_a3d_register_controls(vortex_t * vortex) |
859 | { | 858 | { |
860 | struct snd_kcontrol *kcontrol; | 859 | struct snd_kcontrol *kcontrol; |
861 | int err, i; | 860 | int err, i; |
diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c index 4347e6abc1d5..5299cce583d3 100644 --- a/sound/pci/au88x0/au88x0_core.c +++ b/sound/pci/au88x0/au88x0_core.c | |||
@@ -2690,7 +2690,7 @@ static int __devinit vortex_core_init(vortex_t * vortex) | |||
2690 | #ifndef CHIP_AU8820 | 2690 | #ifndef CHIP_AU8820 |
2691 | vortex_eq_init(vortex); | 2691 | vortex_eq_init(vortex); |
2692 | vortex_spdif_init(vortex, 48000, 1); | 2692 | vortex_spdif_init(vortex, 48000, 1); |
2693 | vortex_Vort3D(vortex, 1); | 2693 | vortex_Vort3D_enable(vortex); |
2694 | #endif | 2694 | #endif |
2695 | #ifndef CHIP_AU8810 | 2695 | #ifndef CHIP_AU8810 |
2696 | vortex_wt_init(vortex); | 2696 | vortex_wt_init(vortex); |
@@ -2718,7 +2718,7 @@ static int vortex_core_shutdown(vortex_t * vortex) | |||
2718 | printk(KERN_INFO "Vortex: shutdown..."); | 2718 | printk(KERN_INFO "Vortex: shutdown..."); |
2719 | #ifndef CHIP_AU8820 | 2719 | #ifndef CHIP_AU8820 |
2720 | vortex_eq_free(vortex); | 2720 | vortex_eq_free(vortex); |
2721 | vortex_Vort3D(vortex, 0); | 2721 | vortex_Vort3D_disable(vortex); |
2722 | #endif | 2722 | #endif |
2723 | //vortex_disable_timer_int(vortex); | 2723 | //vortex_disable_timer_int(vortex); |
2724 | vortex_disable_int(vortex); | 2724 | vortex_disable_int(vortex); |
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 15447a3216dd..bac8e9cfd921 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
@@ -238,7 +238,7 @@ struct snd_azf3328 { | |||
238 | #endif | 238 | #endif |
239 | }; | 239 | }; |
240 | 240 | ||
241 | static const struct pci_device_id snd_azf3328_ids[] __devinitdata = { | 241 | static const struct pci_device_id snd_azf3328_ids[] = { |
242 | { 0x122D, 0x50DC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* PCI168/3328 */ | 242 | { 0x122D, 0x50DC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* PCI168/3328 */ |
243 | { 0x122D, 0x80DA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* 3328 */ | 243 | { 0x122D, 0x80DA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* 3328 */ |
244 | { 0, } | 244 | { 0, } |
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 4d4277d045aa..97a280a246cb 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -774,7 +774,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card, | |||
774 | .driver_data = rate } | 774 | .driver_data = rate } |
775 | 775 | ||
776 | /* driver_data is the default digital_rate value for that device */ | 776 | /* driver_data is the default digital_rate value for that device */ |
777 | static struct pci_device_id snd_bt87x_ids[] __devinitdata = { | 777 | static struct pci_device_id snd_bt87x_ids[] = { |
778 | /* Hauppauge WinTV series */ | 778 | /* Hauppauge WinTV series */ |
779 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0x13eb, 32000), | 779 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0x13eb, 32000), |
780 | /* Hauppauge WinTV series */ | 780 | /* Hauppauge WinTV series */ |
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index a30c019bab64..12bbbb6afd2d 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -1602,7 +1602,7 @@ static void __devexit snd_ca0106_remove(struct pci_dev *pci) | |||
1602 | } | 1602 | } |
1603 | 1603 | ||
1604 | // PCI IDs | 1604 | // PCI IDs |
1605 | static struct pci_device_id snd_ca0106_ids[] __devinitdata = { | 1605 | static struct pci_device_id snd_ca0106_ids[] = { |
1606 | { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Audigy LS or Live 24bit */ | 1606 | { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Audigy LS or Live 24bit */ |
1607 | { 0, } | 1607 | { 0, } |
1608 | }; | 1608 | }; |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 03766ad74998..876b64464b6f 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -2609,7 +2609,7 @@ static inline void snd_cmipci_proc_init(struct cmipci *cm) {} | |||
2609 | #endif | 2609 | #endif |
2610 | 2610 | ||
2611 | 2611 | ||
2612 | static struct pci_device_id snd_cmipci_ids[] __devinitdata = { | 2612 | static struct pci_device_id snd_cmipci_ids[] = { |
2613 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2613 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
2614 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2614 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
2615 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2615 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index d1802487f5be..9631456ec3de 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c | |||
@@ -494,7 +494,7 @@ struct cs4281 { | |||
494 | 494 | ||
495 | static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 495 | static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
496 | 496 | ||
497 | static struct pci_device_id snd_cs4281_ids[] __devinitdata = { | 497 | static struct pci_device_id snd_cs4281_ids[] = { |
498 | { 0x1013, 0x6005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4281 */ | 498 | { 0x1013, 0x6005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4281 */ |
499 | { 0, } | 499 | { 0, } |
500 | }; | 500 | }; |
diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c index 772dc52bfeb2..8b6cd144d101 100644 --- a/sound/pci/cs46xx/cs46xx.c +++ b/sound/pci/cs46xx/cs46xx.c | |||
@@ -65,7 +65,7 @@ MODULE_PARM_DESC(thinkpad, "Force to enable Thinkpad's CLKRUN control."); | |||
65 | module_param_array(mmap_valid, bool, NULL, 0444); | 65 | module_param_array(mmap_valid, bool, NULL, 0444); |
66 | MODULE_PARM_DESC(mmap_valid, "Support OSS mmap."); | 66 | MODULE_PARM_DESC(mmap_valid, "Support OSS mmap."); |
67 | 67 | ||
68 | static struct pci_device_id snd_cs46xx_ids[] __devinitdata = { | 68 | static struct pci_device_id snd_cs46xx_ids[] = { |
69 | { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4280 */ | 69 | { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4280 */ |
70 | { 0x1013, 0x6003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4612 */ | 70 | { 0x1013, 0x6003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4612 */ |
71 | { 0x1013, 0x6004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4615 */ | 71 | { 0x1013, 0x6004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4615 */ |
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 894545ea41fd..4851847180d2 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c | |||
@@ -2317,7 +2317,7 @@ static struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = { | |||
2317 | 2317 | ||
2318 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 2318 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
2319 | /* Only available on the Hercules Game Theater XP soundcard */ | 2319 | /* Only available on the Hercules Game Theater XP soundcard */ |
2320 | static struct snd_kcontrol_new snd_hercules_controls[] __devinitdata = { | 2320 | static struct snd_kcontrol_new snd_hercules_controls[] = { |
2321 | { | 2321 | { |
2322 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 2322 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
2323 | .name = "Optical/Coaxial SPDIF Input Switch", | 2323 | .name = "Optical/Coaxial SPDIF Input Switch", |
@@ -3458,6 +3458,9 @@ static void hercules_mixer_init (struct snd_cs46xx *chip) | |||
3458 | snd_printdd ("initializing Hercules mixer\n"); | 3458 | snd_printdd ("initializing Hercules mixer\n"); |
3459 | 3459 | ||
3460 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 3460 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
3461 | if (chip->in_suspend) | ||
3462 | return; | ||
3463 | |||
3461 | for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) { | 3464 | for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) { |
3462 | struct snd_kcontrol *kctl; | 3465 | struct snd_kcontrol *kctl; |
3463 | 3466 | ||
@@ -3669,6 +3672,7 @@ int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state) | |||
3669 | int amp_saved; | 3672 | int amp_saved; |
3670 | 3673 | ||
3671 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 3674 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
3675 | chip->in_suspend = 1; | ||
3672 | snd_pcm_suspend_all(chip->pcm); | 3676 | snd_pcm_suspend_all(chip->pcm); |
3673 | // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL); | 3677 | // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL); |
3674 | // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE); | 3678 | // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE); |
@@ -3722,6 +3726,7 @@ int snd_cs46xx_resume(struct pci_dev *pci) | |||
3722 | else | 3726 | else |
3723 | chip->active_ctrl(chip, -1); /* disable CLKRUN */ | 3727 | chip->active_ctrl(chip, -1); /* disable CLKRUN */ |
3724 | chip->amplifier = amp_saved; | 3728 | chip->amplifier = amp_saved; |
3729 | chip->in_suspend = 0; | ||
3725 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | 3730 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
3726 | return 0; | 3731 | return 0; |
3727 | } | 3732 | } |
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index c12b24c679f2..64c7826e8b8c 100644 --- a/sound/pci/cs5535audio/cs5535audio.c +++ b/sound/pci/cs5535audio/cs5535audio.c | |||
@@ -67,7 +67,7 @@ MODULE_PARM_DESC(id, "ID string for " DRIVER_NAME); | |||
67 | module_param_array(enable, bool, NULL, 0444); | 67 | module_param_array(enable, bool, NULL, 0444); |
68 | MODULE_PARM_DESC(enable, "Enable " DRIVER_NAME); | 68 | MODULE_PARM_DESC(enable, "Enable " DRIVER_NAME); |
69 | 69 | ||
70 | static struct pci_device_id snd_cs5535audio_ids[] __devinitdata = { | 70 | static struct pci_device_id snd_cs5535audio_ids[] = { |
71 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) }, | 71 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) }, |
72 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO) }, | 72 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO) }, |
73 | {} | 73 | {} |
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c index 549673ea14a9..289bcd99c19c 100644 --- a/sound/pci/emu10k1/emu10k1.c +++ b/sound/pci/emu10k1/emu10k1.c | |||
@@ -77,7 +77,7 @@ MODULE_PARM_DESC(subsystem, "Force card subsystem model."); | |||
77 | /* | 77 | /* |
78 | * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400 | 78 | * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400 |
79 | */ | 79 | */ |
80 | static struct pci_device_id snd_emu10k1_ids[] __devinitdata = { | 80 | static struct pci_device_id snd_emu10k1_ids[] = { |
81 | { 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* EMU10K1 */ | 81 | { 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* EMU10K1 */ |
82 | { 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy */ | 82 | { 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy */ |
83 | { 0x1102, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy 2 Value SB0400 */ | 83 | { 0x1102, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy 2 Value SB0400 */ |
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index d6f135fe2958..f9b5c3dc3b34 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -531,7 +531,7 @@ static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 * emu, | |||
531 | snd_emu10k1_ecard_write(emu, emu->ecard_ctrl); | 531 | snd_emu10k1_ecard_write(emu, emu->ecard_ctrl); |
532 | } | 532 | } |
533 | 533 | ||
534 | static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu) | 534 | static int snd_emu10k1_ecard_init(struct snd_emu10k1 * emu) |
535 | { | 535 | { |
536 | unsigned int hc_value; | 536 | unsigned int hc_value; |
537 | 537 | ||
@@ -571,7 +571,7 @@ static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu) | |||
571 | return 0; | 571 | return 0; |
572 | } | 572 | } |
573 | 573 | ||
574 | static int __devinit snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu) | 574 | static int snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu) |
575 | { | 575 | { |
576 | unsigned long special_port; | 576 | unsigned long special_port; |
577 | unsigned int value; | 577 | unsigned int value; |
@@ -633,7 +633,7 @@ static int snd_emu1212m_fpga_netlist_write(struct snd_emu10k1 * emu, int reg, in | |||
633 | return 0; | 633 | return 0; |
634 | } | 634 | } |
635 | 635 | ||
636 | static int __devinit snd_emu10k1_emu1212m_init(struct snd_emu10k1 * emu) | 636 | static int snd_emu10k1_emu1212m_init(struct snd_emu10k1 * emu) |
637 | { | 637 | { |
638 | unsigned int i; | 638 | unsigned int i; |
639 | int tmp; | 639 | int tmp; |
@@ -1430,6 +1430,10 @@ void snd_emu10k1_resume_init(struct snd_emu10k1 *emu) | |||
1430 | { | 1430 | { |
1431 | if (emu->card_capabilities->ecard) | 1431 | if (emu->card_capabilities->ecard) |
1432 | snd_emu10k1_ecard_init(emu); | 1432 | snd_emu10k1_ecard_init(emu); |
1433 | else if (emu->card_capabilities->ca_cardbus_chip) | ||
1434 | snd_emu10k1_cardbus_init(emu); | ||
1435 | else if (emu->card_capabilities->emu1212m) | ||
1436 | snd_emu10k1_emu1212m_init(emu); | ||
1433 | else | 1437 | else |
1434 | snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE); | 1438 | snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE); |
1435 | snd_emu10k1_init(emu, emu->enable_ir, 1); | 1439 | snd_emu10k1_init(emu, emu->enable_ir, 1); |
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 2167279429b8..bda8bdf59935 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c | |||
@@ -1286,7 +1286,7 @@ static void snd_emu10k1x_midi_interrupt(struct emu10k1x *emu, unsigned int statu | |||
1286 | do_emu10k1x_midi_interrupt(emu, &emu->midi, status); | 1286 | do_emu10k1x_midi_interrupt(emu, &emu->midi, status); |
1287 | } | 1287 | } |
1288 | 1288 | ||
1289 | static void snd_emu10k1x_midi_cmd(struct emu10k1x * emu, | 1289 | static int snd_emu10k1x_midi_cmd(struct emu10k1x * emu, |
1290 | struct emu10k1x_midi *midi, unsigned char cmd, int ack) | 1290 | struct emu10k1x_midi *midi, unsigned char cmd, int ack) |
1291 | { | 1291 | { |
1292 | unsigned long flags; | 1292 | unsigned long flags; |
@@ -1312,11 +1312,14 @@ static void snd_emu10k1x_midi_cmd(struct emu10k1x * emu, | |||
1312 | ok = 1; | 1312 | ok = 1; |
1313 | } | 1313 | } |
1314 | spin_unlock_irqrestore(&midi->input_lock, flags); | 1314 | spin_unlock_irqrestore(&midi->input_lock, flags); |
1315 | if (!ok) | 1315 | if (!ok) { |
1316 | snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n", | 1316 | snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n", |
1317 | cmd, emu->port, | 1317 | cmd, emu->port, |
1318 | mpu401_read_stat(emu, midi), | 1318 | mpu401_read_stat(emu, midi), |
1319 | mpu401_read_data(emu, midi)); | 1319 | mpu401_read_data(emu, midi)); |
1320 | return 1; | ||
1321 | } | ||
1322 | return 0; | ||
1320 | } | 1323 | } |
1321 | 1324 | ||
1322 | static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream) | 1325 | static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream) |
@@ -1332,12 +1335,17 @@ static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream) | |||
1332 | midi->substream_input = substream; | 1335 | midi->substream_input = substream; |
1333 | if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) { | 1336 | if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) { |
1334 | spin_unlock_irqrestore(&midi->open_lock, flags); | 1337 | spin_unlock_irqrestore(&midi->open_lock, flags); |
1335 | snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1); | 1338 | if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1)) |
1336 | snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); | 1339 | goto error_out; |
1340 | if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) | ||
1341 | goto error_out; | ||
1337 | } else { | 1342 | } else { |
1338 | spin_unlock_irqrestore(&midi->open_lock, flags); | 1343 | spin_unlock_irqrestore(&midi->open_lock, flags); |
1339 | } | 1344 | } |
1340 | return 0; | 1345 | return 0; |
1346 | |||
1347 | error_out: | ||
1348 | return -EIO; | ||
1341 | } | 1349 | } |
1342 | 1350 | ||
1343 | static int snd_emu10k1x_midi_output_open(struct snd_rawmidi_substream *substream) | 1351 | static int snd_emu10k1x_midi_output_open(struct snd_rawmidi_substream *substream) |
@@ -1353,12 +1361,17 @@ static int snd_emu10k1x_midi_output_open(struct snd_rawmidi_substream *substream | |||
1353 | midi->substream_output = substream; | 1361 | midi->substream_output = substream; |
1354 | if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) { | 1362 | if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) { |
1355 | spin_unlock_irqrestore(&midi->open_lock, flags); | 1363 | spin_unlock_irqrestore(&midi->open_lock, flags); |
1356 | snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1); | 1364 | if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1)) |
1357 | snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); | 1365 | goto error_out; |
1366 | if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) | ||
1367 | goto error_out; | ||
1358 | } else { | 1368 | } else { |
1359 | spin_unlock_irqrestore(&midi->open_lock, flags); | 1369 | spin_unlock_irqrestore(&midi->open_lock, flags); |
1360 | } | 1370 | } |
1361 | return 0; | 1371 | return 0; |
1372 | |||
1373 | error_out: | ||
1374 | return -EIO; | ||
1362 | } | 1375 | } |
1363 | 1376 | ||
1364 | static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream) | 1377 | static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream) |
@@ -1366,6 +1379,7 @@ static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream | |||
1366 | struct emu10k1x *emu; | 1379 | struct emu10k1x *emu; |
1367 | struct emu10k1x_midi *midi = substream->rmidi->private_data; | 1380 | struct emu10k1x_midi *midi = substream->rmidi->private_data; |
1368 | unsigned long flags; | 1381 | unsigned long flags; |
1382 | int err = 0; | ||
1369 | 1383 | ||
1370 | emu = midi->emu; | 1384 | emu = midi->emu; |
1371 | snd_assert(emu, return -ENXIO); | 1385 | snd_assert(emu, return -ENXIO); |
@@ -1375,11 +1389,11 @@ static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream | |||
1375 | midi->substream_input = NULL; | 1389 | midi->substream_input = NULL; |
1376 | if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) { | 1390 | if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) { |
1377 | spin_unlock_irqrestore(&midi->open_lock, flags); | 1391 | spin_unlock_irqrestore(&midi->open_lock, flags); |
1378 | snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); | 1392 | err = snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); |
1379 | } else { | 1393 | } else { |
1380 | spin_unlock_irqrestore(&midi->open_lock, flags); | 1394 | spin_unlock_irqrestore(&midi->open_lock, flags); |
1381 | } | 1395 | } |
1382 | return 0; | 1396 | return err; |
1383 | } | 1397 | } |
1384 | 1398 | ||
1385 | static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substream) | 1399 | static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substream) |
@@ -1387,6 +1401,7 @@ static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substrea | |||
1387 | struct emu10k1x *emu; | 1401 | struct emu10k1x *emu; |
1388 | struct emu10k1x_midi *midi = substream->rmidi->private_data; | 1402 | struct emu10k1x_midi *midi = substream->rmidi->private_data; |
1389 | unsigned long flags; | 1403 | unsigned long flags; |
1404 | int err = 0; | ||
1390 | 1405 | ||
1391 | emu = midi->emu; | 1406 | emu = midi->emu; |
1392 | snd_assert(emu, return -ENXIO); | 1407 | snd_assert(emu, return -ENXIO); |
@@ -1396,11 +1411,11 @@ static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substrea | |||
1396 | midi->substream_output = NULL; | 1411 | midi->substream_output = NULL; |
1397 | if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) { | 1412 | if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) { |
1398 | spin_unlock_irqrestore(&midi->open_lock, flags); | 1413 | spin_unlock_irqrestore(&midi->open_lock, flags); |
1399 | snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); | 1414 | err = snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); |
1400 | } else { | 1415 | } else { |
1401 | spin_unlock_irqrestore(&midi->open_lock, flags); | 1416 | spin_unlock_irqrestore(&midi->open_lock, flags); |
1402 | } | 1417 | } |
1403 | return 0; | 1418 | return err; |
1404 | } | 1419 | } |
1405 | 1420 | ||
1406 | static void snd_emu10k1x_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) | 1421 | static void snd_emu10k1x_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) |
@@ -1594,7 +1609,7 @@ static void __devexit snd_emu10k1x_remove(struct pci_dev *pci) | |||
1594 | } | 1609 | } |
1595 | 1610 | ||
1596 | // PCI IDs | 1611 | // PCI IDs |
1597 | static struct pci_device_id snd_emu10k1x_ids[] __devinitdata = { | 1612 | static struct pci_device_id snd_emu10k1x_ids[] = { |
1598 | { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1) */ | 1613 | { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1) */ |
1599 | { 0, } | 1614 | { 0, } |
1600 | }; | 1615 | }; |
diff --git a/sound/pci/emu10k1/emumpu401.c b/sound/pci/emu10k1/emumpu401.c index d96eb455103f..950c6bcd6b7d 100644 --- a/sound/pci/emu10k1/emumpu401.c +++ b/sound/pci/emu10k1/emumpu401.c | |||
@@ -116,7 +116,7 @@ static void snd_emu10k1_midi_interrupt2(struct snd_emu10k1 *emu, unsigned int st | |||
116 | do_emu10k1_midi_interrupt(emu, &emu->midi2, status); | 116 | do_emu10k1_midi_interrupt(emu, &emu->midi2, status); |
117 | } | 117 | } |
118 | 118 | ||
119 | static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack) | 119 | static int snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack) |
120 | { | 120 | { |
121 | unsigned long flags; | 121 | unsigned long flags; |
122 | int timeout, ok; | 122 | int timeout, ok; |
@@ -141,11 +141,14 @@ static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_mi | |||
141 | ok = 1; | 141 | ok = 1; |
142 | } | 142 | } |
143 | spin_unlock_irqrestore(&midi->input_lock, flags); | 143 | spin_unlock_irqrestore(&midi->input_lock, flags); |
144 | if (!ok) | 144 | if (!ok) { |
145 | snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n", | 145 | snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n", |
146 | cmd, emu->port, | 146 | cmd, emu->port, |
147 | mpu401_read_stat(emu, midi), | 147 | mpu401_read_stat(emu, midi), |
148 | mpu401_read_data(emu, midi)); | 148 | mpu401_read_data(emu, midi)); |
149 | return 1; | ||
150 | } | ||
151 | return 0; | ||
149 | } | 152 | } |
150 | 153 | ||
151 | static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream) | 154 | static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream) |
@@ -161,12 +164,17 @@ static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream) | |||
161 | midi->substream_input = substream; | 164 | midi->substream_input = substream; |
162 | if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) { | 165 | if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) { |
163 | spin_unlock_irqrestore(&midi->open_lock, flags); | 166 | spin_unlock_irqrestore(&midi->open_lock, flags); |
164 | snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1); | 167 | if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1)) |
165 | snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); | 168 | goto error_out; |
169 | if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) | ||
170 | goto error_out; | ||
166 | } else { | 171 | } else { |
167 | spin_unlock_irqrestore(&midi->open_lock, flags); | 172 | spin_unlock_irqrestore(&midi->open_lock, flags); |
168 | } | 173 | } |
169 | return 0; | 174 | return 0; |
175 | |||
176 | error_out: | ||
177 | return -EIO; | ||
170 | } | 178 | } |
171 | 179 | ||
172 | static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream) | 180 | static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream) |
@@ -182,12 +190,17 @@ static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream) | |||
182 | midi->substream_output = substream; | 190 | midi->substream_output = substream; |
183 | if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) { | 191 | if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) { |
184 | spin_unlock_irqrestore(&midi->open_lock, flags); | 192 | spin_unlock_irqrestore(&midi->open_lock, flags); |
185 | snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1); | 193 | if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1)) |
186 | snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); | 194 | goto error_out; |
195 | if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) | ||
196 | goto error_out; | ||
187 | } else { | 197 | } else { |
188 | spin_unlock_irqrestore(&midi->open_lock, flags); | 198 | spin_unlock_irqrestore(&midi->open_lock, flags); |
189 | } | 199 | } |
190 | return 0; | 200 | return 0; |
201 | |||
202 | error_out: | ||
203 | return -EIO; | ||
191 | } | 204 | } |
192 | 205 | ||
193 | static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) | 206 | static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) |
@@ -195,6 +208,7 @@ static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) | |||
195 | struct snd_emu10k1 *emu; | 208 | struct snd_emu10k1 *emu; |
196 | struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; | 209 | struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; |
197 | unsigned long flags; | 210 | unsigned long flags; |
211 | int err = 0; | ||
198 | 212 | ||
199 | emu = midi->emu; | 213 | emu = midi->emu; |
200 | snd_assert(emu, return -ENXIO); | 214 | snd_assert(emu, return -ENXIO); |
@@ -204,11 +218,11 @@ static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) | |||
204 | midi->substream_input = NULL; | 218 | midi->substream_input = NULL; |
205 | if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) { | 219 | if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) { |
206 | spin_unlock_irqrestore(&midi->open_lock, flags); | 220 | spin_unlock_irqrestore(&midi->open_lock, flags); |
207 | snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); | 221 | err = snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); |
208 | } else { | 222 | } else { |
209 | spin_unlock_irqrestore(&midi->open_lock, flags); | 223 | spin_unlock_irqrestore(&midi->open_lock, flags); |
210 | } | 224 | } |
211 | return 0; | 225 | return err; |
212 | } | 226 | } |
213 | 227 | ||
214 | static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream) | 228 | static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream) |
@@ -216,6 +230,7 @@ static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream | |||
216 | struct snd_emu10k1 *emu; | 230 | struct snd_emu10k1 *emu; |
217 | struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; | 231 | struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; |
218 | unsigned long flags; | 232 | unsigned long flags; |
233 | int err = 0; | ||
219 | 234 | ||
220 | emu = midi->emu; | 235 | emu = midi->emu; |
221 | snd_assert(emu, return -ENXIO); | 236 | snd_assert(emu, return -ENXIO); |
@@ -225,11 +240,11 @@ static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream | |||
225 | midi->substream_output = NULL; | 240 | midi->substream_output = NULL; |
226 | if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) { | 241 | if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) { |
227 | spin_unlock_irqrestore(&midi->open_lock, flags); | 242 | spin_unlock_irqrestore(&midi->open_lock, flags); |
228 | snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); | 243 | err = snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); |
229 | } else { | 244 | } else { |
230 | spin_unlock_irqrestore(&midi->open_lock, flags); | 245 | spin_unlock_irqrestore(&midi->open_lock, flags); |
231 | } | 246 | } |
232 | return 0; | 247 | return err; |
233 | } | 248 | } |
234 | 249 | ||
235 | static void snd_emu10k1_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) | 250 | static void snd_emu10k1_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) |
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 7a985c868007..a8a601fc781f 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c | |||
@@ -446,7 +446,7 @@ struct ensoniq { | |||
446 | 446 | ||
447 | static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 447 | static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
448 | 448 | ||
449 | static struct pci_device_id snd_audiopci_ids[] __devinitdata = { | 449 | static struct pci_device_id snd_audiopci_ids[] = { |
450 | #ifdef CHIP1370 | 450 | #ifdef CHIP1370 |
451 | { 0x1274, 0x5000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ES1370 */ | 451 | { 0x1274, 0x5000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ES1370 */ |
452 | #endif | 452 | #endif |
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index 1113b10259cf..cc0f34f68185 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c | |||
@@ -242,7 +242,7 @@ struct es1938 { | |||
242 | 242 | ||
243 | static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 243 | static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
244 | 244 | ||
245 | static struct pci_device_id snd_es1938_ids[] __devinitdata = { | 245 | static struct pci_device_id snd_es1938_ids[] = { |
246 | { 0x125d, 0x1969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Solo-1 */ | 246 | { 0x125d, 0x1969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Solo-1 */ |
247 | { 0, } | 247 | { 0, } |
248 | }; | 248 | }; |
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index a491c8f8a6a8..3c5ab7c2e72d 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c | |||
@@ -592,7 +592,7 @@ struct es1968 { | |||
592 | 592 | ||
593 | static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 593 | static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
594 | 594 | ||
595 | static struct pci_device_id snd_es1968_ids[] __devinitdata = { | 595 | static struct pci_device_id snd_es1968_ids[] = { |
596 | /* Maestro 1 */ | 596 | /* Maestro 1 */ |
597 | { 0x1285, 0x0100, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, TYPE_MAESTRO }, | 597 | { 0x1285, 0x0100, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, TYPE_MAESTRO }, |
598 | /* Maestro 2 */ | 598 | /* Maestro 2 */ |
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 3aed27eace2c..13868c985126 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #include <asm/io.h> | 36 | #include <asm/io.h> |
37 | 37 | ||
38 | #if (defined(CONFIG_SND_FM801_TEA575X) || defined(CONFIG_SND_FM801_TEA575X_MODULE)) && (defined(CONFIG_VIDEO_DEV) || defined(CONFIG_VIDEO_DEV_MODULE)) | 38 | #ifdef CONFIG_SND_FM801_TEA575X_BOOL |
39 | #include <sound/tea575x-tuner.h> | 39 | #include <sound/tea575x-tuner.h> |
40 | #define TEA575X_RADIO 1 | 40 | #define TEA575X_RADIO 1 |
41 | #endif | 41 | #endif |
@@ -199,7 +199,7 @@ struct fm801 { | |||
199 | #endif | 199 | #endif |
200 | }; | 200 | }; |
201 | 201 | ||
202 | static struct pci_device_id snd_fm801_ids[] __devinitdata = { | 202 | static struct pci_device_id snd_fm801_ids[] = { |
203 | { 0x1319, 0x0801, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* FM801 */ | 203 | { 0x1319, 0x0801, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* FM801 */ |
204 | { 0x5213, 0x0510, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* Gallant Odyssey Sound 4 */ | 204 | { 0x5213, 0x0510, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* Gallant Odyssey Sound 4 */ |
205 | { 0, } | 205 | { 0, } |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 025af7c0c6e1..79d63c99f092 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1629,7 +1629,7 @@ static void __devexit azx_remove(struct pci_dev *pci) | |||
1629 | } | 1629 | } |
1630 | 1630 | ||
1631 | /* PCI IDs */ | 1631 | /* PCI IDs */ |
1632 | static struct pci_device_id azx_ids[] __devinitdata = { | 1632 | static struct pci_device_id azx_ids[] = { |
1633 | { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */ | 1633 | { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */ |
1634 | { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */ | 1634 | { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */ |
1635 | { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */ | 1635 | { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */ |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 33b7d5806469..6823f2bc10b3 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -1545,6 +1545,9 @@ enum { | |||
1545 | /* reivision id to check workarounds */ | 1545 | /* reivision id to check workarounds */ |
1546 | #define AD1988A_REV2 0x100200 | 1546 | #define AD1988A_REV2 0x100200 |
1547 | 1547 | ||
1548 | #define is_rev2(codec) \ | ||
1549 | ((codec)->vendor_id == 0x11d41988 && \ | ||
1550 | (codec)->revision_id == AD1988A_REV2) | ||
1548 | 1551 | ||
1549 | /* | 1552 | /* |
1550 | * mixers | 1553 | * mixers |
@@ -1636,6 +1639,7 @@ static struct snd_kcontrol_new ad1988_6stack_mixers1[] = { | |||
1636 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT), | 1639 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT), |
1637 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT), | 1640 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT), |
1638 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0a, 0x0, HDA_OUTPUT), | 1641 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0a, 0x0, HDA_OUTPUT), |
1642 | { } /* end */ | ||
1639 | }; | 1643 | }; |
1640 | 1644 | ||
1641 | static struct snd_kcontrol_new ad1988_6stack_mixers1_rev2[] = { | 1645 | static struct snd_kcontrol_new ad1988_6stack_mixers1_rev2[] = { |
@@ -1644,6 +1648,7 @@ static struct snd_kcontrol_new ad1988_6stack_mixers1_rev2[] = { | |||
1644 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), | 1648 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), |
1645 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0a, 2, 0x0, HDA_OUTPUT), | 1649 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0a, 2, 0x0, HDA_OUTPUT), |
1646 | HDA_CODEC_VOLUME("Side Playback Volume", 0x06, 0x0, HDA_OUTPUT), | 1650 | HDA_CODEC_VOLUME("Side Playback Volume", 0x06, 0x0, HDA_OUTPUT), |
1651 | { } /* end */ | ||
1647 | }; | 1652 | }; |
1648 | 1653 | ||
1649 | static struct snd_kcontrol_new ad1988_6stack_mixers2[] = { | 1654 | static struct snd_kcontrol_new ad1988_6stack_mixers2[] = { |
@@ -1682,6 +1687,7 @@ static struct snd_kcontrol_new ad1988_3stack_mixers1[] = { | |||
1682 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT), | 1687 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT), |
1683 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT), | 1688 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x05, 1, 0x0, HDA_OUTPUT), |
1684 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT), | 1689 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x05, 2, 0x0, HDA_OUTPUT), |
1690 | { } /* end */ | ||
1685 | }; | 1691 | }; |
1686 | 1692 | ||
1687 | static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = { | 1693 | static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = { |
@@ -1689,6 +1695,7 @@ static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = { | |||
1689 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT), | 1695 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT), |
1690 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x06, 1, 0x0, HDA_OUTPUT), | 1696 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x06, 1, 0x0, HDA_OUTPUT), |
1691 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x06, 2, 0x0, HDA_OUTPUT), | 1697 | HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x06, 2, 0x0, HDA_OUTPUT), |
1698 | { } /* end */ | ||
1692 | }; | 1699 | }; |
1693 | 1700 | ||
1694 | static struct snd_kcontrol_new ad1988_3stack_mixers2[] = { | 1701 | static struct snd_kcontrol_new ad1988_3stack_mixers2[] = { |
@@ -2195,7 +2202,7 @@ static inline hda_nid_t ad1988_idx_to_dac(struct hda_codec *codec, int idx) | |||
2195 | /* A B C D E F G H */ | 2202 | /* A B C D E F G H */ |
2196 | 0x04, 0x05, 0x0a, 0x04, 0x06, 0x05, 0x0a, 0x06 | 2203 | 0x04, 0x05, 0x0a, 0x04, 0x06, 0x05, 0x0a, 0x06 |
2197 | }; | 2204 | }; |
2198 | if (codec->revision_id == AD1988A_REV2) | 2205 | if (is_rev2(codec)) |
2199 | return idx_to_dac_rev2[idx]; | 2206 | return idx_to_dac_rev2[idx]; |
2200 | else | 2207 | else |
2201 | return idx_to_dac[idx]; | 2208 | return idx_to_dac[idx]; |
@@ -2564,7 +2571,7 @@ static int patch_ad1988(struct hda_codec *codec) | |||
2564 | mutex_init(&spec->amp_mutex); | 2571 | mutex_init(&spec->amp_mutex); |
2565 | codec->spec = spec; | 2572 | codec->spec = spec; |
2566 | 2573 | ||
2567 | if (codec->revision_id == AD1988A_REV2) | 2574 | if (is_rev2(codec)) |
2568 | snd_printk(KERN_INFO "patch_analog: AD1988A rev.2 is detected, enable workarounds\n"); | 2575 | snd_printk(KERN_INFO "patch_analog: AD1988A rev.2 is detected, enable workarounds\n"); |
2569 | 2576 | ||
2570 | board_config = snd_hda_check_board_config(codec, ad1988_cfg_tbl); | 2577 | board_config = snd_hda_check_board_config(codec, ad1988_cfg_tbl); |
@@ -2590,13 +2597,13 @@ static int patch_ad1988(struct hda_codec *codec) | |||
2590 | case AD1988_6STACK_DIG: | 2597 | case AD1988_6STACK_DIG: |
2591 | spec->multiout.max_channels = 8; | 2598 | spec->multiout.max_channels = 8; |
2592 | spec->multiout.num_dacs = 4; | 2599 | spec->multiout.num_dacs = 4; |
2593 | if (codec->revision_id == AD1988A_REV2) | 2600 | if (is_rev2(codec)) |
2594 | spec->multiout.dac_nids = ad1988_6stack_dac_nids_rev2; | 2601 | spec->multiout.dac_nids = ad1988_6stack_dac_nids_rev2; |
2595 | else | 2602 | else |
2596 | spec->multiout.dac_nids = ad1988_6stack_dac_nids; | 2603 | spec->multiout.dac_nids = ad1988_6stack_dac_nids; |
2597 | spec->input_mux = &ad1988_6stack_capture_source; | 2604 | spec->input_mux = &ad1988_6stack_capture_source; |
2598 | spec->num_mixers = 2; | 2605 | spec->num_mixers = 2; |
2599 | if (codec->revision_id == AD1988A_REV2) | 2606 | if (is_rev2(codec)) |
2600 | spec->mixers[0] = ad1988_6stack_mixers1_rev2; | 2607 | spec->mixers[0] = ad1988_6stack_mixers1_rev2; |
2601 | else | 2608 | else |
2602 | spec->mixers[0] = ad1988_6stack_mixers1; | 2609 | spec->mixers[0] = ad1988_6stack_mixers1; |
@@ -2612,7 +2619,7 @@ static int patch_ad1988(struct hda_codec *codec) | |||
2612 | case AD1988_3STACK_DIG: | 2619 | case AD1988_3STACK_DIG: |
2613 | spec->multiout.max_channels = 6; | 2620 | spec->multiout.max_channels = 6; |
2614 | spec->multiout.num_dacs = 3; | 2621 | spec->multiout.num_dacs = 3; |
2615 | if (codec->revision_id == AD1988A_REV2) | 2622 | if (is_rev2(codec)) |
2616 | spec->multiout.dac_nids = ad1988_3stack_dac_nids_rev2; | 2623 | spec->multiout.dac_nids = ad1988_3stack_dac_nids_rev2; |
2617 | else | 2624 | else |
2618 | spec->multiout.dac_nids = ad1988_3stack_dac_nids; | 2625 | spec->multiout.dac_nids = ad1988_3stack_dac_nids; |
@@ -2620,7 +2627,7 @@ static int patch_ad1988(struct hda_codec *codec) | |||
2620 | spec->channel_mode = ad1988_3stack_modes; | 2627 | spec->channel_mode = ad1988_3stack_modes; |
2621 | spec->num_channel_mode = ARRAY_SIZE(ad1988_3stack_modes); | 2628 | spec->num_channel_mode = ARRAY_SIZE(ad1988_3stack_modes); |
2622 | spec->num_mixers = 2; | 2629 | spec->num_mixers = 2; |
2623 | if (codec->revision_id == AD1988A_REV2) | 2630 | if (is_rev2(codec)) |
2624 | spec->mixers[0] = ad1988_3stack_mixers1_rev2; | 2631 | spec->mixers[0] = ad1988_3stack_mixers1_rev2; |
2625 | else | 2632 | else |
2626 | spec->mixers[0] = ad1988_3stack_mixers1; | 2633 | spec->mixers[0] = ad1988_3stack_mixers1; |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index fb4bed0759d1..ea99083a1024 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -351,6 +351,7 @@ static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = { | |||
351 | [STAC_REF] = ref922x_pin_configs, | 351 | [STAC_REF] = ref922x_pin_configs, |
352 | [STAC_D945GTP3] = d945gtp3_pin_configs, | 352 | [STAC_D945GTP3] = d945gtp3_pin_configs, |
353 | [STAC_D945GTP5] = d945gtp5_pin_configs, | 353 | [STAC_D945GTP5] = d945gtp5_pin_configs, |
354 | [STAC_MACMINI] = d945gtp5_pin_configs, | ||
354 | [STAC_D965_2112] = d965_2112_pin_configs, | 355 | [STAC_D965_2112] = d965_2112_pin_configs, |
355 | }; | 356 | }; |
356 | 357 | ||
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c index ca74f5b85f42..9492f3d2455b 100644 --- a/sound/pci/ice1712/aureon.c +++ b/sound/pci/ice1712/aureon.c | |||
@@ -2131,7 +2131,7 @@ struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = { | |||
2131 | .build_controls = aureon_add_controls, | 2131 | .build_controls = aureon_add_controls, |
2132 | .eeprom_size = sizeof(aureon71_eeprom), | 2132 | .eeprom_size = sizeof(aureon71_eeprom), |
2133 | .eeprom_data = aureon71_eeprom, | 2133 | .eeprom_data = aureon71_eeprom, |
2134 | .driver = "Aureon71Universe", | 2134 | .driver = "Aureon71Univ", /* keep in 15 letters */ |
2135 | }, | 2135 | }, |
2136 | { | 2136 | { |
2137 | .subvendor = VT1724_SUBDEVICE_PRODIGY71, | 2137 | .subvendor = VT1724_SUBDEVICE_PRODIGY71, |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 89a06dec4365..bf20858d9f19 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -106,7 +106,7 @@ module_param_array(dxr_enable, int, NULL, 0444); | |||
106 | MODULE_PARM_DESC(dxr_enable, "Enable DXR support for Terratec DMX6FIRE."); | 106 | MODULE_PARM_DESC(dxr_enable, "Enable DXR support for Terratec DMX6FIRE."); |
107 | 107 | ||
108 | 108 | ||
109 | static struct pci_device_id snd_ice1712_ids[] __devinitdata = { | 109 | static struct pci_device_id snd_ice1712_ids[] = { |
110 | { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICE1712 */ | 110 | { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICE1712 */ |
111 | { 0, } | 111 | { 0, } |
112 | }; | 112 | }; |
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index ad69ed7c1b81..71d6aedc0749 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -86,7 +86,7 @@ MODULE_PARM_DESC(model, "Use the given board model."); | |||
86 | 86 | ||
87 | 87 | ||
88 | /* Both VT1720 and VT1724 have the same PCI IDs */ | 88 | /* Both VT1720 and VT1724 have the same PCI IDs */ |
89 | static struct pci_device_id snd_vt1724_ids[] __devinitdata = { | 89 | static struct pci_device_id snd_vt1724_ids[] = { |
90 | { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_VT1724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 90 | { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_VT1724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
91 | { 0, } | 91 | { 0, } |
92 | }; | 92 | }; |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 5634bc349257..6874263f1681 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -413,7 +413,7 @@ struct intel8x0 { | |||
413 | u32 int_sta_mask; /* interrupt status mask */ | 413 | u32 int_sta_mask; /* interrupt status mask */ |
414 | }; | 414 | }; |
415 | 415 | ||
416 | static struct pci_device_id snd_intel8x0_ids[] __devinitdata = { | 416 | static struct pci_device_id snd_intel8x0_ids[] = { |
417 | { 0x8086, 0x2415, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ | 417 | { 0x8086, 0x2415, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ |
418 | { 0x8086, 0x2425, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ | 418 | { 0x8086, 0x2425, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ |
419 | { 0x8086, 0x2445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ | 419 | { 0x8086, 0x2445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ |
@@ -1956,6 +1956,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { | |||
1956 | .type = AC97_TUNE_HP_ONLY | 1956 | .type = AC97_TUNE_HP_ONLY |
1957 | }, | 1957 | }, |
1958 | { | 1958 | { |
1959 | .subvendor = 0x10f1, | ||
1960 | .subdevice = 0x2895, | ||
1961 | .name = "Tyan Thunder K8WE", | ||
1962 | .type = AC97_TUNE_HP_ONLY | ||
1963 | }, | ||
1964 | { | ||
1959 | .subvendor = 0x110a, | 1965 | .subvendor = 0x110a, |
1960 | .subdevice = 0x0056, | 1966 | .subdevice = 0x0056, |
1961 | .name = "Fujitsu-Siemens Scenic", /* AD1981? */ | 1967 | .name = "Fujitsu-Siemens Scenic", /* AD1981? */ |
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index f28e273ae276..91850281f89b 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c | |||
@@ -224,7 +224,7 @@ struct intel8x0m { | |||
224 | unsigned int pcm_pos_shift; | 224 | unsigned int pcm_pos_shift; |
225 | }; | 225 | }; |
226 | 226 | ||
227 | static struct pci_device_id snd_intel8x0m_ids[] __devinitdata = { | 227 | static struct pci_device_id snd_intel8x0m_ids[] = { |
228 | { 0x8086, 0x2416, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ | 228 | { 0x8086, 0x2416, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ |
229 | { 0x8086, 0x2426, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ | 229 | { 0x8086, 0x2426, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ |
230 | { 0x8086, 0x2446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ | 230 | { 0x8086, 0x2446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ |
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 2b4ce002794a..cfea51f44784 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c | |||
@@ -424,7 +424,7 @@ module_param_array(enable, bool, NULL, 0444); | |||
424 | MODULE_PARM_DESC(enable, "Enable Korg 1212 soundcard."); | 424 | MODULE_PARM_DESC(enable, "Enable Korg 1212 soundcard."); |
425 | MODULE_AUTHOR("Haroldo Gamal <gamal@alternex.com.br>"); | 425 | MODULE_AUTHOR("Haroldo Gamal <gamal@alternex.com.br>"); |
426 | 426 | ||
427 | static struct pci_device_id snd_korg1212_ids[] __devinitdata = { | 427 | static struct pci_device_id snd_korg1212_ids[] = { |
428 | { | 428 | { |
429 | .vendor = 0x10b5, | 429 | .vendor = 0x10b5, |
430 | .device = 0x906d, | 430 | .device = 0x906d, |
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index 828eab59253a..45214b3b81be 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c | |||
@@ -869,7 +869,7 @@ struct snd_m3 { | |||
869 | /* | 869 | /* |
870 | * pci ids | 870 | * pci ids |
871 | */ | 871 | */ |
872 | static struct pci_device_id snd_m3_ids[] __devinitdata = { | 872 | static struct pci_device_id snd_m3_ids[] = { |
873 | {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO_1, PCI_ANY_ID, PCI_ANY_ID, | 873 | {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO_1, PCI_ANY_ID, PCI_ANY_ID, |
874 | PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, | 874 | PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, |
875 | {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO, PCI_ANY_ID, PCI_ANY_ID, | 875 | {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO, PCI_ANY_ID, PCI_ANY_ID, |
@@ -2137,7 +2137,7 @@ static int __devinit snd_m3_mixer(struct snd_m3 *chip) | |||
2137 | * DSP Code images | 2137 | * DSP Code images |
2138 | */ | 2138 | */ |
2139 | 2139 | ||
2140 | static const u16 assp_kernel_image[] __devinitdata = { | 2140 | static const u16 assp_kernel_image[] = { |
2141 | 0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4, | 2141 | 0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4, |
2142 | 0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, | 2142 | 0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, |
2143 | 0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, | 2143 | 0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, |
@@ -2224,7 +2224,7 @@ static const u16 assp_kernel_image[] __devinitdata = { | |||
2224 | * Mini sample rate converter code image | 2224 | * Mini sample rate converter code image |
2225 | * that is to be loaded at 0x400 on the DSP. | 2225 | * that is to be loaded at 0x400 on the DSP. |
2226 | */ | 2226 | */ |
2227 | static const u16 assp_minisrc_image[] __devinitdata = { | 2227 | static const u16 assp_minisrc_image[] = { |
2228 | 2228 | ||
2229 | 0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412, | 2229 | 0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412, |
2230 | 0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41, | 2230 | 0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41, |
@@ -2267,12 +2267,12 @@ static const u16 assp_minisrc_image[] __devinitdata = { | |||
2267 | */ | 2267 | */ |
2268 | 2268 | ||
2269 | #define MINISRC_LPF_LEN 10 | 2269 | #define MINISRC_LPF_LEN 10 |
2270 | static const u16 minisrc_lpf[MINISRC_LPF_LEN] __devinitdata = { | 2270 | static const u16 minisrc_lpf[MINISRC_LPF_LEN] = { |
2271 | 0X0743, 0X1104, 0X0A4C, 0XF88D, 0X242C, | 2271 | 0X0743, 0X1104, 0X0A4C, 0XF88D, 0X242C, |
2272 | 0X1023, 0X1AA9, 0X0B60, 0XEFDD, 0X186F | 2272 | 0X1023, 0X1AA9, 0X0B60, 0XEFDD, 0X186F |
2273 | }; | 2273 | }; |
2274 | 2274 | ||
2275 | static void __devinit snd_m3_assp_init(struct snd_m3 *chip) | 2275 | static void snd_m3_assp_init(struct snd_m3 *chip) |
2276 | { | 2276 | { |
2277 | unsigned int i; | 2277 | unsigned int i; |
2278 | 2278 | ||
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index a4aaa7b9a231..cc43ecd67906 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -61,7 +61,7 @@ MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard."); | |||
61 | /* | 61 | /* |
62 | */ | 62 | */ |
63 | 63 | ||
64 | static struct pci_device_id snd_mixart_ids[] __devinitdata = { | 64 | static struct pci_device_id snd_mixart_ids[] = { |
65 | { 0x1057, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* MC8240 */ | 65 | { 0x1057, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* MC8240 */ |
66 | { 0, } | 66 | { 0, } |
67 | }; | 67 | }; |
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index 56d7282e6651..101eee0aa018 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c | |||
@@ -263,7 +263,7 @@ struct nm256 { | |||
263 | /* | 263 | /* |
264 | * PCI ids | 264 | * PCI ids |
265 | */ | 265 | */ |
266 | static struct pci_device_id snd_nm256_ids[] __devinitdata = { | 266 | static struct pci_device_id snd_nm256_ids[] = { |
267 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 267 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
268 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 268 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
269 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 269 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index ae980e11827f..533c672ae8f3 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c | |||
@@ -73,7 +73,7 @@ enum { | |||
73 | PCI_ID_LAST | 73 | PCI_ID_LAST |
74 | }; | 74 | }; |
75 | 75 | ||
76 | static struct pci_device_id pcxhr_ids[] __devinitdata = { | 76 | static struct pci_device_id pcxhr_ids[] = { |
77 | { 0x10b5, 0x9656, 0x1369, 0xb001, 0, 0, PCI_ID_VX882HR, }, /* VX882HR */ | 77 | { 0x10b5, 0x9656, 0x1369, 0xb001, 0, 0, PCI_ID_VX882HR, }, /* VX882HR */ |
78 | { 0x10b5, 0x9656, 0x1369, 0xb101, 0, 0, PCI_ID_PCX882HR, }, /* PCX882HR */ | 78 | { 0x10b5, 0x9656, 0x1369, 0xb101, 0, 0, PCI_ID_PCX882HR, }, /* PCX882HR */ |
79 | { 0x10b5, 0x9656, 0x1369, 0xb201, 0, 0, PCI_ID_VX881HR, }, /* VX881HR */ | 79 | { 0x10b5, 0x9656, 0x1369, 0xb201, 0, 0, PCI_ID_VX881HR, }, /* VX881HR */ |
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index 5501a08ca23a..f435fcd6dca9 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c | |||
@@ -506,7 +506,7 @@ static int riptide_reset(struct cmdif *cif, struct snd_riptide *chip); | |||
506 | /* | 506 | /* |
507 | */ | 507 | */ |
508 | 508 | ||
509 | static struct pci_device_id snd_riptide_ids[] __devinitdata = { | 509 | static struct pci_device_id snd_riptide_ids[] = { |
510 | { | 510 | { |
511 | .vendor = 0x127a,.device = 0x4310, | 511 | .vendor = 0x127a,.device = 0x4310, |
512 | .subvendor = PCI_ANY_ID,.subdevice = PCI_ANY_ID, | 512 | .subvendor = PCI_ANY_ID,.subdevice = PCI_ANY_ID, |
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index 2e24b68d07aa..2a71499242fa 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c | |||
@@ -227,7 +227,7 @@ struct rme32 { | |||
227 | struct snd_kcontrol *spdif_ctl; | 227 | struct snd_kcontrol *spdif_ctl; |
228 | }; | 228 | }; |
229 | 229 | ||
230 | static struct pci_device_id snd_rme32_ids[] __devinitdata = { | 230 | static struct pci_device_id snd_rme32_ids[] = { |
231 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32, | 231 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32, |
232 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, | 232 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, |
233 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8, | 233 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8, |
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index fde0f3e20530..f8de7c997017 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c | |||
@@ -232,7 +232,7 @@ struct rme96 { | |||
232 | struct snd_kcontrol *spdif_ctl; | 232 | struct snd_kcontrol *spdif_ctl; |
233 | }; | 233 | }; |
234 | 234 | ||
235 | static struct pci_device_id snd_rme96_ids[] __devinitdata = { | 235 | static struct pci_device_id snd_rme96_ids[] = { |
236 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96, | 236 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96, |
237 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 237 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, |
238 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8, | 238 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8, |
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index 99cf86244acb..e5a52da77b85 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -568,7 +568,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d | |||
568 | } | 568 | } |
569 | 569 | ||
570 | 570 | ||
571 | static struct pci_device_id snd_hdsp_ids[] __devinitdata = { | 571 | static struct pci_device_id snd_hdsp_ids[] = { |
572 | { | 572 | { |
573 | .vendor = PCI_VENDOR_ID_XILINX, | 573 | .vendor = PCI_VENDOR_ID_XILINX, |
574 | .device = PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP, | 574 | .device = PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP, |
@@ -1356,7 +1356,7 @@ static struct snd_rawmidi_ops snd_hdsp_midi_input = | |||
1356 | .trigger = snd_hdsp_midi_input_trigger, | 1356 | .trigger = snd_hdsp_midi_input_trigger, |
1357 | }; | 1357 | }; |
1358 | 1358 | ||
1359 | static int __devinit snd_hdsp_create_midi (struct snd_card *card, struct hdsp *hdsp, int id) | 1359 | static int snd_hdsp_create_midi (struct snd_card *card, struct hdsp *hdsp, int id) |
1360 | { | 1360 | { |
1361 | char buf[32]; | 1361 | char buf[32]; |
1362 | 1362 | ||
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index 9534e1834138..fc15f61ad5d1 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c | |||
@@ -315,7 +315,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d | |||
315 | } | 315 | } |
316 | 316 | ||
317 | 317 | ||
318 | static struct pci_device_id snd_rme9652_ids[] __devinitdata = { | 318 | static struct pci_device_id snd_rme9652_ids[] = { |
319 | { | 319 | { |
320 | .vendor = 0x10ee, | 320 | .vendor = 0x10ee, |
321 | .device = 0x3fc4, | 321 | .device = 0x3fc4, |
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index c4303418668b..e5d4def1aa6f 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c | |||
@@ -243,7 +243,7 @@ struct sonicvibes { | |||
243 | #endif | 243 | #endif |
244 | }; | 244 | }; |
245 | 245 | ||
246 | static struct pci_device_id snd_sonic_ids[] __devinitdata = { | 246 | static struct pci_device_id snd_sonic_ids[] = { |
247 | { 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 247 | { 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, |
248 | { 0, } | 248 | { 0, } |
249 | }; | 249 | }; |
diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c index 5629b7eba96d..9145f7c57fb0 100644 --- a/sound/pci/trident/trident.c +++ b/sound/pci/trident/trident.c | |||
@@ -63,7 +63,7 @@ MODULE_PARM_DESC(pcm_channels, "Number of hardware channels assigned for PCM."); | |||
63 | module_param_array(wavetable_size, int, NULL, 0444); | 63 | module_param_array(wavetable_size, int, NULL, 0444); |
64 | MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); | 64 | MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); |
65 | 65 | ||
66 | static struct pci_device_id snd_trident_ids[] __devinitdata = { | 66 | static struct pci_device_id snd_trident_ids[] = { |
67 | {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), | 67 | {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), |
68 | PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, | 68 | PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, |
69 | {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX), | 69 | {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX), |
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 37bd5eb7a380..08da9234efb3 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -396,7 +396,7 @@ struct via82xx { | |||
396 | #endif | 396 | #endif |
397 | }; | 397 | }; |
398 | 398 | ||
399 | static struct pci_device_id snd_via82xx_ids[] __devinitdata = { | 399 | static struct pci_device_id snd_via82xx_ids[] = { |
400 | /* 0x1106, 0x3058 */ | 400 | /* 0x1106, 0x3058 */ |
401 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA686, }, /* 686A */ | 401 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA686, }, /* 686A */ |
402 | /* 0x1106, 0x3059 */ | 402 | /* 0x1106, 0x3059 */ |
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c index c1ede6c2a6d4..016f9dac253f 100644 --- a/sound/pci/via82xx_modem.c +++ b/sound/pci/via82xx_modem.c | |||
@@ -261,7 +261,7 @@ struct via82xx_modem { | |||
261 | struct snd_info_entry *proc_entry; | 261 | struct snd_info_entry *proc_entry; |
262 | }; | 262 | }; |
263 | 263 | ||
264 | static struct pci_device_id snd_via82xx_modem_ids[] __devinitdata = { | 264 | static struct pci_device_id snd_via82xx_modem_ids[] = { |
265 | { 0x1106, 0x3068, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA82XX_MODEM, }, | 265 | { 0x1106, 0x3068, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA82XX_MODEM, }, |
266 | { 0, } | 266 | { 0, } |
267 | }; | 267 | }; |
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index 7deda25f7adc..9c03c6b4e490 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c | |||
@@ -60,7 +60,7 @@ enum { | |||
60 | VX_PCI_VX222_NEW | 60 | VX_PCI_VX222_NEW |
61 | }; | 61 | }; |
62 | 62 | ||
63 | static struct pci_device_id snd_vx222_ids[] __devinitdata = { | 63 | static struct pci_device_id snd_vx222_ids[] = { |
64 | { 0x10b5, 0x9050, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_OLD, }, /* PLX */ | 64 | { 0x10b5, 0x9050, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_OLD, }, /* PLX */ |
65 | { 0x10b5, 0x9030, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_NEW, }, /* PLX */ | 65 | { 0x10b5, 0x9030, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_NEW, }, /* PLX */ |
66 | { 0, } | 66 | { 0, } |
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c index 26aa775b7b69..186453f7abe7 100644 --- a/sound/pci/ymfpci/ymfpci.c +++ b/sound/pci/ymfpci/ymfpci.c | |||
@@ -70,7 +70,7 @@ MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch"); | |||
70 | module_param_array(rear_swap, bool, NULL, 0444); | 70 | module_param_array(rear_swap, bool, NULL, 0444); |
71 | MODULE_PARM_DESC(rear_swap, "Swap rear channels (must be enabled for correct IEC958 (S/PDIF)) output"); | 71 | MODULE_PARM_DESC(rear_swap, "Swap rear channels (must be enabled for correct IEC958 (S/PDIF)) output"); |
72 | 72 | ||
73 | static struct pci_device_id snd_ymfpci_ids[] __devinitdata = { | 73 | static struct pci_device_id snd_ymfpci_ids[] = { |
74 | { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724 */ | 74 | { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724 */ |
75 | { 0x1073, 0x000d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724F */ | 75 | { 0x1073, 0x000d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724F */ |
76 | { 0x1073, 0x000a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF740 */ | 76 | { 0x1073, 0x000a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF740 */ |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index adfdce7499d1..1c09e5f49da8 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c | |||
@@ -241,12 +241,13 @@ static int pdacf_config(struct pcmcia_device *link) | |||
241 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, parse)); | 241 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, parse)); |
242 | link->conf.ConfigBase = parse->config.base; | 242 | link->conf.ConfigBase = parse->config.base; |
243 | link->conf.ConfigIndex = 0x5; | 243 | link->conf.ConfigIndex = 0x5; |
244 | kfree(parse); | ||
245 | 244 | ||
246 | CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); | 245 | CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); |
247 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); | 246 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); |
248 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); | 247 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); |
249 | 248 | ||
249 | kfree(parse); | ||
250 | |||
250 | if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0) | 251 | if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0) |
251 | goto failed; | 252 | goto failed; |
252 | 253 | ||
@@ -254,6 +255,7 @@ static int pdacf_config(struct pcmcia_device *link) | |||
254 | return 0; | 255 | return 0; |
255 | 256 | ||
256 | cs_failed: | 257 | cs_failed: |
258 | kfree(parse); | ||
257 | cs_error(link, last_fn, last_ret); | 259 | cs_error(link, last_fn, last_ret); |
258 | failed: | 260 | failed: |
259 | pcmcia_disable_device(link); | 261 | pcmcia_disable_device(link); |