diff options
80 files changed, 529 insertions, 307 deletions
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index a92bba816843..16dfe57f1731 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -74,7 +74,8 @@ CMI9880 | |||
74 | 74 | ||
75 | AD1882 / AD1882A | 75 | AD1882 / AD1882A |
76 | ================ | 76 | ================ |
77 | 3stack 3-stack mode (default) | 77 | 3stack 3-stack mode |
78 | 3stack-automute 3-stack with automute front HP (default) | ||
78 | 6stack 6-stack mode | 79 | 6stack 6-stack mode |
79 | 80 | ||
80 | AD1884A / AD1883 / AD1984A / AD1984B | 81 | AD1884A / AD1883 / AD1984A / AD1984B |
diff --git a/include/sound/ad1816a.h b/include/sound/ad1816a.h index d010858c33c2..2a89f0d71440 100644 --- a/include/sound/ad1816a.h +++ b/include/sound/ad1816a.h | |||
@@ -147,6 +147,9 @@ struct snd_ad1816a { | |||
147 | unsigned int c_dma_size; | 147 | unsigned int c_dma_size; |
148 | 148 | ||
149 | struct snd_timer *timer; | 149 | struct snd_timer *timer; |
150 | #ifdef CONFIG_PM | ||
151 | unsigned short image[48]; | ||
152 | #endif | ||
150 | }; | 153 | }; |
151 | 154 | ||
152 | 155 | ||
@@ -165,11 +168,15 @@ struct snd_ad1816a { | |||
165 | 168 | ||
166 | extern int snd_ad1816a_create(struct snd_card *card, unsigned long port, | 169 | extern int snd_ad1816a_create(struct snd_card *card, unsigned long port, |
167 | int irq, int dma1, int dma2, | 170 | int irq, int dma1, int dma2, |
168 | struct snd_ad1816a **chip); | 171 | struct snd_ad1816a *chip); |
169 | 172 | ||
170 | extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm); | 173 | extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm); |
171 | extern int snd_ad1816a_mixer(struct snd_ad1816a *chip); | 174 | extern int snd_ad1816a_mixer(struct snd_ad1816a *chip); |
172 | extern int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, | 175 | extern int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, |
173 | struct snd_timer **rtimer); | 176 | struct snd_timer **rtimer); |
177 | #ifdef CONFIG_PM | ||
178 | extern void snd_ad1816a_suspend(struct snd_ad1816a *chip); | ||
179 | extern void snd_ad1816a_resume(struct snd_ad1816a *chip); | ||
180 | #endif | ||
174 | 181 | ||
175 | #endif /* __SOUND_AD1816A_H */ | 182 | #endif /* __SOUND_AD1816A_H */ |
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 4f865df42f0f..1a33f48ebe78 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h | |||
@@ -1788,7 +1788,7 @@ struct snd_emu10k1 { | |||
1788 | unsigned int efx_voices_mask[2]; | 1788 | unsigned int efx_voices_mask[2]; |
1789 | unsigned int next_free_voice; | 1789 | unsigned int next_free_voice; |
1790 | 1790 | ||
1791 | #ifdef CONFIG_PM | 1791 | #ifdef CONFIG_PM_SLEEP |
1792 | unsigned int *saved_ptr; | 1792 | unsigned int *saved_ptr; |
1793 | unsigned int *saved_gpr; | 1793 | unsigned int *saved_gpr; |
1794 | unsigned int *tram_val_saved; | 1794 | unsigned int *tram_val_saved; |
@@ -1856,7 +1856,7 @@ unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg); | |||
1856 | void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data); | 1856 | void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data); |
1857 | unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate); | 1857 | unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate); |
1858 | 1858 | ||
1859 | #ifdef CONFIG_PM | 1859 | #ifdef CONFIG_PM_SLEEP |
1860 | void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu); | 1860 | void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu); |
1861 | void snd_emu10k1_resume_init(struct snd_emu10k1 *emu); | 1861 | void snd_emu10k1_resume_init(struct snd_emu10k1 *emu); |
1862 | void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu); | 1862 | void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu); |
diff --git a/include/sound/initval.h b/include/sound/initval.h index f99a0d2ddfe7..ac62c67e6f42 100644 --- a/include/sound/initval.h +++ b/include/sound/initval.h | |||
@@ -50,6 +50,20 @@ | |||
50 | #define SNDRV_DEFAULT_DMA_SIZE { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA_SIZE } | 50 | #define SNDRV_DEFAULT_DMA_SIZE { [0 ... (SNDRV_CARDS-1)] = SNDRV_AUTO_DMA_SIZE } |
51 | #define SNDRV_DEFAULT_PTR SNDRV_DEFAULT_STR | 51 | #define SNDRV_DEFAULT_PTR SNDRV_DEFAULT_STR |
52 | 52 | ||
53 | #ifdef SNDRV_LEGACY_FIND_FREE_IOPORT | ||
54 | static long snd_legacy_find_free_ioport(long *port_table, long size) | ||
55 | { | ||
56 | while (*port_table != -1) { | ||
57 | if (request_region(*port_table, size, "ALSA test")) { | ||
58 | release_region(*port_table, size); | ||
59 | return *port_table; | ||
60 | } | ||
61 | port_table++; | ||
62 | } | ||
63 | return -1; | ||
64 | } | ||
65 | #endif | ||
66 | |||
53 | #ifdef SNDRV_LEGACY_FIND_FREE_IRQ | 67 | #ifdef SNDRV_LEGACY_FIND_FREE_IRQ |
54 | #include <linux/interrupt.h> | 68 | #include <linux/interrupt.h> |
55 | 69 | ||
diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c index 5cf8d65ed5ef..60e8fc1b3440 100644 --- a/sound/core/seq/seq_device.c +++ b/sound/core/seq/seq_device.c | |||
@@ -569,5 +569,7 @@ EXPORT_SYMBOL(snd_seq_device_load_drivers); | |||
569 | EXPORT_SYMBOL(snd_seq_device_new); | 569 | EXPORT_SYMBOL(snd_seq_device_new); |
570 | EXPORT_SYMBOL(snd_seq_device_register_driver); | 570 | EXPORT_SYMBOL(snd_seq_device_register_driver); |
571 | EXPORT_SYMBOL(snd_seq_device_unregister_driver); | 571 | EXPORT_SYMBOL(snd_seq_device_unregister_driver); |
572 | #ifdef CONFIG_MODULES | ||
572 | EXPORT_SYMBOL(snd_seq_autoload_lock); | 573 | EXPORT_SYMBOL(snd_seq_autoload_lock); |
573 | EXPORT_SYMBOL(snd_seq_autoload_unlock); | 574 | EXPORT_SYMBOL(snd_seq_autoload_unlock); |
575 | #endif | ||
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c index 94b83b6e46a3..2c2f829c3fd7 100644 --- a/sound/isa/ad1816a/ad1816a.c +++ b/sound/isa/ad1816a/ad1816a.c | |||
@@ -63,11 +63,6 @@ MODULE_PARM_DESC(enable, "Enable ad1816a based soundcard."); | |||
63 | module_param_array(clockfreq, int, NULL, 0444); | 63 | module_param_array(clockfreq, int, NULL, 0444); |
64 | MODULE_PARM_DESC(clockfreq, "Clock frequency for ad1816a driver (default = 0)."); | 64 | MODULE_PARM_DESC(clockfreq, "Clock frequency for ad1816a driver (default = 0)."); |
65 | 65 | ||
66 | struct snd_card_ad1816a { | ||
67 | struct pnp_dev *dev; | ||
68 | struct pnp_dev *devmpu; | ||
69 | }; | ||
70 | |||
71 | static struct pnp_card_device_id snd_ad1816a_pnpids[] = { | 66 | static struct pnp_card_device_id snd_ad1816a_pnpids[] = { |
72 | /* Analog Devices AD1815 */ | 67 | /* Analog Devices AD1815 */ |
73 | { .id = "ADS7150", .devs = { { .id = "ADS7150" }, { .id = "ADS7151" } } }, | 68 | { .id = "ADS7150", .devs = { { .id = "ADS7150" }, { .id = "ADS7151" } } }, |
@@ -99,25 +94,16 @@ MODULE_DEVICE_TABLE(pnp_card, snd_ad1816a_pnpids); | |||
99 | #define DRIVER_NAME "snd-card-ad1816a" | 94 | #define DRIVER_NAME "snd-card-ad1816a" |
100 | 95 | ||
101 | 96 | ||
102 | static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acard, | 97 | static int __devinit snd_card_ad1816a_pnp(int dev, struct pnp_card_link *card, |
103 | struct pnp_card_link *card, | ||
104 | const struct pnp_card_device_id *id) | 98 | const struct pnp_card_device_id *id) |
105 | { | 99 | { |
106 | struct pnp_dev *pdev; | 100 | struct pnp_dev *pdev; |
107 | int err; | 101 | int err; |
108 | 102 | ||
109 | acard->dev = pnp_request_card_device(card, id->devs[0].id, NULL); | 103 | pdev = pnp_request_card_device(card, id->devs[0].id, NULL); |
110 | if (acard->dev == NULL) | 104 | if (pdev == NULL) |
111 | return -EBUSY; | 105 | return -EBUSY; |
112 | 106 | ||
113 | acard->devmpu = pnp_request_card_device(card, id->devs[1].id, NULL); | ||
114 | if (acard->devmpu == NULL) { | ||
115 | mpu_port[dev] = -1; | ||
116 | snd_printk(KERN_WARNING PFX "MPU401 device busy, skipping.\n"); | ||
117 | } | ||
118 | |||
119 | pdev = acard->dev; | ||
120 | |||
121 | err = pnp_activate_dev(pdev); | 107 | err = pnp_activate_dev(pdev); |
122 | if (err < 0) { | 108 | if (err < 0) { |
123 | printk(KERN_ERR PFX "AUDIO PnP configure failure\n"); | 109 | printk(KERN_ERR PFX "AUDIO PnP configure failure\n"); |
@@ -130,16 +116,17 @@ static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acar | |||
130 | dma2[dev] = pnp_dma(pdev, 1); | 116 | dma2[dev] = pnp_dma(pdev, 1); |
131 | irq[dev] = pnp_irq(pdev, 0); | 117 | irq[dev] = pnp_irq(pdev, 0); |
132 | 118 | ||
133 | if (acard->devmpu == NULL) | 119 | pdev = pnp_request_card_device(card, id->devs[1].id, NULL); |
120 | if (pdev == NULL) { | ||
121 | mpu_port[dev] = -1; | ||
122 | snd_printk(KERN_WARNING PFX "MPU401 device busy, skipping.\n"); | ||
134 | return 0; | 123 | return 0; |
135 | 124 | } | |
136 | pdev = acard->devmpu; | ||
137 | 125 | ||
138 | err = pnp_activate_dev(pdev); | 126 | err = pnp_activate_dev(pdev); |
139 | if (err < 0) { | 127 | if (err < 0) { |
140 | printk(KERN_ERR PFX "MPU401 PnP configure failure\n"); | 128 | printk(KERN_ERR PFX "MPU401 PnP configure failure\n"); |
141 | mpu_port[dev] = -1; | 129 | mpu_port[dev] = -1; |
142 | acard->devmpu = NULL; | ||
143 | } else { | 130 | } else { |
144 | mpu_port[dev] = pnp_port_start(pdev, 0); | 131 | mpu_port[dev] = pnp_port_start(pdev, 0); |
145 | mpu_irq[dev] = pnp_irq(pdev, 0); | 132 | mpu_irq[dev] = pnp_irq(pdev, 0); |
@@ -153,18 +140,17 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard | |||
153 | { | 140 | { |
154 | int error; | 141 | int error; |
155 | struct snd_card *card; | 142 | struct snd_card *card; |
156 | struct snd_card_ad1816a *acard; | ||
157 | struct snd_ad1816a *chip; | 143 | struct snd_ad1816a *chip; |
158 | struct snd_opl3 *opl3; | 144 | struct snd_opl3 *opl3; |
159 | struct snd_timer *timer; | 145 | struct snd_timer *timer; |
160 | 146 | ||
161 | error = snd_card_create(index[dev], id[dev], THIS_MODULE, | 147 | error = snd_card_create(index[dev], id[dev], THIS_MODULE, |
162 | sizeof(struct snd_card_ad1816a), &card); | 148 | sizeof(struct snd_ad1816a), &card); |
163 | if (error < 0) | 149 | if (error < 0) |
164 | return error; | 150 | return error; |
165 | acard = card->private_data; | 151 | chip = card->private_data; |
166 | 152 | ||
167 | if ((error = snd_card_ad1816a_pnp(dev, acard, pcard, pid))) { | 153 | if ((error = snd_card_ad1816a_pnp(dev, pcard, pid))) { |
168 | snd_card_free(card); | 154 | snd_card_free(card); |
169 | return error; | 155 | return error; |
170 | } | 156 | } |
@@ -174,7 +160,7 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard | |||
174 | irq[dev], | 160 | irq[dev], |
175 | dma1[dev], | 161 | dma1[dev], |
176 | dma2[dev], | 162 | dma2[dev], |
177 | &chip)) < 0) { | 163 | chip)) < 0) { |
178 | snd_card_free(card); | 164 | snd_card_free(card); |
179 | return error; | 165 | return error; |
180 | } | 166 | } |
@@ -258,13 +244,37 @@ static void __devexit snd_ad1816a_pnp_remove(struct pnp_card_link * pcard) | |||
258 | pnp_set_card_drvdata(pcard, NULL); | 244 | pnp_set_card_drvdata(pcard, NULL); |
259 | } | 245 | } |
260 | 246 | ||
247 | #ifdef CONFIG_PM | ||
248 | static int snd_ad1816a_pnp_suspend(struct pnp_card_link *pcard, | ||
249 | pm_message_t state) | ||
250 | { | ||
251 | struct snd_card *card = pnp_get_card_drvdata(pcard); | ||
252 | |||
253 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | ||
254 | snd_ad1816a_suspend(card->private_data); | ||
255 | return 0; | ||
256 | } | ||
257 | |||
258 | static int snd_ad1816a_pnp_resume(struct pnp_card_link *pcard) | ||
259 | { | ||
260 | struct snd_card *card = pnp_get_card_drvdata(pcard); | ||
261 | |||
262 | snd_ad1816a_resume(card->private_data); | ||
263 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | ||
264 | return 0; | ||
265 | } | ||
266 | #endif | ||
267 | |||
261 | static struct pnp_card_driver ad1816a_pnpc_driver = { | 268 | static struct pnp_card_driver ad1816a_pnpc_driver = { |
262 | .flags = PNP_DRIVER_RES_DISABLE, | 269 | .flags = PNP_DRIVER_RES_DISABLE, |
263 | .name = "ad1816a", | 270 | .name = "ad1816a", |
264 | .id_table = snd_ad1816a_pnpids, | 271 | .id_table = snd_ad1816a_pnpids, |
265 | .probe = snd_ad1816a_pnp_detect, | 272 | .probe = snd_ad1816a_pnp_detect, |
266 | .remove = __devexit_p(snd_ad1816a_pnp_remove), | 273 | .remove = __devexit_p(snd_ad1816a_pnp_remove), |
267 | /* FIXME: suspend/resume */ | 274 | #ifdef CONFIG_PM |
275 | .suspend = snd_ad1816a_pnp_suspend, | ||
276 | .resume = snd_ad1816a_pnp_resume, | ||
277 | #endif | ||
268 | }; | 278 | }; |
269 | 279 | ||
270 | static int __init alsa_card_ad1816a_init(void) | 280 | static int __init alsa_card_ad1816a_init(void) |
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c index 177eed3271bc..db64df6023e0 100644 --- a/sound/isa/ad1816a/ad1816a_lib.c +++ b/sound/isa/ad1816a/ad1816a_lib.c | |||
@@ -491,7 +491,7 @@ static int snd_ad1816a_capture_close(struct snd_pcm_substream *substream) | |||
491 | } | 491 | } |
492 | 492 | ||
493 | 493 | ||
494 | static void __devinit snd_ad1816a_init(struct snd_ad1816a *chip) | 494 | static void snd_ad1816a_init(struct snd_ad1816a *chip) |
495 | { | 495 | { |
496 | unsigned long flags; | 496 | unsigned long flags; |
497 | 497 | ||
@@ -511,6 +511,32 @@ static void __devinit snd_ad1816a_init(struct snd_ad1816a *chip) | |||
511 | spin_unlock_irqrestore(&chip->lock, flags); | 511 | spin_unlock_irqrestore(&chip->lock, flags); |
512 | } | 512 | } |
513 | 513 | ||
514 | #ifdef CONFIG_PM | ||
515 | void snd_ad1816a_suspend(struct snd_ad1816a *chip) | ||
516 | { | ||
517 | int reg; | ||
518 | unsigned long flags; | ||
519 | |||
520 | snd_pcm_suspend_all(chip->pcm); | ||
521 | spin_lock_irqsave(&chip->lock, flags); | ||
522 | for (reg = 0; reg < 48; reg++) | ||
523 | chip->image[reg] = snd_ad1816a_read(chip, reg); | ||
524 | spin_unlock_irqrestore(&chip->lock, flags); | ||
525 | } | ||
526 | |||
527 | void snd_ad1816a_resume(struct snd_ad1816a *chip) | ||
528 | { | ||
529 | int reg; | ||
530 | unsigned long flags; | ||
531 | |||
532 | snd_ad1816a_init(chip); | ||
533 | spin_lock_irqsave(&chip->lock, flags); | ||
534 | for (reg = 0; reg < 48; reg++) | ||
535 | snd_ad1816a_write(chip, reg, chip->image[reg]); | ||
536 | spin_unlock_irqrestore(&chip->lock, flags); | ||
537 | } | ||
538 | #endif | ||
539 | |||
514 | static int __devinit snd_ad1816a_probe(struct snd_ad1816a *chip) | 540 | static int __devinit snd_ad1816a_probe(struct snd_ad1816a *chip) |
515 | { | 541 | { |
516 | unsigned long flags; | 542 | unsigned long flags; |
@@ -548,7 +574,6 @@ static int snd_ad1816a_free(struct snd_ad1816a *chip) | |||
548 | snd_dma_disable(chip->dma2); | 574 | snd_dma_disable(chip->dma2); |
549 | free_dma(chip->dma2); | 575 | free_dma(chip->dma2); |
550 | } | 576 | } |
551 | kfree(chip); | ||
552 | return 0; | 577 | return 0; |
553 | } | 578 | } |
554 | 579 | ||
@@ -573,19 +598,13 @@ static const char __devinit *snd_ad1816a_chip_id(struct snd_ad1816a *chip) | |||
573 | 598 | ||
574 | int __devinit snd_ad1816a_create(struct snd_card *card, | 599 | int __devinit snd_ad1816a_create(struct snd_card *card, |
575 | unsigned long port, int irq, int dma1, int dma2, | 600 | unsigned long port, int irq, int dma1, int dma2, |
576 | struct snd_ad1816a **rchip) | 601 | struct snd_ad1816a *chip) |
577 | { | 602 | { |
578 | static struct snd_device_ops ops = { | 603 | static struct snd_device_ops ops = { |
579 | .dev_free = snd_ad1816a_dev_free, | 604 | .dev_free = snd_ad1816a_dev_free, |
580 | }; | 605 | }; |
581 | int error; | 606 | int error; |
582 | struct snd_ad1816a *chip; | ||
583 | |||
584 | *rchip = NULL; | ||
585 | 607 | ||
586 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | ||
587 | if (chip == NULL) | ||
588 | return -ENOMEM; | ||
589 | chip->irq = -1; | 608 | chip->irq = -1; |
590 | chip->dma1 = -1; | 609 | chip->dma1 = -1; |
591 | chip->dma2 = -1; | 610 | chip->dma2 = -1; |
@@ -631,7 +650,6 @@ int __devinit snd_ad1816a_create(struct snd_card *card, | |||
631 | return error; | 650 | return error; |
632 | } | 651 | } |
633 | 652 | ||
634 | *rchip = chip; | ||
635 | return 0; | 653 | return 0; |
636 | } | 654 | } |
637 | 655 | ||
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index a76bc8d27c1d..3fc8b66fd167 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
@@ -443,9 +443,8 @@ static void __devinit snd_interwave_detect_memory(struct snd_gus_card * gus) | |||
443 | for (i = 0; i < 8; ++i) | 443 | for (i = 0; i < 8; ++i) |
444 | iwave[i] = snd_gf1_peek(gus, bank_pos + i); | 444 | iwave[i] = snd_gf1_peek(gus, bank_pos + i); |
445 | #ifdef CONFIG_SND_DEBUG_ROM | 445 | #ifdef CONFIG_SND_DEBUG_ROM |
446 | printk(KERN_DEBUG "ROM at 0x%06x = %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", bank_pos, | 446 | printk(KERN_DEBUG "ROM at 0x%06x = %*phC\n", bank_pos, |
447 | iwave[0], iwave[1], iwave[2], iwave[3], | 447 | 8, iwave); |
448 | iwave[4], iwave[5], iwave[6], iwave[7]); | ||
449 | #endif | 448 | #endif |
450 | if (strncmp(iwave, "INTRWAVE", 8)) | 449 | if (strncmp(iwave, "INTRWAVE", 8)) |
451 | continue; /* first check */ | 450 | continue; /* first check */ |
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index c24594c866f4..3d1afb612b35 100644 --- a/sound/isa/opti9xx/miro.c +++ b/sound/isa/opti9xx/miro.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <sound/opl4.h> | 37 | #include <sound/opl4.h> |
38 | #include <sound/control.h> | 38 | #include <sound/control.h> |
39 | #include <sound/info.h> | 39 | #include <sound/info.h> |
40 | #define SNDRV_LEGACY_FIND_FREE_IOPORT | ||
40 | #define SNDRV_LEGACY_FIND_FREE_IRQ | 41 | #define SNDRV_LEGACY_FIND_FREE_IRQ |
41 | #define SNDRV_LEGACY_FIND_FREE_DMA | 42 | #define SNDRV_LEGACY_FIND_FREE_DMA |
42 | #include <sound/initval.h> | 43 | #include <sound/initval.h> |
@@ -770,20 +771,6 @@ static int __devinit snd_miro_mixer(struct snd_card *card, | |||
770 | return 0; | 771 | return 0; |
771 | } | 772 | } |
772 | 773 | ||
773 | static long snd_legacy_find_free_ioport(long *port_table, long size) | ||
774 | { | ||
775 | while (*port_table != -1) { | ||
776 | struct resource *res; | ||
777 | if ((res = request_region(*port_table, size, | ||
778 | "ALSA test")) != NULL) { | ||
779 | release_and_free_resource(res); | ||
780 | return *port_table; | ||
781 | } | ||
782 | port_table++; | ||
783 | } | ||
784 | return -1; | ||
785 | } | ||
786 | |||
787 | static int __devinit snd_miro_init(struct snd_miro *chip, | 774 | static int __devinit snd_miro_init(struct snd_miro *chip, |
788 | unsigned short hardware) | 775 | unsigned short hardware) |
789 | { | 776 | { |
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index f8fbe22515c9..2899c9fd1ceb 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #ifndef OPTi93X | 39 | #ifndef OPTi93X |
40 | #include <sound/opl4.h> | 40 | #include <sound/opl4.h> |
41 | #endif | 41 | #endif |
42 | #define SNDRV_LEGACY_FIND_FREE_IOPORT | ||
42 | #define SNDRV_LEGACY_FIND_FREE_IRQ | 43 | #define SNDRV_LEGACY_FIND_FREE_IRQ |
43 | #define SNDRV_LEGACY_FIND_FREE_DMA | 44 | #define SNDRV_LEGACY_FIND_FREE_DMA |
44 | #include <sound/initval.h> | 45 | #include <sound/initval.h> |
@@ -185,19 +186,6 @@ static char * snd_opti9xx_names[] = { | |||
185 | "82C930", "82C931", "82C933" | 186 | "82C930", "82C931", "82C933" |
186 | }; | 187 | }; |
187 | 188 | ||
188 | |||
189 | static long __devinit snd_legacy_find_free_ioport(long *port_table, long size) | ||
190 | { | ||
191 | while (*port_table != -1) { | ||
192 | if (request_region(*port_table, size, "ALSA test")) { | ||
193 | release_region(*port_table, size); | ||
194 | return *port_table; | ||
195 | } | ||
196 | port_table++; | ||
197 | } | ||
198 | return -1; | ||
199 | } | ||
200 | |||
201 | static int __devinit snd_opti9xx_init(struct snd_opti9xx *chip, | 189 | static int __devinit snd_opti9xx_init(struct snd_opti9xx *chip, |
202 | unsigned short hardware) | 190 | unsigned short hardware) |
203 | { | 191 | { |
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index ee895f3c8605..c7e3c533316e 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -270,7 +270,7 @@ struct snd_ali { | |||
270 | spinlock_t reg_lock; | 270 | spinlock_t reg_lock; |
271 | spinlock_t voice_alloc; | 271 | spinlock_t voice_alloc; |
272 | 272 | ||
273 | #ifdef CONFIG_PM | 273 | #ifdef CONFIG_PM_SLEEP |
274 | struct snd_ali_image *image; | 274 | struct snd_ali_image *image; |
275 | #endif | 275 | #endif |
276 | }; | 276 | }; |
@@ -1883,7 +1883,7 @@ static int __devinit snd_ali_mixer(struct snd_ali * codec) | |||
1883 | return 0; | 1883 | return 0; |
1884 | } | 1884 | } |
1885 | 1885 | ||
1886 | #ifdef CONFIG_PM | 1886 | #ifdef CONFIG_PM_SLEEP |
1887 | static int ali_suspend(struct device *dev) | 1887 | static int ali_suspend(struct device *dev) |
1888 | { | 1888 | { |
1889 | struct pci_dev *pci = to_pci_dev(dev); | 1889 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -1989,7 +1989,7 @@ static SIMPLE_DEV_PM_OPS(ali_pm, ali_suspend, ali_resume); | |||
1989 | #define ALI_PM_OPS &ali_pm | 1989 | #define ALI_PM_OPS &ali_pm |
1990 | #else | 1990 | #else |
1991 | #define ALI_PM_OPS NULL | 1991 | #define ALI_PM_OPS NULL |
1992 | #endif /* CONFIG_PM */ | 1992 | #endif /* CONFIG_PM_SLEEP */ |
1993 | 1993 | ||
1994 | static int snd_ali_free(struct snd_ali * codec) | 1994 | static int snd_ali_free(struct snd_ali * codec) |
1995 | { | 1995 | { |
@@ -2000,7 +2000,7 @@ static int snd_ali_free(struct snd_ali * codec) | |||
2000 | if (codec->port) | 2000 | if (codec->port) |
2001 | pci_release_regions(codec->pci); | 2001 | pci_release_regions(codec->pci); |
2002 | pci_disable_device(codec->pci); | 2002 | pci_disable_device(codec->pci); |
2003 | #ifdef CONFIG_PM | 2003 | #ifdef CONFIG_PM_SLEEP |
2004 | kfree(codec->image); | 2004 | kfree(codec->image); |
2005 | #endif | 2005 | #endif |
2006 | pci_dev_put(codec->pci_m1533); | 2006 | pci_dev_put(codec->pci_m1533); |
@@ -2232,7 +2232,7 @@ static int __devinit snd_ali_create(struct snd_card *card, | |||
2232 | return err; | 2232 | return err; |
2233 | } | 2233 | } |
2234 | 2234 | ||
2235 | #ifdef CONFIG_PM | 2235 | #ifdef CONFIG_PM_SLEEP |
2236 | codec->image = kmalloc(sizeof(*codec->image), GFP_KERNEL); | 2236 | codec->image = kmalloc(sizeof(*codec->image), GFP_KERNEL); |
2237 | if (!codec->image) | 2237 | if (!codec->image) |
2238 | snd_printk(KERN_WARNING "can't allocate apm buffer\n"); | 2238 | snd_printk(KERN_WARNING "can't allocate apm buffer\n"); |
diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 68c4469c6d19..00f157a2cf64 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c | |||
@@ -765,7 +765,7 @@ static int __devinit snd_als300_create(struct snd_card *card, | |||
765 | return 0; | 765 | return 0; |
766 | } | 766 | } |
767 | 767 | ||
768 | #ifdef CONFIG_PM | 768 | #ifdef CONFIG_PM_SLEEP |
769 | static int snd_als300_suspend(struct device *dev) | 769 | static int snd_als300_suspend(struct device *dev) |
770 | { | 770 | { |
771 | struct pci_dev *pci = to_pci_dev(dev); | 771 | struct pci_dev *pci = to_pci_dev(dev); |
diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c index 0eeca49c5754..feb2a1436830 100644 --- a/sound/pci/als4000.c +++ b/sound/pci/als4000.c | |||
@@ -987,7 +987,7 @@ static void __devexit snd_card_als4000_remove(struct pci_dev *pci) | |||
987 | pci_set_drvdata(pci, NULL); | 987 | pci_set_drvdata(pci, NULL); |
988 | } | 988 | } |
989 | 989 | ||
990 | #ifdef CONFIG_PM | 990 | #ifdef CONFIG_PM_SLEEP |
991 | static int snd_als4000_suspend(struct device *dev) | 991 | static int snd_als4000_suspend(struct device *dev) |
992 | { | 992 | { |
993 | struct pci_dev *pci = to_pci_dev(dev); | 993 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -1040,7 +1040,7 @@ static SIMPLE_DEV_PM_OPS(snd_als4000_pm, snd_als4000_suspend, snd_als4000_resume | |||
1040 | #define SND_ALS4000_PM_OPS &snd_als4000_pm | 1040 | #define SND_ALS4000_PM_OPS &snd_als4000_pm |
1041 | #else | 1041 | #else |
1042 | #define SND_ALS4000_PM_OPS NULL | 1042 | #define SND_ALS4000_PM_OPS NULL |
1043 | #endif /* CONFIG_PM */ | 1043 | #endif /* CONFIG_PM_SLEEP */ |
1044 | 1044 | ||
1045 | static struct pci_driver als4000_driver = { | 1045 | static struct pci_driver als4000_driver = { |
1046 | .name = KBUILD_MODNAME, | 1046 | .name = KBUILD_MODNAME, |
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index e8de831f98bc..a51e3ce3c800 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c | |||
@@ -2968,7 +2968,7 @@ static struct pci_driver driver = { | |||
2968 | .id_table = asihpi_pci_tbl, | 2968 | .id_table = asihpi_pci_tbl, |
2969 | .probe = snd_asihpi_probe, | 2969 | .probe = snd_asihpi_probe, |
2970 | .remove = __devexit_p(snd_asihpi_remove), | 2970 | .remove = __devexit_p(snd_asihpi_remove), |
2971 | #ifdef CONFIG_PM | 2971 | #ifdef CONFIG_PM_SLEEP |
2972 | /* .suspend = snd_asihpi_suspend, | 2972 | /* .suspend = snd_asihpi_suspend, |
2973 | .resume = snd_asihpi_resume, */ | 2973 | .resume = snd_asihpi_resume, */ |
2974 | #endif | 2974 | #endif |
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 31020d2a868b..c744df5bb1c6 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -535,7 +535,7 @@ static int snd_atiixp_aclink_reset(struct atiixp *chip) | |||
535 | return 0; | 535 | return 0; |
536 | } | 536 | } |
537 | 537 | ||
538 | #ifdef CONFIG_PM | 538 | #ifdef CONFIG_PM_SLEEP |
539 | static int snd_atiixp_aclink_down(struct atiixp *chip) | 539 | static int snd_atiixp_aclink_down(struct atiixp *chip) |
540 | { | 540 | { |
541 | // if (atiixp_read(chip, MODEM_MIRROR) & 0x1) /* modem running, too? */ | 541 | // if (atiixp_read(chip, MODEM_MIRROR) & 0x1) /* modem running, too? */ |
@@ -1458,7 +1458,7 @@ static int __devinit snd_atiixp_mixer_new(struct atiixp *chip, int clock, | |||
1458 | } | 1458 | } |
1459 | 1459 | ||
1460 | 1460 | ||
1461 | #ifdef CONFIG_PM | 1461 | #ifdef CONFIG_PM_SLEEP |
1462 | /* | 1462 | /* |
1463 | * power management | 1463 | * power management |
1464 | */ | 1464 | */ |
@@ -1533,7 +1533,7 @@ static SIMPLE_DEV_PM_OPS(snd_atiixp_pm, snd_atiixp_suspend, snd_atiixp_resume); | |||
1533 | #define SND_ATIIXP_PM_OPS &snd_atiixp_pm | 1533 | #define SND_ATIIXP_PM_OPS &snd_atiixp_pm |
1534 | #else | 1534 | #else |
1535 | #define SND_ATIIXP_PM_OPS NULL | 1535 | #define SND_ATIIXP_PM_OPS NULL |
1536 | #endif /* CONFIG_PM */ | 1536 | #endif /* CONFIG_PM_SLEEP */ |
1537 | 1537 | ||
1538 | 1538 | ||
1539 | #ifdef CONFIG_PROC_FS | 1539 | #ifdef CONFIG_PROC_FS |
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 79e204ec623f..6fc03d9f2cff 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -511,7 +511,7 @@ static int snd_atiixp_aclink_reset(struct atiixp_modem *chip) | |||
511 | return 0; | 511 | return 0; |
512 | } | 512 | } |
513 | 513 | ||
514 | #ifdef CONFIG_PM | 514 | #ifdef CONFIG_PM_SLEEP |
515 | static int snd_atiixp_aclink_down(struct atiixp_modem *chip) | 515 | static int snd_atiixp_aclink_down(struct atiixp_modem *chip) |
516 | { | 516 | { |
517 | // if (atiixp_read(chip, MODEM_MIRROR) & 0x1) /* modem running, too? */ | 517 | // if (atiixp_read(chip, MODEM_MIRROR) & 0x1) /* modem running, too? */ |
@@ -1113,7 +1113,7 @@ static int __devinit snd_atiixp_mixer_new(struct atiixp_modem *chip, int clock) | |||
1113 | } | 1113 | } |
1114 | 1114 | ||
1115 | 1115 | ||
1116 | #ifdef CONFIG_PM | 1116 | #ifdef CONFIG_PM_SLEEP |
1117 | /* | 1117 | /* |
1118 | * power management | 1118 | * power management |
1119 | */ | 1119 | */ |
@@ -1169,7 +1169,7 @@ static SIMPLE_DEV_PM_OPS(snd_atiixp_pm, snd_atiixp_suspend, snd_atiixp_resume); | |||
1169 | #define SND_ATIIXP_PM_OPS &snd_atiixp_pm | 1169 | #define SND_ATIIXP_PM_OPS &snd_atiixp_pm |
1170 | #else | 1170 | #else |
1171 | #define SND_ATIIXP_PM_OPS NULL | 1171 | #define SND_ATIIXP_PM_OPS NULL |
1172 | #endif /* CONFIG_PM */ | 1172 | #endif /* CONFIG_PM_SLEEP */ |
1173 | 1173 | ||
1174 | #ifdef CONFIG_PROC_FS | 1174 | #ifdef CONFIG_PROC_FS |
1175 | /* | 1175 | /* |
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 4dddd871548b..c03b66b784a3 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
@@ -365,7 +365,7 @@ struct snd_azf3328 { | |||
365 | * CONFIG_PM register storage below, but that's slightly difficult. */ | 365 | * CONFIG_PM register storage below, but that's slightly difficult. */ |
366 | u16 shadow_reg_ctrl_6AH; | 366 | u16 shadow_reg_ctrl_6AH; |
367 | 367 | ||
368 | #ifdef CONFIG_PM | 368 | #ifdef CONFIG_PM_SLEEP |
369 | /* register value containers for power management | 369 | /* register value containers for power management |
370 | * Note: not always full I/O range preserved (similar to Win driver!) */ | 370 | * Note: not always full I/O range preserved (similar to Win driver!) */ |
371 | u32 saved_regs_ctrl[AZF_ALIGN(AZF_IO_SIZE_CTRL_PM) / 4]; | 371 | u32 saved_regs_ctrl[AZF_ALIGN(AZF_IO_SIZE_CTRL_PM) / 4]; |
@@ -2729,7 +2729,7 @@ snd_azf3328_remove(struct pci_dev *pci) | |||
2729 | snd_azf3328_dbgcallleave(); | 2729 | snd_azf3328_dbgcallleave(); |
2730 | } | 2730 | } |
2731 | 2731 | ||
2732 | #ifdef CONFIG_PM | 2732 | #ifdef CONFIG_PM_SLEEP |
2733 | static inline void | 2733 | static inline void |
2734 | snd_azf3328_suspend_regs(unsigned long io_addr, unsigned count, u32 *saved_regs) | 2734 | snd_azf3328_suspend_regs(unsigned long io_addr, unsigned count, u32 *saved_regs) |
2735 | { | 2735 | { |
@@ -2866,7 +2866,7 @@ static SIMPLE_DEV_PM_OPS(snd_azf3328_pm, snd_azf3328_suspend, snd_azf3328_resume | |||
2866 | #define SND_AZF3328_PM_OPS &snd_azf3328_pm | 2866 | #define SND_AZF3328_PM_OPS &snd_azf3328_pm |
2867 | #else | 2867 | #else |
2868 | #define SND_AZF3328_PM_OPS NULL | 2868 | #define SND_AZF3328_PM_OPS NULL |
2869 | #endif /* CONFIG_PM */ | 2869 | #endif /* CONFIG_PM_SLEEP */ |
2870 | 2870 | ||
2871 | static struct pci_driver azf3328_driver = { | 2871 | static struct pci_driver azf3328_driver = { |
2872 | .name = KBUILD_MODNAME, | 2872 | .name = KBUILD_MODNAME, |
diff --git a/sound/pci/ca0106/ca0106.h b/sound/pci/ca0106/ca0106.h index e8e8ccc96403..04402c14cb23 100644 --- a/sound/pci/ca0106/ca0106.h +++ b/sound/pci/ca0106/ca0106.h | |||
@@ -710,7 +710,7 @@ struct snd_ca0106 { | |||
710 | 710 | ||
711 | u16 spi_dac_reg[16]; | 711 | u16 spi_dac_reg[16]; |
712 | 712 | ||
713 | #ifdef CONFIG_PM | 713 | #ifdef CONFIG_PM_SLEEP |
714 | #define NUM_SAVED_VOLUMES 9 | 714 | #define NUM_SAVED_VOLUMES 9 |
715 | unsigned int saved_vol[NUM_SAVED_VOLUMES]; | 715 | unsigned int saved_vol[NUM_SAVED_VOLUMES]; |
716 | #endif | 716 | #endif |
@@ -733,7 +733,7 @@ int snd_ca0106_i2c_write(struct snd_ca0106 *emu, u32 reg, u32 value); | |||
733 | int snd_ca0106_spi_write(struct snd_ca0106 * emu, | 733 | int snd_ca0106_spi_write(struct snd_ca0106 * emu, |
734 | unsigned int data); | 734 | unsigned int data); |
735 | 735 | ||
736 | #ifdef CONFIG_PM | 736 | #ifdef CONFIG_PM_SLEEP |
737 | void snd_ca0106_mixer_suspend(struct snd_ca0106 *chip); | 737 | void snd_ca0106_mixer_suspend(struct snd_ca0106 *chip); |
738 | void snd_ca0106_mixer_resume(struct snd_ca0106 *chip); | 738 | void snd_ca0106_mixer_resume(struct snd_ca0106 *chip); |
739 | #else | 739 | #else |
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 83277b747b36..fc6787699ba9 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -1871,7 +1871,7 @@ static void __devexit snd_ca0106_remove(struct pci_dev *pci) | |||
1871 | pci_set_drvdata(pci, NULL); | 1871 | pci_set_drvdata(pci, NULL); |
1872 | } | 1872 | } |
1873 | 1873 | ||
1874 | #ifdef CONFIG_PM | 1874 | #ifdef CONFIG_PM_SLEEP |
1875 | static int snd_ca0106_suspend(struct device *dev) | 1875 | static int snd_ca0106_suspend(struct device *dev) |
1876 | { | 1876 | { |
1877 | struct pci_dev *pci = to_pci_dev(dev); | 1877 | struct pci_dev *pci = to_pci_dev(dev); |
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index 84f3f92436b5..68eacf7002d6 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
@@ -907,7 +907,7 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu) | |||
907 | return 0; | 907 | return 0; |
908 | } | 908 | } |
909 | 909 | ||
910 | #ifdef CONFIG_PM | 910 | #ifdef CONFIG_PM_SLEEP |
911 | struct ca0106_vol_tbl { | 911 | struct ca0106_vol_tbl { |
912 | unsigned int channel_id; | 912 | unsigned int channel_id; |
913 | unsigned int reg; | 913 | unsigned int reg; |
@@ -953,4 +953,4 @@ void snd_ca0106_mixer_resume(struct snd_ca0106 *chip) | |||
953 | if (chip->details->i2c_adc) | 953 | if (chip->details->i2c_adc) |
954 | ca0106_set_capture_mic_line_in(chip); | 954 | ca0106_set_capture_mic_line_in(chip); |
955 | } | 955 | } |
956 | #endif /* CONFIG_PM */ | 956 | #endif /* CONFIG_PM_SLEEP */ |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index b7d6f2b886ef..7c25906b5f88 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -504,7 +504,7 @@ struct cmipci { | |||
504 | 504 | ||
505 | spinlock_t reg_lock; | 505 | spinlock_t reg_lock; |
506 | 506 | ||
507 | #ifdef CONFIG_PM | 507 | #ifdef CONFIG_PM_SLEEP |
508 | unsigned int saved_regs[0x20]; | 508 | unsigned int saved_regs[0x20]; |
509 | unsigned char saved_mixers[0x20]; | 509 | unsigned char saved_mixers[0x20]; |
510 | #endif | 510 | #endif |
@@ -3315,7 +3315,7 @@ static void __devexit snd_cmipci_remove(struct pci_dev *pci) | |||
3315 | } | 3315 | } |
3316 | 3316 | ||
3317 | 3317 | ||
3318 | #ifdef CONFIG_PM | 3318 | #ifdef CONFIG_PM_SLEEP |
3319 | /* | 3319 | /* |
3320 | * power management | 3320 | * power management |
3321 | */ | 3321 | */ |
@@ -3403,7 +3403,7 @@ static SIMPLE_DEV_PM_OPS(snd_cmipci_pm, snd_cmipci_suspend, snd_cmipci_resume); | |||
3403 | #define SND_CMIPCI_PM_OPS &snd_cmipci_pm | 3403 | #define SND_CMIPCI_PM_OPS &snd_cmipci_pm |
3404 | #else | 3404 | #else |
3405 | #define SND_CMIPCI_PM_OPS NULL | 3405 | #define SND_CMIPCI_PM_OPS NULL |
3406 | #endif /* CONFIG_PM */ | 3406 | #endif /* CONFIG_PM_SLEEP */ |
3407 | 3407 | ||
3408 | static struct pci_driver cmipci_driver = { | 3408 | static struct pci_driver cmipci_driver = { |
3409 | .name = KBUILD_MODNAME, | 3409 | .name = KBUILD_MODNAME, |
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index 45a8317085f4..8e86ec0031fc 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c | |||
@@ -486,7 +486,7 @@ struct cs4281 { | |||
486 | 486 | ||
487 | struct gameport *gameport; | 487 | struct gameport *gameport; |
488 | 488 | ||
489 | #ifdef CONFIG_PM | 489 | #ifdef CONFIG_PM_SLEEP |
490 | u32 suspend_regs[SUSPEND_REGISTERS]; | 490 | u32 suspend_regs[SUSPEND_REGISTERS]; |
491 | #endif | 491 | #endif |
492 | 492 | ||
@@ -1977,7 +1977,7 @@ static void __devexit snd_cs4281_remove(struct pci_dev *pci) | |||
1977 | /* | 1977 | /* |
1978 | * Power Management | 1978 | * Power Management |
1979 | */ | 1979 | */ |
1980 | #ifdef CONFIG_PM | 1980 | #ifdef CONFIG_PM_SLEEP |
1981 | 1981 | ||
1982 | static int saved_regs[SUSPEND_REGISTERS] = { | 1982 | static int saved_regs[SUSPEND_REGISTERS] = { |
1983 | BA0_JSCTL, | 1983 | BA0_JSCTL, |
@@ -2089,7 +2089,7 @@ static SIMPLE_DEV_PM_OPS(cs4281_pm, cs4281_suspend, cs4281_resume); | |||
2089 | #define CS4281_PM_OPS &cs4281_pm | 2089 | #define CS4281_PM_OPS &cs4281_pm |
2090 | #else | 2090 | #else |
2091 | #define CS4281_PM_OPS NULL | 2091 | #define CS4281_PM_OPS NULL |
2092 | #endif /* CONFIG_PM */ | 2092 | #endif /* CONFIG_PM_SLEEP */ |
2093 | 2093 | ||
2094 | static struct pci_driver cs4281_driver = { | 2094 | static struct pci_driver cs4281_driver = { |
2095 | .name = KBUILD_MODNAME, | 2095 | .name = KBUILD_MODNAME, |
diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c index 1e007c736a8b..575bed0836ff 100644 --- a/sound/pci/cs46xx/cs46xx.c +++ b/sound/pci/cs46xx/cs46xx.c | |||
@@ -166,7 +166,7 @@ static struct pci_driver cs46xx_driver = { | |||
166 | .id_table = snd_cs46xx_ids, | 166 | .id_table = snd_cs46xx_ids, |
167 | .probe = snd_card_cs46xx_probe, | 167 | .probe = snd_card_cs46xx_probe, |
168 | .remove = __devexit_p(snd_card_cs46xx_remove), | 168 | .remove = __devexit_p(snd_card_cs46xx_remove), |
169 | #ifdef CONFIG_PM | 169 | #ifdef CONFIG_PM_SLEEP |
170 | .driver = { | 170 | .driver = { |
171 | .pm = &snd_cs46xx_pm, | 171 | .pm = &snd_cs46xx_pm, |
172 | }, | 172 | }, |
diff --git a/sound/pci/cs46xx/cs46xx.h b/sound/pci/cs46xx/cs46xx.h index 29d8a8da1ba7..fc339ef0a0ae 100644 --- a/sound/pci/cs46xx/cs46xx.h +++ b/sound/pci/cs46xx/cs46xx.h | |||
@@ -1721,7 +1721,7 @@ struct snd_cs46xx { | |||
1721 | unsigned int play_ctl; | 1721 | unsigned int play_ctl; |
1722 | #endif | 1722 | #endif |
1723 | 1723 | ||
1724 | #ifdef CONFIG_PM | 1724 | #ifdef CONFIG_PM_SLEEP |
1725 | u32 *saved_regs; | 1725 | u32 *saved_regs; |
1726 | #endif | 1726 | #endif |
1727 | }; | 1727 | }; |
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index a71d1c14a0f6..a2bb8c91ebe6 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c | |||
@@ -2797,7 +2797,7 @@ static int snd_cs46xx_free(struct snd_cs46xx *chip) | |||
2797 | } | 2797 | } |
2798 | #endif | 2798 | #endif |
2799 | 2799 | ||
2800 | #ifdef CONFIG_PM | 2800 | #ifdef CONFIG_PM_SLEEP |
2801 | kfree(chip->saved_regs); | 2801 | kfree(chip->saved_regs); |
2802 | #endif | 2802 | #endif |
2803 | 2803 | ||
@@ -3590,7 +3590,7 @@ static struct cs_card_type __devinitdata cards[] = { | |||
3590 | /* | 3590 | /* |
3591 | * APM support | 3591 | * APM support |
3592 | */ | 3592 | */ |
3593 | #ifdef CONFIG_PM | 3593 | #ifdef CONFIG_PM_SLEEP |
3594 | static unsigned int saved_regs[] = { | 3594 | static unsigned int saved_regs[] = { |
3595 | BA0_ACOSV, | 3595 | BA0_ACOSV, |
3596 | /*BA0_ASER_FADDR,*/ | 3596 | /*BA0_ASER_FADDR,*/ |
@@ -3711,7 +3711,7 @@ static int snd_cs46xx_resume(struct device *dev) | |||
3711 | } | 3711 | } |
3712 | 3712 | ||
3713 | SIMPLE_DEV_PM_OPS(snd_cs46xx_pm, snd_cs46xx_suspend, snd_cs46xx_resume); | 3713 | SIMPLE_DEV_PM_OPS(snd_cs46xx_pm, snd_cs46xx_suspend, snd_cs46xx_resume); |
3714 | #endif /* CONFIG_PM */ | 3714 | #endif /* CONFIG_PM_SLEEP */ |
3715 | 3715 | ||
3716 | 3716 | ||
3717 | /* | 3717 | /* |
@@ -3868,7 +3868,7 @@ int __devinit snd_cs46xx_create(struct snd_card *card, | |||
3868 | 3868 | ||
3869 | snd_cs46xx_proc_init(card, chip); | 3869 | snd_cs46xx_proc_init(card, chip); |
3870 | 3870 | ||
3871 | #ifdef CONFIG_PM | 3871 | #ifdef CONFIG_PM_SLEEP |
3872 | chip->saved_regs = kmalloc(sizeof(*chip->saved_regs) * | 3872 | chip->saved_regs = kmalloc(sizeof(*chip->saved_regs) * |
3873 | ARRAY_SIZE(saved_regs), GFP_KERNEL); | 3873 | ARRAY_SIZE(saved_regs), GFP_KERNEL); |
3874 | if (!chip->saved_regs) { | 3874 | if (!chip->saved_regs) { |
diff --git a/sound/pci/cs46xx/cs46xx_lib.h b/sound/pci/cs46xx/cs46xx_lib.h index b5189495d58a..86f14620f817 100644 --- a/sound/pci/cs46xx/cs46xx_lib.h +++ b/sound/pci/cs46xx/cs46xx_lib.h | |||
@@ -90,7 +90,7 @@ static inline unsigned int snd_cs46xx_peekBA0(struct snd_cs46xx *chip, unsigned | |||
90 | struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip); | 90 | struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip); |
91 | void cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip); | 91 | void cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip); |
92 | int cs46xx_dsp_load_module (struct snd_cs46xx * chip, struct dsp_module_desc * module); | 92 | int cs46xx_dsp_load_module (struct snd_cs46xx * chip, struct dsp_module_desc * module); |
93 | #ifdef CONFIG_PM | 93 | #ifdef CONFIG_PM_SLEEP |
94 | int cs46xx_dsp_resume(struct snd_cs46xx * chip); | 94 | int cs46xx_dsp_resume(struct snd_cs46xx * chip); |
95 | #endif | 95 | #endif |
96 | struct dsp_symbol_entry *cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name, | 96 | struct dsp_symbol_entry *cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name, |
diff --git a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c index 56fec0bc0efb..1686b4f4c44f 100644 --- a/sound/pci/cs46xx/dsp_spos.c +++ b/sound/pci/cs46xx/dsp_spos.c | |||
@@ -287,7 +287,7 @@ void cs46xx_dsp_spos_destroy (struct snd_cs46xx * chip) | |||
287 | if (ins->scbs[i].deleted) continue; | 287 | if (ins->scbs[i].deleted) continue; |
288 | 288 | ||
289 | cs46xx_dsp_proc_free_scb_desc ( (ins->scbs + i) ); | 289 | cs46xx_dsp_proc_free_scb_desc ( (ins->scbs + i) ); |
290 | #ifdef CONFIG_PM | 290 | #ifdef CONFIG_PM_SLEEP |
291 | kfree(ins->scbs[i].data); | 291 | kfree(ins->scbs[i].data); |
292 | #endif | 292 | #endif |
293 | } | 293 | } |
@@ -1019,7 +1019,7 @@ cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32 | |||
1019 | { | 1019 | { |
1020 | struct dsp_scb_descriptor * desc; | 1020 | struct dsp_scb_descriptor * desc; |
1021 | 1021 | ||
1022 | #ifdef CONFIG_PM | 1022 | #ifdef CONFIG_PM_SLEEP |
1023 | /* copy the data for resume */ | 1023 | /* copy the data for resume */ |
1024 | scb_data = kmemdup(scb_data, SCB_BYTES, GFP_KERNEL); | 1024 | scb_data = kmemdup(scb_data, SCB_BYTES, GFP_KERNEL); |
1025 | if (!scb_data) | 1025 | if (!scb_data) |
@@ -1032,7 +1032,7 @@ cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32 | |||
1032 | _dsp_create_scb(chip,scb_data,dest); | 1032 | _dsp_create_scb(chip,scb_data,dest); |
1033 | } else { | 1033 | } else { |
1034 | snd_printk(KERN_ERR "dsp_spos: failed to map SCB\n"); | 1034 | snd_printk(KERN_ERR "dsp_spos: failed to map SCB\n"); |
1035 | #ifdef CONFIG_PM | 1035 | #ifdef CONFIG_PM_SLEEP |
1036 | kfree(scb_data); | 1036 | kfree(scb_data); |
1037 | #endif | 1037 | #endif |
1038 | } | 1038 | } |
@@ -1937,7 +1937,7 @@ int cs46xx_dsp_set_iec958_volume (struct snd_cs46xx * chip, u16 left, u16 right) | |||
1937 | return 0; | 1937 | return 0; |
1938 | } | 1938 | } |
1939 | 1939 | ||
1940 | #ifdef CONFIG_PM | 1940 | #ifdef CONFIG_PM_SLEEP |
1941 | int cs46xx_dsp_resume(struct snd_cs46xx * chip) | 1941 | int cs46xx_dsp_resume(struct snd_cs46xx * chip) |
1942 | { | 1942 | { |
1943 | struct dsp_spos_instance * ins = chip->dsp_spos_instance; | 1943 | struct dsp_spos_instance * ins = chip->dsp_spos_instance; |
diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c index c2c695b07f8c..409e8764fbeb 100644 --- a/sound/pci/cs46xx/dsp_spos_scb_lib.c +++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c | |||
@@ -203,7 +203,7 @@ void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * | |||
203 | remove_symbol (chip,scb->scb_symbol); | 203 | remove_symbol (chip,scb->scb_symbol); |
204 | 204 | ||
205 | ins->scbs[scb->index].deleted = 1; | 205 | ins->scbs[scb->index].deleted = 1; |
206 | #ifdef CONFIG_PM | 206 | #ifdef CONFIG_PM_SLEEP |
207 | kfree(ins->scbs[scb->index].data); | 207 | kfree(ins->scbs[scb->index].data); |
208 | ins->scbs[scb->index].data = NULL; | 208 | ins->scbs[scb->index].data = NULL; |
209 | #endif | 209 | #endif |
diff --git a/sound/pci/cs5535audio/Makefile b/sound/pci/cs5535audio/Makefile index ccc642269b9e..a8f75f8dfda9 100644 --- a/sound/pci/cs5535audio/Makefile +++ b/sound/pci/cs5535audio/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | snd-cs5535audio-y := cs5535audio.o cs5535audio_pcm.o | 5 | snd-cs5535audio-y := cs5535audio.o cs5535audio_pcm.o |
6 | snd-cs5535audio-$(CONFIG_PM) += cs5535audio_pm.o | 6 | snd-cs5535audio-$(CONFIG_PM_SLEEP) += cs5535audio_pm.o |
7 | snd-cs5535audio-$(CONFIG_OLPC) += cs5535audio_olpc.o | 7 | snd-cs5535audio-$(CONFIG_OLPC) += cs5535audio_olpc.o |
8 | 8 | ||
9 | # Toplevel Module Dependency | 9 | # Toplevel Module Dependency |
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index 51f64ba5facf..4915efa551fc 100644 --- a/sound/pci/cs5535audio/cs5535audio.c +++ b/sound/pci/cs5535audio/cs5535audio.c | |||
@@ -399,7 +399,7 @@ static struct pci_driver cs5535audio_driver = { | |||
399 | .id_table = snd_cs5535audio_ids, | 399 | .id_table = snd_cs5535audio_ids, |
400 | .probe = snd_cs5535audio_probe, | 400 | .probe = snd_cs5535audio_probe, |
401 | .remove = __devexit_p(snd_cs5535audio_remove), | 401 | .remove = __devexit_p(snd_cs5535audio_remove), |
402 | #ifdef CONFIG_PM | 402 | #ifdef CONFIG_PM_SLEEP |
403 | .driver = { | 403 | .driver = { |
404 | .pm = &snd_cs5535audio_pm, | 404 | .pm = &snd_cs5535audio_pm, |
405 | }, | 405 | }, |
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index 2f6e9c762d3f..a2f997a9977a 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c | |||
@@ -1536,7 +1536,7 @@ static void atc_connect_resources(struct ct_atc *atc) | |||
1536 | } | 1536 | } |
1537 | } | 1537 | } |
1538 | 1538 | ||
1539 | #ifdef CONFIG_PM | 1539 | #ifdef CONFIG_PM_SLEEP |
1540 | static int atc_suspend(struct ct_atc *atc) | 1540 | static int atc_suspend(struct ct_atc *atc) |
1541 | { | 1541 | { |
1542 | int i; | 1542 | int i; |
@@ -1647,7 +1647,7 @@ static struct ct_atc atc_preset __devinitdata = { | |||
1647 | .output_switch_put = atc_output_switch_put, | 1647 | .output_switch_put = atc_output_switch_put, |
1648 | .mic_source_switch_get = atc_mic_source_switch_get, | 1648 | .mic_source_switch_get = atc_mic_source_switch_get, |
1649 | .mic_source_switch_put = atc_mic_source_switch_put, | 1649 | .mic_source_switch_put = atc_mic_source_switch_put, |
1650 | #ifdef CONFIG_PM | 1650 | #ifdef CONFIG_PM_SLEEP |
1651 | .suspend = atc_suspend, | 1651 | .suspend = atc_suspend, |
1652 | .resume = atc_resume, | 1652 | .resume = atc_resume, |
1653 | #endif | 1653 | #endif |
diff --git a/sound/pci/ctxfi/ctatc.h b/sound/pci/ctxfi/ctatc.h index 653e813ad142..69b51f9d345e 100644 --- a/sound/pci/ctxfi/ctatc.h +++ b/sound/pci/ctxfi/ctatc.h | |||
@@ -143,7 +143,7 @@ struct ct_atc { | |||
143 | 143 | ||
144 | struct ct_timer *timer; | 144 | struct ct_timer *timer; |
145 | 145 | ||
146 | #ifdef CONFIG_PM | 146 | #ifdef CONFIG_PM_SLEEP |
147 | int (*suspend)(struct ct_atc *atc); | 147 | int (*suspend)(struct ct_atc *atc); |
148 | int (*resume)(struct ct_atc *atc); | 148 | int (*resume)(struct ct_atc *atc); |
149 | #define NUM_PCMS (NUM_CTALSADEVS - 1) | 149 | #define NUM_PCMS (NUM_CTALSADEVS - 1) |
diff --git a/sound/pci/ctxfi/cthardware.h b/sound/pci/ctxfi/cthardware.h index c56fe533b3f3..5977e9a24b5c 100644 --- a/sound/pci/ctxfi/cthardware.h +++ b/sound/pci/ctxfi/cthardware.h | |||
@@ -72,7 +72,7 @@ struct hw { | |||
72 | int (*card_init)(struct hw *hw, struct card_conf *info); | 72 | int (*card_init)(struct hw *hw, struct card_conf *info); |
73 | int (*card_stop)(struct hw *hw); | 73 | int (*card_stop)(struct hw *hw); |
74 | int (*pll_init)(struct hw *hw, unsigned int rsr); | 74 | int (*pll_init)(struct hw *hw, unsigned int rsr); |
75 | #ifdef CONFIG_PM | 75 | #ifdef CONFIG_PM_SLEEP |
76 | int (*suspend)(struct hw *hw); | 76 | int (*suspend)(struct hw *hw); |
77 | int (*resume)(struct hw *hw, struct card_conf *info); | 77 | int (*resume)(struct hw *hw, struct card_conf *info); |
78 | #endif | 78 | #endif |
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c index dc1969bc67d4..4507f7088b24 100644 --- a/sound/pci/ctxfi/cthw20k1.c +++ b/sound/pci/ctxfi/cthw20k1.c | |||
@@ -2085,7 +2085,7 @@ static int hw_card_init(struct hw *hw, struct card_conf *info) | |||
2085 | return 0; | 2085 | return 0; |
2086 | } | 2086 | } |
2087 | 2087 | ||
2088 | #ifdef CONFIG_PM | 2088 | #ifdef CONFIG_PM_SLEEP |
2089 | static int hw_suspend(struct hw *hw) | 2089 | static int hw_suspend(struct hw *hw) |
2090 | { | 2090 | { |
2091 | struct pci_dev *pci = hw->pci; | 2091 | struct pci_dev *pci = hw->pci; |
@@ -2180,7 +2180,7 @@ static struct hw ct20k1_preset __devinitdata = { | |||
2180 | .is_adc_source_selected = hw_is_adc_input_selected, | 2180 | .is_adc_source_selected = hw_is_adc_input_selected, |
2181 | .select_adc_source = hw_adc_input_select, | 2181 | .select_adc_source = hw_adc_input_select, |
2182 | .capabilities = hw_capabilities, | 2182 | .capabilities = hw_capabilities, |
2183 | #ifdef CONFIG_PM | 2183 | #ifdef CONFIG_PM_SLEEP |
2184 | .suspend = hw_suspend, | 2184 | .suspend = hw_suspend, |
2185 | .resume = hw_resume, | 2185 | .resume = hw_resume, |
2186 | #endif | 2186 | #endif |
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c index 9d1231dc4ae2..b9c9349058bc 100644 --- a/sound/pci/ctxfi/cthw20k2.c +++ b/sound/pci/ctxfi/cthw20k2.c | |||
@@ -2201,7 +2201,7 @@ static int hw_card_init(struct hw *hw, struct card_conf *info) | |||
2201 | return 0; | 2201 | return 0; |
2202 | } | 2202 | } |
2203 | 2203 | ||
2204 | #ifdef CONFIG_PM | 2204 | #ifdef CONFIG_PM_SLEEP |
2205 | static int hw_suspend(struct hw *hw) | 2205 | static int hw_suspend(struct hw *hw) |
2206 | { | 2206 | { |
2207 | struct pci_dev *pci = hw->pci; | 2207 | struct pci_dev *pci = hw->pci; |
@@ -2250,7 +2250,7 @@ static struct hw ct20k2_preset __devinitdata = { | |||
2250 | .output_switch_put = hw_output_switch_put, | 2250 | .output_switch_put = hw_output_switch_put, |
2251 | .mic_source_switch_get = hw_mic_source_switch_get, | 2251 | .mic_source_switch_get = hw_mic_source_switch_get, |
2252 | .mic_source_switch_put = hw_mic_source_switch_put, | 2252 | .mic_source_switch_put = hw_mic_source_switch_put, |
2253 | #ifdef CONFIG_PM | 2253 | #ifdef CONFIG_PM_SLEEP |
2254 | .suspend = hw_suspend, | 2254 | .suspend = hw_suspend, |
2255 | .resume = hw_resume, | 2255 | .resume = hw_resume, |
2256 | #endif | 2256 | #endif |
diff --git a/sound/pci/ctxfi/ctmixer.c b/sound/pci/ctxfi/ctmixer.c index 0cc13eeef8da..48fe0e39c2be 100644 --- a/sound/pci/ctxfi/ctmixer.c +++ b/sound/pci/ctxfi/ctmixer.c | |||
@@ -1118,7 +1118,7 @@ mixer_set_input_right(struct ct_mixer *mixer, | |||
1118 | return 0; | 1118 | return 0; |
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | #ifdef CONFIG_PM | 1121 | #ifdef CONFIG_PM_SLEEP |
1122 | static int mixer_resume(struct ct_mixer *mixer) | 1122 | static int mixer_resume(struct ct_mixer *mixer) |
1123 | { | 1123 | { |
1124 | int i, state; | 1124 | int i, state; |
@@ -1188,7 +1188,7 @@ int ct_mixer_create(struct ct_atc *atc, struct ct_mixer **rmixer) | |||
1188 | mixer->get_output_ports = mixer_get_output_ports; | 1188 | mixer->get_output_ports = mixer_get_output_ports; |
1189 | mixer->set_input_left = mixer_set_input_left; | 1189 | mixer->set_input_left = mixer_set_input_left; |
1190 | mixer->set_input_right = mixer_set_input_right; | 1190 | mixer->set_input_right = mixer_set_input_right; |
1191 | #ifdef CONFIG_PM | 1191 | #ifdef CONFIG_PM_SLEEP |
1192 | mixer->resume = mixer_resume; | 1192 | mixer->resume = mixer_resume; |
1193 | #endif | 1193 | #endif |
1194 | 1194 | ||
diff --git a/sound/pci/ctxfi/ctmixer.h b/sound/pci/ctxfi/ctmixer.h index b009e989e77d..be881c639fee 100644 --- a/sound/pci/ctxfi/ctmixer.h +++ b/sound/pci/ctxfi/ctmixer.h | |||
@@ -56,7 +56,7 @@ struct ct_mixer { | |||
56 | enum MIXER_PORT_T type, struct rsc *rsc); | 56 | enum MIXER_PORT_T type, struct rsc *rsc); |
57 | int (*set_input_right)(struct ct_mixer *mixer, | 57 | int (*set_input_right)(struct ct_mixer *mixer, |
58 | enum MIXER_PORT_T type, struct rsc *rsc); | 58 | enum MIXER_PORT_T type, struct rsc *rsc); |
59 | #ifdef CONFIG_PM | 59 | #ifdef CONFIG_PM_SLEEP |
60 | int (*resume)(struct ct_mixer *mixer); | 60 | int (*resume)(struct ct_mixer *mixer); |
61 | #endif | 61 | #endif |
62 | }; | 62 | }; |
diff --git a/sound/pci/ctxfi/ctpcm.c b/sound/pci/ctxfi/ctpcm.c index 2c8622617c8c..d021876901bb 100644 --- a/sound/pci/ctxfi/ctpcm.c +++ b/sound/pci/ctxfi/ctpcm.c | |||
@@ -427,7 +427,7 @@ int ct_alsa_pcm_create(struct ct_atc *atc, | |||
427 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, | 427 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, |
428 | snd_dma_pci_data(atc->pci), 128*1024, 128*1024); | 428 | snd_dma_pci_data(atc->pci), 128*1024, 128*1024); |
429 | 429 | ||
430 | #ifdef CONFIG_PM | 430 | #ifdef CONFIG_PM_SLEEP |
431 | atc->pcms[device] = pcm; | 431 | atc->pcms[device] = pcm; |
432 | #endif | 432 | #endif |
433 | 433 | ||
diff --git a/sound/pci/ctxfi/xfi.c b/sound/pci/ctxfi/xfi.c index e002183ef8b2..07c07d752fd8 100644 --- a/sound/pci/ctxfi/xfi.c +++ b/sound/pci/ctxfi/xfi.c | |||
@@ -125,7 +125,7 @@ static void __devexit ct_card_remove(struct pci_dev *pci) | |||
125 | pci_set_drvdata(pci, NULL); | 125 | pci_set_drvdata(pci, NULL); |
126 | } | 126 | } |
127 | 127 | ||
128 | #ifdef CONFIG_PM | 128 | #ifdef CONFIG_PM_SLEEP |
129 | static int ct_card_suspend(struct device *dev) | 129 | static int ct_card_suspend(struct device *dev) |
130 | { | 130 | { |
131 | struct snd_card *card = dev_get_drvdata(dev); | 131 | struct snd_card *card = dev_get_drvdata(dev); |
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index 0ff754f180d0..abb0b86c41c9 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c | |||
@@ -46,7 +46,7 @@ static int get_firmware(const struct firmware **fw_entry, | |||
46 | int err; | 46 | int err; |
47 | char name[30]; | 47 | char name[30]; |
48 | 48 | ||
49 | #ifdef CONFIG_PM | 49 | #ifdef CONFIG_PM_SLEEP |
50 | if (chip->fw_cache[fw_index]) { | 50 | if (chip->fw_cache[fw_index]) { |
51 | DE_ACT(("firmware requested: %s is cached\n", card_fw[fw_index].data)); | 51 | DE_ACT(("firmware requested: %s is cached\n", card_fw[fw_index].data)); |
52 | *fw_entry = chip->fw_cache[fw_index]; | 52 | *fw_entry = chip->fw_cache[fw_index]; |
@@ -59,7 +59,7 @@ static int get_firmware(const struct firmware **fw_entry, | |||
59 | err = request_firmware(fw_entry, name, pci_device(chip)); | 59 | err = request_firmware(fw_entry, name, pci_device(chip)); |
60 | if (err < 0) | 60 | if (err < 0) |
61 | snd_printk(KERN_ERR "get_firmware(): Firmware not available (%d)\n", err); | 61 | snd_printk(KERN_ERR "get_firmware(): Firmware not available (%d)\n", err); |
62 | #ifdef CONFIG_PM | 62 | #ifdef CONFIG_PM_SLEEP |
63 | else | 63 | else |
64 | chip->fw_cache[fw_index] = *fw_entry; | 64 | chip->fw_cache[fw_index] = *fw_entry; |
65 | #endif | 65 | #endif |
@@ -70,7 +70,7 @@ static int get_firmware(const struct firmware **fw_entry, | |||
70 | 70 | ||
71 | static void free_firmware(const struct firmware *fw_entry) | 71 | static void free_firmware(const struct firmware *fw_entry) |
72 | { | 72 | { |
73 | #ifdef CONFIG_PM | 73 | #ifdef CONFIG_PM_SLEEP |
74 | DE_ACT(("firmware not released (kept in cache)\n")); | 74 | DE_ACT(("firmware not released (kept in cache)\n")); |
75 | #else | 75 | #else |
76 | release_firmware(fw_entry); | 76 | release_firmware(fw_entry); |
@@ -82,7 +82,7 @@ static void free_firmware(const struct firmware *fw_entry) | |||
82 | 82 | ||
83 | static void free_firmware_cache(struct echoaudio *chip) | 83 | static void free_firmware_cache(struct echoaudio *chip) |
84 | { | 84 | { |
85 | #ifdef CONFIG_PM | 85 | #ifdef CONFIG_PM_SLEEP |
86 | int i; | 86 | int i; |
87 | 87 | ||
88 | for (i = 0; i < 8 ; i++) | 88 | for (i = 0; i < 8 ; i++) |
@@ -2203,7 +2203,7 @@ ctl_error: | |||
2203 | 2203 | ||
2204 | 2204 | ||
2205 | 2205 | ||
2206 | #if defined(CONFIG_PM) | 2206 | #if defined(CONFIG_PM_SLEEP) |
2207 | 2207 | ||
2208 | static int snd_echo_suspend(struct device *dev) | 2208 | static int snd_echo_suspend(struct device *dev) |
2209 | { | 2209 | { |
@@ -2313,7 +2313,7 @@ static SIMPLE_DEV_PM_OPS(snd_echo_pm, snd_echo_suspend, snd_echo_resume); | |||
2313 | #define SND_ECHO_PM_OPS &snd_echo_pm | 2313 | #define SND_ECHO_PM_OPS &snd_echo_pm |
2314 | #else | 2314 | #else |
2315 | #define SND_ECHO_PM_OPS NULL | 2315 | #define SND_ECHO_PM_OPS NULL |
2316 | #endif /* CONFIG_PM */ | 2316 | #endif /* CONFIG_PM_SLEEP */ |
2317 | 2317 | ||
2318 | 2318 | ||
2319 | static void __devexit snd_echo_remove(struct pci_dev *pci) | 2319 | static void __devexit snd_echo_remove(struct pci_dev *pci) |
diff --git a/sound/pci/echoaudio/echoaudio.h b/sound/pci/echoaudio/echoaudio.h index 1df974dcb5f4..e158369f5faa 100644 --- a/sound/pci/echoaudio/echoaudio.h +++ b/sound/pci/echoaudio/echoaudio.h | |||
@@ -449,7 +449,7 @@ struct echoaudio { | |||
449 | volatile u32 __iomem *dsp_registers; /* DSP's register base */ | 449 | volatile u32 __iomem *dsp_registers; /* DSP's register base */ |
450 | u32 active_mask; /* Chs. active mask or | 450 | u32 active_mask; /* Chs. active mask or |
451 | * punks out */ | 451 | * punks out */ |
452 | #ifdef CONFIG_PM | 452 | #ifdef CONFIG_PM_SLEEP |
453 | const struct firmware *fw_cache[8]; /* Cached firmwares */ | 453 | const struct firmware *fw_cache[8]; /* Cached firmwares */ |
454 | #endif | 454 | #endif |
455 | 455 | ||
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c index ddac4e6d660d..b7c1875ba90e 100644 --- a/sound/pci/emu10k1/emu10k1.c +++ b/sound/pci/emu10k1/emu10k1.c | |||
@@ -206,7 +206,7 @@ static void __devexit snd_card_emu10k1_remove(struct pci_dev *pci) | |||
206 | } | 206 | } |
207 | 207 | ||
208 | 208 | ||
209 | #ifdef CONFIG_PM | 209 | #ifdef CONFIG_PM_SLEEP |
210 | static int snd_emu10k1_suspend(struct device *dev) | 210 | static int snd_emu10k1_suspend(struct device *dev) |
211 | { | 211 | { |
212 | struct pci_dev *pci = to_pci_dev(dev); | 212 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -268,7 +268,7 @@ static SIMPLE_DEV_PM_OPS(snd_emu10k1_pm, snd_emu10k1_suspend, snd_emu10k1_resume | |||
268 | #define SND_EMU10K1_PM_OPS &snd_emu10k1_pm | 268 | #define SND_EMU10K1_PM_OPS &snd_emu10k1_pm |
269 | #else | 269 | #else |
270 | #define SND_EMU10K1_PM_OPS NULL | 270 | #define SND_EMU10K1_PM_OPS NULL |
271 | #endif /* CONFIG_PM */ | 271 | #endif /* CONFIG_PM_SLEEP */ |
272 | 272 | ||
273 | static struct pci_driver emu10k1_driver = { | 273 | static struct pci_driver emu10k1_driver = { |
274 | .name = KBUILD_MODNAME, | 274 | .name = KBUILD_MODNAME, |
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 754924081d0a..bed4485f34f6 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -1241,7 +1241,7 @@ static int snd_emu10k1_emu1010_init(struct snd_emu10k1 *emu) | |||
1241 | * Create the EMU10K1 instance | 1241 | * Create the EMU10K1 instance |
1242 | */ | 1242 | */ |
1243 | 1243 | ||
1244 | #ifdef CONFIG_PM | 1244 | #ifdef CONFIG_PM_SLEEP |
1245 | static int alloc_pm_buffer(struct snd_emu10k1 *emu); | 1245 | static int alloc_pm_buffer(struct snd_emu10k1 *emu); |
1246 | static void free_pm_buffer(struct snd_emu10k1 *emu); | 1246 | static void free_pm_buffer(struct snd_emu10k1 *emu); |
1247 | #endif | 1247 | #endif |
@@ -1275,7 +1275,7 @@ static int snd_emu10k1_free(struct snd_emu10k1 *emu) | |||
1275 | snd_dma_free_pages(&emu->ptb_pages); | 1275 | snd_dma_free_pages(&emu->ptb_pages); |
1276 | vfree(emu->page_ptr_table); | 1276 | vfree(emu->page_ptr_table); |
1277 | vfree(emu->page_addr_table); | 1277 | vfree(emu->page_addr_table); |
1278 | #ifdef CONFIG_PM | 1278 | #ifdef CONFIG_PM_SLEEP |
1279 | free_pm_buffer(emu); | 1279 | free_pm_buffer(emu); |
1280 | #endif | 1280 | #endif |
1281 | if (emu->port) | 1281 | if (emu->port) |
@@ -1971,7 +1971,7 @@ int __devinit snd_emu10k1_create(struct snd_card *card, | |||
1971 | err = snd_emu10k1_init(emu, enable_ir, 0); | 1971 | err = snd_emu10k1_init(emu, enable_ir, 0); |
1972 | if (err < 0) | 1972 | if (err < 0) |
1973 | goto error; | 1973 | goto error; |
1974 | #ifdef CONFIG_PM | 1974 | #ifdef CONFIG_PM_SLEEP |
1975 | err = alloc_pm_buffer(emu); | 1975 | err = alloc_pm_buffer(emu); |
1976 | if (err < 0) | 1976 | if (err < 0) |
1977 | goto error; | 1977 | goto error; |
@@ -2000,7 +2000,7 @@ int __devinit snd_emu10k1_create(struct snd_card *card, | |||
2000 | return err; | 2000 | return err; |
2001 | } | 2001 | } |
2002 | 2002 | ||
2003 | #ifdef CONFIG_PM | 2003 | #ifdef CONFIG_PM_SLEEP |
2004 | static unsigned char saved_regs[] = { | 2004 | static unsigned char saved_regs[] = { |
2005 | CPF, PTRX, CVCF, VTFT, Z1, Z2, PSST, DSL, CCCA, CCR, CLP, | 2005 | CPF, PTRX, CVCF, VTFT, Z1, Z2, PSST, DSL, CCCA, CCR, CLP, |
2006 | FXRT, MAPA, MAPB, ENVVOL, ATKHLDV, DCYSUSV, LFOVAL1, ENVVAL, | 2006 | FXRT, MAPA, MAPB, ENVVOL, ATKHLDV, DCYSUSV, LFOVAL1, ENVVAL, |
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index dae4050ede5c..52419959178c 100644 --- a/sound/pci/emu10k1/emufx.c +++ b/sound/pci/emu10k1/emufx.c | |||
@@ -2646,7 +2646,7 @@ int __devinit snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct | |||
2646 | return 0; | 2646 | return 0; |
2647 | } | 2647 | } |
2648 | 2648 | ||
2649 | #ifdef CONFIG_PM | 2649 | #ifdef CONFIG_PM_SLEEP |
2650 | int __devinit snd_emu10k1_efx_alloc_pm_buffer(struct snd_emu10k1 *emu) | 2650 | int __devinit snd_emu10k1_efx_alloc_pm_buffer(struct snd_emu10k1 *emu) |
2651 | { | 2651 | { |
2652 | int len; | 2652 | int len; |
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c index a81dc44228ea..88cec6b7dd41 100644 --- a/sound/pci/emu10k1/p16v.c +++ b/sound/pci/emu10k1/p16v.c | |||
@@ -893,7 +893,7 @@ int __devinit snd_p16v_mixer(struct snd_emu10k1 *emu) | |||
893 | return 0; | 893 | return 0; |
894 | } | 894 | } |
895 | 895 | ||
896 | #ifdef CONFIG_PM | 896 | #ifdef CONFIG_PM_SLEEP |
897 | 897 | ||
898 | #define NUM_CHS 1 /* up to 4, but only first channel is used */ | 898 | #define NUM_CHS 1 /* up to 4, but only first channel is used */ |
899 | 899 | ||
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index f7e6f73186e1..2ba58d365959 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c | |||
@@ -2032,7 +2032,7 @@ static void snd_ensoniq_chip_init(struct ensoniq *ensoniq) | |||
2032 | synchronize_irq(ensoniq->irq); | 2032 | synchronize_irq(ensoniq->irq); |
2033 | } | 2033 | } |
2034 | 2034 | ||
2035 | #ifdef CONFIG_PM | 2035 | #ifdef CONFIG_PM_SLEEP |
2036 | static int snd_ensoniq_suspend(struct device *dev) | 2036 | static int snd_ensoniq_suspend(struct device *dev) |
2037 | { | 2037 | { |
2038 | struct pci_dev *pci = to_pci_dev(dev); | 2038 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -2094,7 +2094,7 @@ static SIMPLE_DEV_PM_OPS(snd_ensoniq_pm, snd_ensoniq_suspend, snd_ensoniq_resume | |||
2094 | #define SND_ENSONIQ_PM_OPS &snd_ensoniq_pm | 2094 | #define SND_ENSONIQ_PM_OPS &snd_ensoniq_pm |
2095 | #else | 2095 | #else |
2096 | #define SND_ENSONIQ_PM_OPS NULL | 2096 | #define SND_ENSONIQ_PM_OPS NULL |
2097 | #endif /* CONFIG_PM */ | 2097 | #endif /* CONFIG_PM_SLEEP */ |
2098 | 2098 | ||
2099 | static int __devinit snd_ensoniq_create(struct snd_card *card, | 2099 | static int __devinit snd_ensoniq_create(struct snd_card *card, |
2100 | struct pci_dev *pci, | 2100 | struct pci_dev *pci, |
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index dbb81807bc1a..394c5d413530 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c | |||
@@ -236,7 +236,7 @@ struct es1938 { | |||
236 | #ifdef SUPPORT_JOYSTICK | 236 | #ifdef SUPPORT_JOYSTICK |
237 | struct gameport *gameport; | 237 | struct gameport *gameport; |
238 | #endif | 238 | #endif |
239 | #ifdef CONFIG_PM | 239 | #ifdef CONFIG_PM_SLEEP |
240 | unsigned char saved_regs[SAVED_REG_SIZE]; | 240 | unsigned char saved_regs[SAVED_REG_SIZE]; |
241 | #endif | 241 | #endif |
242 | }; | 242 | }; |
@@ -1456,7 +1456,7 @@ static void snd_es1938_chip_init(struct es1938 *chip) | |||
1456 | outb(0, SLDM_REG(chip, DMACLEAR)); | 1456 | outb(0, SLDM_REG(chip, DMACLEAR)); |
1457 | } | 1457 | } |
1458 | 1458 | ||
1459 | #ifdef CONFIG_PM | 1459 | #ifdef CONFIG_PM_SLEEP |
1460 | /* | 1460 | /* |
1461 | * PM support | 1461 | * PM support |
1462 | */ | 1462 | */ |
@@ -1536,7 +1536,7 @@ static SIMPLE_DEV_PM_OPS(es1938_pm, es1938_suspend, es1938_resume); | |||
1536 | #define ES1938_PM_OPS &es1938_pm | 1536 | #define ES1938_PM_OPS &es1938_pm |
1537 | #else | 1537 | #else |
1538 | #define ES1938_PM_OPS NULL | 1538 | #define ES1938_PM_OPS NULL |
1539 | #endif /* CONFIG_PM */ | 1539 | #endif /* CONFIG_PM_SLEEP */ |
1540 | 1540 | ||
1541 | #ifdef SUPPORT_JOYSTICK | 1541 | #ifdef SUPPORT_JOYSTICK |
1542 | static int __devinit snd_es1938_create_gameport(struct es1938 *chip) | 1542 | static int __devinit snd_es1938_create_gameport(struct es1938 *chip) |
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index fb4c90b99c00..5d0e568fdea1 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c | |||
@@ -491,7 +491,7 @@ struct esschan { | |||
491 | /* linked list */ | 491 | /* linked list */ |
492 | struct list_head list; | 492 | struct list_head list; |
493 | 493 | ||
494 | #ifdef CONFIG_PM | 494 | #ifdef CONFIG_PM_SLEEP |
495 | u16 wc_map[4]; | 495 | u16 wc_map[4]; |
496 | #endif | 496 | #endif |
497 | }; | 497 | }; |
@@ -544,7 +544,7 @@ struct es1968 { | |||
544 | struct list_head substream_list; | 544 | struct list_head substream_list; |
545 | spinlock_t substream_lock; | 545 | spinlock_t substream_lock; |
546 | 546 | ||
547 | #ifdef CONFIG_PM | 547 | #ifdef CONFIG_PM_SLEEP |
548 | u16 apu_map[NR_APUS][NR_APU_REGS]; | 548 | u16 apu_map[NR_APUS][NR_APU_REGS]; |
549 | #endif | 549 | #endif |
550 | 550 | ||
@@ -706,7 +706,7 @@ static void __apu_set_register(struct es1968 *chip, u16 channel, u8 reg, u16 dat | |||
706 | { | 706 | { |
707 | if (snd_BUG_ON(channel >= NR_APUS)) | 707 | if (snd_BUG_ON(channel >= NR_APUS)) |
708 | return; | 708 | return; |
709 | #ifdef CONFIG_PM | 709 | #ifdef CONFIG_PM_SLEEP |
710 | chip->apu_map[channel][reg] = data; | 710 | chip->apu_map[channel][reg] = data; |
711 | #endif | 711 | #endif |
712 | reg |= (channel << 4); | 712 | reg |= (channel << 4); |
@@ -993,7 +993,7 @@ static void snd_es1968_program_wavecache(struct es1968 *chip, struct esschan *es | |||
993 | /* set the wavecache control reg */ | 993 | /* set the wavecache control reg */ |
994 | wave_set_register(chip, es->apu[channel] << 3, tmpval); | 994 | wave_set_register(chip, es->apu[channel] << 3, tmpval); |
995 | 995 | ||
996 | #ifdef CONFIG_PM | 996 | #ifdef CONFIG_PM_SLEEP |
997 | es->wc_map[channel] = tmpval; | 997 | es->wc_map[channel] = tmpval; |
998 | #endif | 998 | #endif |
999 | } | 999 | } |
@@ -2377,7 +2377,7 @@ static void snd_es1968_start_irq(struct es1968 *chip) | |||
2377 | outw(w, chip->io_port + ESM_PORT_HOST_IRQ); | 2377 | outw(w, chip->io_port + ESM_PORT_HOST_IRQ); |
2378 | } | 2378 | } |
2379 | 2379 | ||
2380 | #ifdef CONFIG_PM | 2380 | #ifdef CONFIG_PM_SLEEP |
2381 | /* | 2381 | /* |
2382 | * PM support | 2382 | * PM support |
2383 | */ | 2383 | */ |
@@ -2461,7 +2461,7 @@ static SIMPLE_DEV_PM_OPS(es1968_pm, es1968_suspend, es1968_resume); | |||
2461 | #define ES1968_PM_OPS &es1968_pm | 2461 | #define ES1968_PM_OPS &es1968_pm |
2462 | #else | 2462 | #else |
2463 | #define ES1968_PM_OPS NULL | 2463 | #define ES1968_PM_OPS NULL |
2464 | #endif /* CONFIG_PM */ | 2464 | #endif /* CONFIG_PM_SLEEP */ |
2465 | 2465 | ||
2466 | #ifdef SUPPORT_JOYSTICK | 2466 | #ifdef SUPPORT_JOYSTICK |
2467 | #define JOYSTICK_ADDR 0x200 | 2467 | #define JOYSTICK_ADDR 0x200 |
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 522c8706f244..ce3e548de41d 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -205,7 +205,7 @@ struct fm801 { | |||
205 | struct snd_tea575x tea; | 205 | struct snd_tea575x tea; |
206 | #endif | 206 | #endif |
207 | 207 | ||
208 | #ifdef CONFIG_PM | 208 | #ifdef CONFIG_PM_SLEEP |
209 | u16 saved_regs[0x20]; | 209 | u16 saved_regs[0x20]; |
210 | #endif | 210 | #endif |
211 | }; | 211 | }; |
@@ -1361,7 +1361,7 @@ static void __devexit snd_card_fm801_remove(struct pci_dev *pci) | |||
1361 | pci_set_drvdata(pci, NULL); | 1361 | pci_set_drvdata(pci, NULL); |
1362 | } | 1362 | } |
1363 | 1363 | ||
1364 | #ifdef CONFIG_PM | 1364 | #ifdef CONFIG_PM_SLEEP |
1365 | static unsigned char saved_regs[] = { | 1365 | static unsigned char saved_regs[] = { |
1366 | FM801_PCM_VOL, FM801_I2S_VOL, FM801_FM_VOL, FM801_REC_SRC, | 1366 | FM801_PCM_VOL, FM801_I2S_VOL, FM801_FM_VOL, FM801_REC_SRC, |
1367 | FM801_PLY_CTRL, FM801_PLY_COUNT, FM801_PLY_BUF1, FM801_PLY_BUF2, | 1367 | FM801_PLY_CTRL, FM801_PLY_COUNT, FM801_PLY_BUF1, FM801_PLY_BUF2, |
@@ -1421,7 +1421,7 @@ static SIMPLE_DEV_PM_OPS(snd_fm801_pm, snd_fm801_suspend, snd_fm801_resume); | |||
1421 | #define SND_FM801_PM_OPS &snd_fm801_pm | 1421 | #define SND_FM801_PM_OPS &snd_fm801_pm |
1422 | #else | 1422 | #else |
1423 | #define SND_FM801_PM_OPS NULL | 1423 | #define SND_FM801_PM_OPS NULL |
1424 | #endif /* CONFIG_PM */ | 1424 | #endif /* CONFIG_PM_SLEEP */ |
1425 | 1425 | ||
1426 | static struct pci_driver fm801_driver = { | 1426 | static struct pci_driver fm801_driver = { |
1427 | .name = KBUILD_MODNAME, | 1427 | .name = KBUILD_MODNAME, |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index f560051a949e..a6c34dc6dac1 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -4205,7 +4205,7 @@ int snd_hda_codec_build_pcms(struct hda_codec *codec) | |||
4205 | * | 4205 | * |
4206 | * This function returns 0 if successful, or a negative error code. | 4206 | * This function returns 0 if successful, or a negative error code. |
4207 | */ | 4207 | */ |
4208 | int __devinit snd_hda_build_pcms(struct hda_bus *bus) | 4208 | int snd_hda_build_pcms(struct hda_bus *bus) |
4209 | { | 4209 | { |
4210 | struct hda_codec *codec; | 4210 | struct hda_codec *codec; |
4211 | 4211 | ||
@@ -4432,19 +4432,16 @@ void snd_hda_update_power_acct(struct hda_codec *codec) | |||
4432 | /* Transition to powered up, if wait_power_down then wait for a pending | 4432 | /* Transition to powered up, if wait_power_down then wait for a pending |
4433 | * transition to D3 to complete. A pending D3 transition is indicated | 4433 | * transition to D3 to complete. A pending D3 transition is indicated |
4434 | * with power_transition == -1. */ | 4434 | * with power_transition == -1. */ |
4435 | /* call this with codec->power_lock held! */ | ||
4435 | static void __snd_hda_power_up(struct hda_codec *codec, bool wait_power_down) | 4436 | static void __snd_hda_power_up(struct hda_codec *codec, bool wait_power_down) |
4436 | { | 4437 | { |
4437 | struct hda_bus *bus = codec->bus; | 4438 | struct hda_bus *bus = codec->bus; |
4438 | 4439 | ||
4439 | spin_lock(&codec->power_lock); | ||
4440 | codec->power_count++; | ||
4441 | /* Return if power_on or transitioning to power_on, unless currently | 4440 | /* Return if power_on or transitioning to power_on, unless currently |
4442 | * powering down. */ | 4441 | * powering down. */ |
4443 | if ((codec->power_on || codec->power_transition > 0) && | 4442 | if ((codec->power_on || codec->power_transition > 0) && |
4444 | !(wait_power_down && codec->power_transition < 0)) { | 4443 | !(wait_power_down && codec->power_transition < 0)) |
4445 | spin_unlock(&codec->power_lock); | ||
4446 | return; | 4444 | return; |
4447 | } | ||
4448 | spin_unlock(&codec->power_lock); | 4445 | spin_unlock(&codec->power_lock); |
4449 | 4446 | ||
4450 | cancel_delayed_work_sync(&codec->power_work); | 4447 | cancel_delayed_work_sync(&codec->power_work); |
@@ -4456,9 +4453,9 @@ static void __snd_hda_power_up(struct hda_codec *codec, bool wait_power_down) | |||
4456 | if (codec->power_on) { | 4453 | if (codec->power_on) { |
4457 | if (codec->power_transition < 0) | 4454 | if (codec->power_transition < 0) |
4458 | codec->power_transition = 0; | 4455 | codec->power_transition = 0; |
4459 | spin_unlock(&codec->power_lock); | ||
4460 | return; | 4456 | return; |
4461 | } | 4457 | } |
4458 | |||
4462 | trace_hda_power_up(codec); | 4459 | trace_hda_power_up(codec); |
4463 | snd_hda_update_power_acct(codec); | 4460 | snd_hda_update_power_acct(codec); |
4464 | codec->power_on = 1; | 4461 | codec->power_on = 1; |
@@ -4472,65 +4469,45 @@ static void __snd_hda_power_up(struct hda_codec *codec, bool wait_power_down) | |||
4472 | 4469 | ||
4473 | spin_lock(&codec->power_lock); | 4470 | spin_lock(&codec->power_lock); |
4474 | codec->power_transition = 0; | 4471 | codec->power_transition = 0; |
4475 | spin_unlock(&codec->power_lock); | ||
4476 | } | ||
4477 | |||
4478 | /** | ||
4479 | * snd_hda_power_up - Power-up the codec | ||
4480 | * @codec: HD-audio codec | ||
4481 | * | ||
4482 | * Increment the power-up counter and power up the hardware really when | ||
4483 | * not turned on yet. | ||
4484 | */ | ||
4485 | void snd_hda_power_up(struct hda_codec *codec) | ||
4486 | { | ||
4487 | __snd_hda_power_up(codec, false); | ||
4488 | } | ||
4489 | EXPORT_SYMBOL_HDA(snd_hda_power_up); | ||
4490 | |||
4491 | /** | ||
4492 | * snd_hda_power_up_d3wait - Power-up the codec after waiting for any pending | ||
4493 | * D3 transition to complete. This differs from snd_hda_power_up() when | ||
4494 | * power_transition == -1. snd_hda_power_up sees this case as a nop, | ||
4495 | * snd_hda_power_up_d3wait waits for the D3 transition to complete then powers | ||
4496 | * back up. | ||
4497 | * @codec: HD-audio codec | ||
4498 | * | ||
4499 | * Cancel any power down operation hapenning on the work queue, then power up. | ||
4500 | */ | ||
4501 | void snd_hda_power_up_d3wait(struct hda_codec *codec) | ||
4502 | { | ||
4503 | /* This will cancel and wait for pending power_work to complete. */ | ||
4504 | __snd_hda_power_up(codec, true); | ||
4505 | } | 4472 | } |
4506 | EXPORT_SYMBOL_HDA(snd_hda_power_up_d3wait); | ||
4507 | 4473 | ||
4508 | #define power_save(codec) \ | 4474 | #define power_save(codec) \ |
4509 | ((codec)->bus->power_save ? *(codec)->bus->power_save : 0) | 4475 | ((codec)->bus->power_save ? *(codec)->bus->power_save : 0) |
4510 | 4476 | ||
4511 | /** | 4477 | /* Transition to powered down */ |
4512 | * snd_hda_power_down - Power-down the codec | 4478 | static void __snd_hda_power_down(struct hda_codec *codec) |
4513 | * @codec: HD-audio codec | ||
4514 | * | ||
4515 | * Decrement the power-up counter and schedules the power-off work if | ||
4516 | * the counter rearches to zero. | ||
4517 | */ | ||
4518 | void snd_hda_power_down(struct hda_codec *codec) | ||
4519 | { | 4479 | { |
4520 | spin_lock(&codec->power_lock); | 4480 | if (!codec->power_on || codec->power_count || codec->power_transition) |
4521 | --codec->power_count; | ||
4522 | if (!codec->power_on || codec->power_count || codec->power_transition) { | ||
4523 | spin_unlock(&codec->power_lock); | ||
4524 | return; | 4481 | return; |
4525 | } | 4482 | |
4526 | if (power_save(codec)) { | 4483 | if (power_save(codec)) { |
4527 | codec->power_transition = -1; /* avoid reentrance */ | 4484 | codec->power_transition = -1; /* avoid reentrance */ |
4528 | queue_delayed_work(codec->bus->workq, &codec->power_work, | 4485 | queue_delayed_work(codec->bus->workq, &codec->power_work, |
4529 | msecs_to_jiffies(power_save(codec) * 1000)); | 4486 | msecs_to_jiffies(power_save(codec) * 1000)); |
4530 | } | 4487 | } |
4488 | } | ||
4489 | |||
4490 | /** | ||
4491 | * snd_hda_power_save - Power-up/down/sync the codec | ||
4492 | * @codec: HD-audio codec | ||
4493 | * @delta: the counter delta to change | ||
4494 | * | ||
4495 | * Change the power-up counter via @delta, and power up or down the hardware | ||
4496 | * appropriately. For the power-down, queue to the delayed action. | ||
4497 | * Passing zero to @delta means to synchronize the power state. | ||
4498 | */ | ||
4499 | void snd_hda_power_save(struct hda_codec *codec, int delta, bool d3wait) | ||
4500 | { | ||
4501 | spin_lock(&codec->power_lock); | ||
4502 | codec->power_count += delta; | ||
4503 | trace_hda_power_count(codec); | ||
4504 | if (delta > 0) | ||
4505 | __snd_hda_power_up(codec, d3wait); | ||
4506 | else | ||
4507 | __snd_hda_power_down(codec); | ||
4531 | spin_unlock(&codec->power_lock); | 4508 | spin_unlock(&codec->power_lock); |
4532 | } | 4509 | } |
4533 | EXPORT_SYMBOL_HDA(snd_hda_power_down); | 4510 | EXPORT_SYMBOL_HDA(snd_hda_power_save); |
4534 | 4511 | ||
4535 | /** | 4512 | /** |
4536 | * snd_hda_check_amp_list_power - Check the amp list and update the power | 4513 | * snd_hda_check_amp_list_power - Check the amp list and update the power |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 7fbc1bcaf1a9..92ecb2b2a05c 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -386,6 +386,10 @@ enum { | |||
386 | /* DIGITAL2 bits */ | 386 | /* DIGITAL2 bits */ |
387 | #define AC_DIG2_CC (0x7f<<0) | 387 | #define AC_DIG2_CC (0x7f<<0) |
388 | 388 | ||
389 | /* DIGITAL3 bits */ | ||
390 | #define AC_DIG3_ICT (0xf<<0) | ||
391 | #define AC_DIG3_KAE (1<<7) | ||
392 | |||
389 | /* Pin widget control - 8bit */ | 393 | /* Pin widget control - 8bit */ |
390 | #define AC_PINCTL_EPT (0x3<<0) | 394 | #define AC_PINCTL_EPT (0x3<<0) |
391 | #define AC_PINCTL_EPT_NATIVE 0 | 395 | #define AC_PINCTL_EPT_NATIVE 0 |
@@ -1059,21 +1063,69 @@ const char *snd_hda_get_jack_location(u32 cfg); | |||
1059 | * power saving | 1063 | * power saving |
1060 | */ | 1064 | */ |
1061 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 1065 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
1062 | void snd_hda_power_up(struct hda_codec *codec); | 1066 | void snd_hda_power_save(struct hda_codec *codec, int delta, bool d3wait); |
1063 | void snd_hda_power_up_d3wait(struct hda_codec *codec); | ||
1064 | void snd_hda_power_down(struct hda_codec *codec); | ||
1065 | void snd_hda_update_power_acct(struct hda_codec *codec); | 1067 | void snd_hda_update_power_acct(struct hda_codec *codec); |
1066 | #else | 1068 | #else |
1067 | static inline void snd_hda_power_up(struct hda_codec *codec) {} | 1069 | static inline void snd_hda_power_save(struct hda_codec *codec, int delta, |
1068 | static inline void snd_hda_power_up_d3wait(struct hda_codec *codec) {} | 1070 | bool d3wait) {} |
1069 | static inline void snd_hda_power_down(struct hda_codec *codec) {} | ||
1070 | #endif | 1071 | #endif |
1071 | 1072 | ||
1073 | /** | ||
1074 | * snd_hda_power_up - Power-up the codec | ||
1075 | * @codec: HD-audio codec | ||
1076 | * | ||
1077 | * Increment the power-up counter and power up the hardware really when | ||
1078 | * not turned on yet. | ||
1079 | */ | ||
1080 | static inline void snd_hda_power_up(struct hda_codec *codec) | ||
1081 | { | ||
1082 | snd_hda_power_save(codec, 1, false); | ||
1083 | } | ||
1084 | |||
1085 | /** | ||
1086 | * snd_hda_power_up_d3wait - Power-up the codec after waiting for any pending | ||
1087 | * D3 transition to complete. This differs from snd_hda_power_up() when | ||
1088 | * power_transition == -1. snd_hda_power_up sees this case as a nop, | ||
1089 | * snd_hda_power_up_d3wait waits for the D3 transition to complete then powers | ||
1090 | * back up. | ||
1091 | * @codec: HD-audio codec | ||
1092 | * | ||
1093 | * Cancel any power down operation hapenning on the work queue, then power up. | ||
1094 | */ | ||
1095 | static inline void snd_hda_power_up_d3wait(struct hda_codec *codec) | ||
1096 | { | ||
1097 | snd_hda_power_save(codec, 1, true); | ||
1098 | } | ||
1099 | |||
1100 | /** | ||
1101 | * snd_hda_power_down - Power-down the codec | ||
1102 | * @codec: HD-audio codec | ||
1103 | * | ||
1104 | * Decrement the power-up counter and schedules the power-off work if | ||
1105 | * the counter rearches to zero. | ||
1106 | */ | ||
1107 | static inline void snd_hda_power_down(struct hda_codec *codec) | ||
1108 | { | ||
1109 | snd_hda_power_save(codec, -1, false); | ||
1110 | } | ||
1111 | |||
1112 | /** | ||
1113 | * snd_hda_power_sync - Synchronize the power-save status | ||
1114 | * @codec: HD-audio codec | ||
1115 | * | ||
1116 | * Synchronize the actual power state with the power account; | ||
1117 | * called when power_save parameter is changed | ||
1118 | */ | ||
1119 | static inline void snd_hda_power_sync(struct hda_codec *codec) | ||
1120 | { | ||
1121 | snd_hda_power_save(codec, 0, false); | ||
1122 | } | ||
1123 | |||
1072 | #ifdef CONFIG_SND_HDA_PATCH_LOADER | 1124 | #ifdef CONFIG_SND_HDA_PATCH_LOADER |
1073 | /* | 1125 | /* |
1074 | * patch firmware | 1126 | * patch firmware |
1075 | */ | 1127 | */ |
1076 | int snd_hda_load_patch(struct hda_bus *bus, const char *patch); | 1128 | int snd_hda_load_patch(struct hda_bus *bus, size_t size, const void *buf); |
1077 | #endif | 1129 | #endif |
1078 | 1130 | ||
1079 | /* | 1131 | /* |
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 6b2efb8cb1f9..b9a644ca03b3 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
26 | #include <linux/ctype.h> | 26 | #include <linux/ctype.h> |
27 | #include <linux/string.h> | 27 | #include <linux/string.h> |
28 | #include <linux/firmware.h> | ||
29 | #include <linux/export.h> | 28 | #include <linux/export.h> |
30 | #include <sound/core.h> | 29 | #include <sound/core.h> |
31 | #include "hda_codec.h" | 30 | #include "hda_codec.h" |
@@ -747,18 +746,21 @@ static int parse_line_mode(char *buf, struct hda_bus *bus) | |||
747 | * | 746 | * |
748 | * the spaces at the beginning and the end of the line are stripped | 747 | * the spaces at the beginning and the end of the line are stripped |
749 | */ | 748 | */ |
750 | static int get_line_from_fw(char *buf, int size, struct firmware *fw) | 749 | static int get_line_from_fw(char *buf, int size, size_t *fw_size_p, |
750 | const void **fw_data_p) | ||
751 | { | 751 | { |
752 | int len; | 752 | int len; |
753 | const char *p = fw->data; | 753 | size_t fw_size = *fw_size_p; |
754 | while (isspace(*p) && fw->size) { | 754 | const char *p = *fw_data_p; |
755 | |||
756 | while (isspace(*p) && fw_size) { | ||
755 | p++; | 757 | p++; |
756 | fw->size--; | 758 | fw_size--; |
757 | } | 759 | } |
758 | if (!fw->size) | 760 | if (!fw_size) |
759 | return 0; | 761 | return 0; |
760 | 762 | ||
761 | for (len = 0; len < fw->size; len++) { | 763 | for (len = 0; len < fw_size; len++) { |
762 | if (!*p) | 764 | if (!*p) |
763 | break; | 765 | break; |
764 | if (*p == '\n') { | 766 | if (*p == '\n') { |
@@ -770,8 +772,8 @@ static int get_line_from_fw(char *buf, int size, struct firmware *fw) | |||
770 | *buf++ = *p++; | 772 | *buf++ = *p++; |
771 | } | 773 | } |
772 | *buf = 0; | 774 | *buf = 0; |
773 | fw->size -= len; | 775 | *fw_size_p = fw_size - len; |
774 | fw->data = p; | 776 | *fw_data_p = p; |
775 | remove_trail_spaces(buf); | 777 | remove_trail_spaces(buf); |
776 | return 1; | 778 | return 1; |
777 | } | 779 | } |
@@ -779,29 +781,15 @@ static int get_line_from_fw(char *buf, int size, struct firmware *fw) | |||
779 | /* | 781 | /* |
780 | * load a "patch" firmware file and parse it | 782 | * load a "patch" firmware file and parse it |
781 | */ | 783 | */ |
782 | int snd_hda_load_patch(struct hda_bus *bus, const char *patch) | 784 | int snd_hda_load_patch(struct hda_bus *bus, size_t fw_size, const void *fw_buf) |
783 | { | 785 | { |
784 | int err; | ||
785 | const struct firmware *fw; | ||
786 | struct firmware tmp; | ||
787 | char buf[128]; | 786 | char buf[128]; |
788 | struct hda_codec *codec; | 787 | struct hda_codec *codec; |
789 | int line_mode; | 788 | int line_mode; |
790 | struct device *dev = bus->card->dev; | ||
791 | |||
792 | if (snd_BUG_ON(!dev)) | ||
793 | return -ENODEV; | ||
794 | err = request_firmware(&fw, patch, dev); | ||
795 | if (err < 0) { | ||
796 | printk(KERN_ERR "hda-codec: Cannot load the patch '%s'\n", | ||
797 | patch); | ||
798 | return err; | ||
799 | } | ||
800 | 789 | ||
801 | tmp = *fw; | ||
802 | line_mode = LINE_MODE_NONE; | 790 | line_mode = LINE_MODE_NONE; |
803 | codec = NULL; | 791 | codec = NULL; |
804 | while (get_line_from_fw(buf, sizeof(buf) - 1, &tmp)) { | 792 | while (get_line_from_fw(buf, sizeof(buf) - 1, &fw_size, &fw_buf)) { |
805 | if (!*buf || *buf == '#' || *buf == '\n') | 793 | if (!*buf || *buf == '#' || *buf == '\n') |
806 | continue; | 794 | continue; |
807 | if (*buf == '[') | 795 | if (*buf == '[') |
@@ -810,7 +798,6 @@ int snd_hda_load_patch(struct hda_bus *bus, const char *patch) | |||
810 | (codec || !patch_items[line_mode].need_codec)) | 798 | (codec || !patch_items[line_mode].need_codec)) |
811 | patch_items[line_mode].parser(buf, bus, &codec); | 799 | patch_items[line_mode].parser(buf, bus, &codec); |
812 | } | 800 | } |
813 | release_firmware(fw); | ||
814 | return 0; | 801 | return 0; |
815 | } | 802 | } |
816 | EXPORT_SYMBOL_HDA(snd_hda_load_patch); | 803 | EXPORT_SYMBOL_HDA(snd_hda_load_patch); |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 60882c62f180..209bea435442 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <sound/initval.h> | 55 | #include <sound/initval.h> |
56 | #include <linux/vgaarb.h> | 56 | #include <linux/vgaarb.h> |
57 | #include <linux/vga_switcheroo.h> | 57 | #include <linux/vga_switcheroo.h> |
58 | #include <linux/firmware.h> | ||
58 | #include "hda_codec.h" | 59 | #include "hda_codec.h" |
59 | 60 | ||
60 | 61 | ||
@@ -109,8 +110,15 @@ MODULE_PARM_DESC(beep_mode, "Select HDA Beep registration mode " | |||
109 | #endif | 110 | #endif |
110 | 111 | ||
111 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 112 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
113 | static int param_set_xint(const char *val, const struct kernel_param *kp); | ||
114 | static struct kernel_param_ops param_ops_xint = { | ||
115 | .set = param_set_xint, | ||
116 | .get = param_get_int, | ||
117 | }; | ||
118 | #define param_check_xint param_check_int | ||
119 | |||
112 | static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT; | 120 | static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT; |
113 | module_param(power_save, int, 0644); | 121 | module_param(power_save, xint, 0644); |
114 | MODULE_PARM_DESC(power_save, "Automatic power-saving timeout " | 122 | MODULE_PARM_DESC(power_save, "Automatic power-saving timeout " |
115 | "(in second, 0 = disable)."); | 123 | "(in second, 0 = disable)."); |
116 | 124 | ||
@@ -471,6 +479,10 @@ struct azx { | |||
471 | struct snd_dma_buffer rb; | 479 | struct snd_dma_buffer rb; |
472 | struct snd_dma_buffer posbuf; | 480 | struct snd_dma_buffer posbuf; |
473 | 481 | ||
482 | #ifdef CONFIG_SND_HDA_PATCH_LOADER | ||
483 | const struct firmware *fw; | ||
484 | #endif | ||
485 | |||
474 | /* flags */ | 486 | /* flags */ |
475 | int position_fix[2]; /* for both playback/capture streams */ | 487 | int position_fix[2]; /* for both playback/capture streams */ |
476 | int poll_count; | 488 | int poll_count; |
@@ -498,6 +510,9 @@ struct azx { | |||
498 | 510 | ||
499 | /* reboot notifier (for mysterious hangup problem at power-down) */ | 511 | /* reboot notifier (for mysterious hangup problem at power-down) */ |
500 | struct notifier_block reboot_notifier; | 512 | struct notifier_block reboot_notifier; |
513 | |||
514 | /* card list (for power_save trigger) */ | ||
515 | struct list_head list; | ||
501 | }; | 516 | }; |
502 | 517 | ||
503 | /* driver types */ | 518 | /* driver types */ |
@@ -560,13 +575,17 @@ enum { | |||
560 | * VGA-switcher support | 575 | * VGA-switcher support |
561 | */ | 576 | */ |
562 | #ifdef SUPPORT_VGA_SWITCHEROO | 577 | #ifdef SUPPORT_VGA_SWITCHEROO |
578 | #define use_vga_switcheroo(chip) ((chip)->use_vga_switcheroo) | ||
579 | #else | ||
580 | #define use_vga_switcheroo(chip) 0 | ||
581 | #endif | ||
582 | |||
583 | #if defined(SUPPORT_VGA_SWITCHEROO) || defined(CONFIG_SND_HDA_PATCH_LOADER) | ||
563 | #define DELAYED_INIT_MARK | 584 | #define DELAYED_INIT_MARK |
564 | #define DELAYED_INITDATA_MARK | 585 | #define DELAYED_INITDATA_MARK |
565 | #define use_vga_switcheroo(chip) ((chip)->use_vga_switcheroo) | ||
566 | #else | 586 | #else |
567 | #define DELAYED_INIT_MARK __devinit | 587 | #define DELAYED_INIT_MARK __devinit |
568 | #define DELAYED_INITDATA_MARK __devinitdata | 588 | #define DELAYED_INITDATA_MARK __devinitdata |
569 | #define use_vga_switcheroo(chip) 0 | ||
570 | #endif | 589 | #endif |
571 | 590 | ||
572 | static char *driver_short_names[] DELAYED_INITDATA_MARK = { | 591 | static char *driver_short_names[] DELAYED_INITDATA_MARK = { |
@@ -2399,13 +2418,54 @@ static void azx_power_notify(struct hda_bus *bus) | |||
2399 | !bus->power_keep_link_on) | 2418 | !bus->power_keep_link_on) |
2400 | azx_stop_chip(chip); | 2419 | azx_stop_chip(chip); |
2401 | } | 2420 | } |
2421 | |||
2422 | static DEFINE_MUTEX(card_list_lock); | ||
2423 | static LIST_HEAD(card_list); | ||
2424 | |||
2425 | static void azx_add_card_list(struct azx *chip) | ||
2426 | { | ||
2427 | mutex_lock(&card_list_lock); | ||
2428 | list_add(&chip->list, &card_list); | ||
2429 | mutex_unlock(&card_list_lock); | ||
2430 | } | ||
2431 | |||
2432 | static void azx_del_card_list(struct azx *chip) | ||
2433 | { | ||
2434 | mutex_lock(&card_list_lock); | ||
2435 | list_del_init(&chip->list); | ||
2436 | mutex_unlock(&card_list_lock); | ||
2437 | } | ||
2438 | |||
2439 | /* trigger power-save check at writing parameter */ | ||
2440 | static int param_set_xint(const char *val, const struct kernel_param *kp) | ||
2441 | { | ||
2442 | struct azx *chip; | ||
2443 | struct hda_codec *c; | ||
2444 | int prev = power_save; | ||
2445 | int ret = param_set_int(val, kp); | ||
2446 | |||
2447 | if (ret || prev == power_save) | ||
2448 | return ret; | ||
2449 | |||
2450 | mutex_lock(&card_list_lock); | ||
2451 | list_for_each_entry(chip, &card_list, list) { | ||
2452 | if (!chip->bus || chip->disabled) | ||
2453 | continue; | ||
2454 | list_for_each_entry(c, &chip->bus->codec_list, list) | ||
2455 | snd_hda_power_sync(c); | ||
2456 | } | ||
2457 | mutex_unlock(&card_list_lock); | ||
2458 | return 0; | ||
2459 | } | ||
2460 | #else | ||
2461 | #define azx_add_card_list(chip) /* NOP */ | ||
2462 | #define azx_del_card_list(chip) /* NOP */ | ||
2402 | #endif /* CONFIG_SND_HDA_POWER_SAVE */ | 2463 | #endif /* CONFIG_SND_HDA_POWER_SAVE */ |
2403 | 2464 | ||
2404 | #ifdef CONFIG_PM | 2465 | #if defined(CONFIG_PM_SLEEP) || defined(SUPPORT_VGA_SWITCHEROO) |
2405 | /* | 2466 | /* |
2406 | * power management | 2467 | * power management |
2407 | */ | 2468 | */ |
2408 | |||
2409 | static int azx_suspend(struct device *dev) | 2469 | static int azx_suspend(struct device *dev) |
2410 | { | 2470 | { |
2411 | struct pci_dev *pci = to_pci_dev(dev); | 2471 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -2463,10 +2523,8 @@ static int azx_resume(struct device *dev) | |||
2463 | static SIMPLE_DEV_PM_OPS(azx_pm, azx_suspend, azx_resume); | 2523 | static SIMPLE_DEV_PM_OPS(azx_pm, azx_suspend, azx_resume); |
2464 | #define AZX_PM_OPS &azx_pm | 2524 | #define AZX_PM_OPS &azx_pm |
2465 | #else | 2525 | #else |
2466 | #define azx_suspend(dev) | ||
2467 | #define azx_resume(dev) | ||
2468 | #define AZX_PM_OPS NULL | 2526 | #define AZX_PM_OPS NULL |
2469 | #endif /* CONFIG_PM */ | 2527 | #endif /* CONFIG_PM_SLEEP || SUPPORT_VGA_SWITCHEROO */ |
2470 | 2528 | ||
2471 | 2529 | ||
2472 | /* | 2530 | /* |
@@ -2599,6 +2657,8 @@ static int azx_free(struct azx *chip) | |||
2599 | { | 2657 | { |
2600 | int i; | 2658 | int i; |
2601 | 2659 | ||
2660 | azx_del_card_list(chip); | ||
2661 | |||
2602 | azx_notifier_unregister(chip); | 2662 | azx_notifier_unregister(chip); |
2603 | 2663 | ||
2604 | if (use_vga_switcheroo(chip)) { | 2664 | if (use_vga_switcheroo(chip)) { |
@@ -2640,6 +2700,10 @@ static int azx_free(struct azx *chip) | |||
2640 | pci_release_regions(chip->pci); | 2700 | pci_release_regions(chip->pci); |
2641 | pci_disable_device(chip->pci); | 2701 | pci_disable_device(chip->pci); |
2642 | kfree(chip->azx_dev); | 2702 | kfree(chip->azx_dev); |
2703 | #ifdef CONFIG_SND_HDA_PATCH_LOADER | ||
2704 | if (chip->fw) | ||
2705 | release_firmware(chip->fw); | ||
2706 | #endif | ||
2643 | kfree(chip); | 2707 | kfree(chip); |
2644 | 2708 | ||
2645 | return 0; | 2709 | return 0; |
@@ -2902,6 +2966,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
2902 | chip->dev_index = dev; | 2966 | chip->dev_index = dev; |
2903 | INIT_WORK(&chip->irq_pending_work, azx_irq_pending_work); | 2967 | INIT_WORK(&chip->irq_pending_work, azx_irq_pending_work); |
2904 | INIT_LIST_HEAD(&chip->pcm_list); | 2968 | INIT_LIST_HEAD(&chip->pcm_list); |
2969 | INIT_LIST_HEAD(&chip->list); | ||
2905 | init_vga_switcheroo(chip); | 2970 | init_vga_switcheroo(chip); |
2906 | 2971 | ||
2907 | chip->position_fix[0] = chip->position_fix[1] = | 2972 | chip->position_fix[0] = chip->position_fix[1] = |
@@ -3147,12 +3212,40 @@ static void power_down_all_codecs(struct azx *chip) | |||
3147 | #endif | 3212 | #endif |
3148 | } | 3213 | } |
3149 | 3214 | ||
3215 | #ifdef CONFIG_SND_HDA_PATCH_LOADER | ||
3216 | /* callback from request_firmware_nowait() */ | ||
3217 | static void azx_firmware_cb(const struct firmware *fw, void *context) | ||
3218 | { | ||
3219 | struct snd_card *card = context; | ||
3220 | struct azx *chip = card->private_data; | ||
3221 | struct pci_dev *pci = chip->pci; | ||
3222 | |||
3223 | if (!fw) { | ||
3224 | snd_printk(KERN_ERR SFX "Cannot load firmware, aborting\n"); | ||
3225 | goto error; | ||
3226 | } | ||
3227 | |||
3228 | chip->fw = fw; | ||
3229 | if (!chip->disabled) { | ||
3230 | /* continue probing */ | ||
3231 | if (azx_probe_continue(chip)) | ||
3232 | goto error; | ||
3233 | } | ||
3234 | return; /* OK */ | ||
3235 | |||
3236 | error: | ||
3237 | snd_card_free(card); | ||
3238 | pci_set_drvdata(pci, NULL); | ||
3239 | } | ||
3240 | #endif | ||
3241 | |||
3150 | static int __devinit azx_probe(struct pci_dev *pci, | 3242 | static int __devinit azx_probe(struct pci_dev *pci, |
3151 | const struct pci_device_id *pci_id) | 3243 | const struct pci_device_id *pci_id) |
3152 | { | 3244 | { |
3153 | static int dev; | 3245 | static int dev; |
3154 | struct snd_card *card; | 3246 | struct snd_card *card; |
3155 | struct azx *chip; | 3247 | struct azx *chip; |
3248 | bool probe_now; | ||
3156 | int err; | 3249 | int err; |
3157 | 3250 | ||
3158 | if (dev >= SNDRV_CARDS) | 3251 | if (dev >= SNDRV_CARDS) |
@@ -3168,15 +3261,28 @@ static int __devinit azx_probe(struct pci_dev *pci, | |||
3168 | return err; | 3261 | return err; |
3169 | } | 3262 | } |
3170 | 3263 | ||
3171 | /* set this here since it's referred in snd_hda_load_patch() */ | ||
3172 | snd_card_set_dev(card, &pci->dev); | 3264 | snd_card_set_dev(card, &pci->dev); |
3173 | 3265 | ||
3174 | err = azx_create(card, pci, dev, pci_id->driver_data, &chip); | 3266 | err = azx_create(card, pci, dev, pci_id->driver_data, &chip); |
3175 | if (err < 0) | 3267 | if (err < 0) |
3176 | goto out_free; | 3268 | goto out_free; |
3177 | card->private_data = chip; | 3269 | card->private_data = chip; |
3270 | probe_now = !chip->disabled; | ||
3178 | 3271 | ||
3179 | if (!chip->disabled) { | 3272 | #ifdef CONFIG_SND_HDA_PATCH_LOADER |
3273 | if (patch[dev] && *patch[dev]) { | ||
3274 | snd_printk(KERN_ERR SFX "Applying patch firmware '%s'\n", | ||
3275 | patch[dev]); | ||
3276 | err = request_firmware_nowait(THIS_MODULE, true, patch[dev], | ||
3277 | &pci->dev, GFP_KERNEL, card, | ||
3278 | azx_firmware_cb); | ||
3279 | if (err < 0) | ||
3280 | goto out_free; | ||
3281 | probe_now = false; /* continued in azx_firmware_cb() */ | ||
3282 | } | ||
3283 | #endif /* CONFIG_SND_HDA_PATCH_LOADER */ | ||
3284 | |||
3285 | if (probe_now) { | ||
3180 | err = azx_probe_continue(chip); | 3286 | err = azx_probe_continue(chip); |
3181 | if (err < 0) | 3287 | if (err < 0) |
3182 | goto out_free; | 3288 | goto out_free; |
@@ -3206,12 +3312,13 @@ static int DELAYED_INIT_MARK azx_probe_continue(struct azx *chip) | |||
3206 | if (err < 0) | 3312 | if (err < 0) |
3207 | goto out_free; | 3313 | goto out_free; |
3208 | #ifdef CONFIG_SND_HDA_PATCH_LOADER | 3314 | #ifdef CONFIG_SND_HDA_PATCH_LOADER |
3209 | if (patch[dev] && *patch[dev]) { | 3315 | if (chip->fw) { |
3210 | snd_printk(KERN_ERR SFX "Applying patch firmware '%s'\n", | 3316 | err = snd_hda_load_patch(chip->bus, chip->fw->size, |
3211 | patch[dev]); | 3317 | chip->fw->data); |
3212 | err = snd_hda_load_patch(chip->bus, patch[dev]); | ||
3213 | if (err < 0) | 3318 | if (err < 0) |
3214 | goto out_free; | 3319 | goto out_free; |
3320 | release_firmware(chip->fw); /* no longer needed */ | ||
3321 | chip->fw = NULL; | ||
3215 | } | 3322 | } |
3216 | #endif | 3323 | #endif |
3217 | if ((probe_only[dev] & 1) == 0) { | 3324 | if ((probe_only[dev] & 1) == 0) { |
@@ -3237,6 +3344,7 @@ static int DELAYED_INIT_MARK azx_probe_continue(struct azx *chip) | |||
3237 | chip->running = 1; | 3344 | chip->running = 1; |
3238 | power_down_all_codecs(chip); | 3345 | power_down_all_codecs(chip); |
3239 | azx_notifier_register(chip); | 3346 | azx_notifier_register(chip); |
3347 | azx_add_card_list(chip); | ||
3240 | 3348 | ||
3241 | return 0; | 3349 | return 0; |
3242 | 3350 | ||
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 6894ec66258c..045e5d32f5de 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -402,6 +402,9 @@ static void print_digital_conv(struct snd_info_buffer *buffer, | |||
402 | { | 402 | { |
403 | unsigned int digi1 = snd_hda_codec_read(codec, nid, 0, | 403 | unsigned int digi1 = snd_hda_codec_read(codec, nid, 0, |
404 | AC_VERB_GET_DIGI_CONVERT_1, 0); | 404 | AC_VERB_GET_DIGI_CONVERT_1, 0); |
405 | unsigned char digi2 = digi1 >> 8; | ||
406 | unsigned char digi3 = digi1 >> 16; | ||
407 | |||
405 | snd_iprintf(buffer, " Digital:"); | 408 | snd_iprintf(buffer, " Digital:"); |
406 | if (digi1 & AC_DIG1_ENABLE) | 409 | if (digi1 & AC_DIG1_ENABLE) |
407 | snd_iprintf(buffer, " Enabled"); | 410 | snd_iprintf(buffer, " Enabled"); |
@@ -419,9 +422,13 @@ static void print_digital_conv(struct snd_info_buffer *buffer, | |||
419 | snd_iprintf(buffer, " Pro"); | 422 | snd_iprintf(buffer, " Pro"); |
420 | if (digi1 & AC_DIG1_LEVEL) | 423 | if (digi1 & AC_DIG1_LEVEL) |
421 | snd_iprintf(buffer, " GenLevel"); | 424 | snd_iprintf(buffer, " GenLevel"); |
425 | if (digi3 & AC_DIG3_KAE) | ||
426 | snd_iprintf(buffer, " KAE"); | ||
422 | snd_iprintf(buffer, "\n"); | 427 | snd_iprintf(buffer, "\n"); |
423 | snd_iprintf(buffer, " Digital category: 0x%x\n", | 428 | snd_iprintf(buffer, " Digital category: 0x%x\n", |
424 | (digi1 >> 8) & AC_DIG2_CC); | 429 | digi2 & AC_DIG2_CC); |
430 | snd_iprintf(buffer, " IEC Coding Type: 0x%x\n", | ||
431 | digi3 & AC_DIG3_ICT); | ||
425 | } | 432 | } |
426 | 433 | ||
427 | static const char *get_pwr_state(u32 state) | 434 | static const char *get_pwr_state(u32 state) |
diff --git a/sound/pci/hda/hda_trace.h b/sound/pci/hda/hda_trace.h index 9884871ddb00..d42fe911abae 100644 --- a/sound/pci/hda/hda_trace.h +++ b/sound/pci/hda/hda_trace.h | |||
@@ -58,6 +58,7 @@ TRACE_EVENT(hda_bus_reset, | |||
58 | TP_printk("[%d]", __entry->card) | 58 | TP_printk("[%d]", __entry->card) |
59 | ); | 59 | ); |
60 | 60 | ||
61 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
61 | DECLARE_EVENT_CLASS(hda_power, | 62 | DECLARE_EVENT_CLASS(hda_power, |
62 | 63 | ||
63 | TP_PROTO(struct hda_codec *codec), | 64 | TP_PROTO(struct hda_codec *codec), |
@@ -87,6 +88,31 @@ DEFINE_EVENT(hda_power, hda_power_up, | |||
87 | TP_ARGS(codec) | 88 | TP_ARGS(codec) |
88 | ); | 89 | ); |
89 | 90 | ||
91 | TRACE_EVENT(hda_power_count, | ||
92 | TP_PROTO(struct hda_codec *codec), | ||
93 | TP_ARGS(codec), | ||
94 | TP_STRUCT__entry( | ||
95 | __field( unsigned int, card ) | ||
96 | __field( unsigned int, addr ) | ||
97 | __field( int, power_count ) | ||
98 | __field( int, power_on ) | ||
99 | __field( int, power_transition ) | ||
100 | ), | ||
101 | |||
102 | TP_fast_assign( | ||
103 | __entry->card = (codec)->bus->card->number; | ||
104 | __entry->addr = (codec)->addr; | ||
105 | __entry->power_count = (codec)->power_count; | ||
106 | __entry->power_on = (codec)->power_on; | ||
107 | __entry->power_transition = (codec)->power_transition; | ||
108 | ), | ||
109 | |||
110 | TP_printk("[%d:%d] power_count=%d, power_on=%d, power_transition=%d", | ||
111 | __entry->card, __entry->addr, __entry->power_count, | ||
112 | __entry->power_on, __entry->power_transition) | ||
113 | ); | ||
114 | #endif /* CONFIG_SND_HDA_POWER_SAVE */ | ||
115 | |||
90 | TRACE_EVENT(hda_unsol_event, | 116 | TRACE_EVENT(hda_unsol_event, |
91 | 117 | ||
92 | TP_PROTO(struct hda_bus *bus, u32 res, u32 res_ex), | 118 | TP_PROTO(struct hda_bus *bus, u32 res, u32 res_ex), |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 0208fa121e5a..21218853366d 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -4814,6 +4814,32 @@ static const struct snd_kcontrol_new ad1882_3stack_mixers[] = { | |||
4814 | { } /* end */ | 4814 | { } /* end */ |
4815 | }; | 4815 | }; |
4816 | 4816 | ||
4817 | /* simple auto-mute control for AD1882 3-stack board */ | ||
4818 | #define AD1882_HP_EVENT 0x01 | ||
4819 | |||
4820 | static void ad1882_3stack_automute(struct hda_codec *codec) | ||
4821 | { | ||
4822 | bool mute = snd_hda_jack_detect(codec, 0x11); | ||
4823 | snd_hda_codec_write(codec, 0x12, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
4824 | mute ? 0 : PIN_OUT); | ||
4825 | } | ||
4826 | |||
4827 | static int ad1882_3stack_automute_init(struct hda_codec *codec) | ||
4828 | { | ||
4829 | ad198x_init(codec); | ||
4830 | ad1882_3stack_automute(codec); | ||
4831 | return 0; | ||
4832 | } | ||
4833 | |||
4834 | static void ad1882_3stack_unsol_event(struct hda_codec *codec, unsigned int res) | ||
4835 | { | ||
4836 | switch (res >> 26) { | ||
4837 | case AD1882_HP_EVENT: | ||
4838 | ad1882_3stack_automute(codec); | ||
4839 | break; | ||
4840 | } | ||
4841 | } | ||
4842 | |||
4817 | static const struct snd_kcontrol_new ad1882_6stack_mixers[] = { | 4843 | static const struct snd_kcontrol_new ad1882_6stack_mixers[] = { |
4818 | HDA_CODEC_MUTE("Surround Playback Switch", 0x16, 0x0, HDA_OUTPUT), | 4844 | HDA_CODEC_MUTE("Surround Playback Switch", 0x16, 0x0, HDA_OUTPUT), |
4819 | HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x24, 1, 0x0, HDA_OUTPUT), | 4845 | HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x24, 1, 0x0, HDA_OUTPUT), |
@@ -4928,6 +4954,11 @@ static const struct hda_verb ad1882_init_verbs[] = { | |||
4928 | { } /* end */ | 4954 | { } /* end */ |
4929 | }; | 4955 | }; |
4930 | 4956 | ||
4957 | static const struct hda_verb ad1882_3stack_automute_verbs[] = { | ||
4958 | {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1882_HP_EVENT}, | ||
4959 | { } /* end */ | ||
4960 | }; | ||
4961 | |||
4931 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 4962 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
4932 | static const struct hda_amp_list ad1882_loopbacks[] = { | 4963 | static const struct hda_amp_list ad1882_loopbacks[] = { |
4933 | { 0x20, HDA_INPUT, 0 }, /* Front Mic */ | 4964 | { 0x20, HDA_INPUT, 0 }, /* Front Mic */ |
@@ -4942,12 +4973,14 @@ static const struct hda_amp_list ad1882_loopbacks[] = { | |||
4942 | enum { | 4973 | enum { |
4943 | AD1882_3STACK, | 4974 | AD1882_3STACK, |
4944 | AD1882_6STACK, | 4975 | AD1882_6STACK, |
4976 | AD1882_3STACK_AUTOMUTE, | ||
4945 | AD1882_MODELS | 4977 | AD1882_MODELS |
4946 | }; | 4978 | }; |
4947 | 4979 | ||
4948 | static const char * const ad1882_models[AD1986A_MODELS] = { | 4980 | static const char * const ad1882_models[AD1986A_MODELS] = { |
4949 | [AD1882_3STACK] = "3stack", | 4981 | [AD1882_3STACK] = "3stack", |
4950 | [AD1882_6STACK] = "6stack", | 4982 | [AD1882_6STACK] = "6stack", |
4983 | [AD1882_3STACK_AUTOMUTE] = "3stack-automute", | ||
4951 | }; | 4984 | }; |
4952 | 4985 | ||
4953 | 4986 | ||
@@ -5002,6 +5035,7 @@ static int patch_ad1882(struct hda_codec *codec) | |||
5002 | switch (board_config) { | 5035 | switch (board_config) { |
5003 | default: | 5036 | default: |
5004 | case AD1882_3STACK: | 5037 | case AD1882_3STACK: |
5038 | case AD1882_3STACK_AUTOMUTE: | ||
5005 | spec->num_mixers = 3; | 5039 | spec->num_mixers = 3; |
5006 | spec->mixers[2] = ad1882_3stack_mixers; | 5040 | spec->mixers[2] = ad1882_3stack_mixers; |
5007 | spec->channel_mode = ad1882_modes; | 5041 | spec->channel_mode = ad1882_modes; |
@@ -5009,6 +5043,12 @@ static int patch_ad1882(struct hda_codec *codec) | |||
5009 | spec->need_dac_fix = 1; | 5043 | spec->need_dac_fix = 1; |
5010 | spec->multiout.max_channels = 2; | 5044 | spec->multiout.max_channels = 2; |
5011 | spec->multiout.num_dacs = 1; | 5045 | spec->multiout.num_dacs = 1; |
5046 | if (board_config != AD1882_3STACK) { | ||
5047 | spec->init_verbs[spec->num_init_verbs++] = | ||
5048 | ad1882_3stack_automute_verbs; | ||
5049 | codec->patch_ops.unsol_event = ad1882_3stack_unsol_event; | ||
5050 | codec->patch_ops.init = ad1882_3stack_automute_init; | ||
5051 | } | ||
5012 | break; | 5052 | break; |
5013 | case AD1882_6STACK: | 5053 | case AD1882_6STACK: |
5014 | spec->num_mixers = 3; | 5054 | spec->num_mixers = 3; |
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c index 3e4f8c12ffce..20bcddea2eab 100644 --- a/sound/pci/ice1712/aureon.c +++ b/sound/pci/ice1712/aureon.c | |||
@@ -2103,7 +2103,7 @@ static int aureon_reset(struct snd_ice1712 *ice) | |||
2103 | /* | 2103 | /* |
2104 | * suspend/resume | 2104 | * suspend/resume |
2105 | */ | 2105 | */ |
2106 | #ifdef CONFIG_PM | 2106 | #ifdef CONFIG_PM_SLEEP |
2107 | static int aureon_resume(struct snd_ice1712 *ice) | 2107 | static int aureon_resume(struct snd_ice1712 *ice) |
2108 | { | 2108 | { |
2109 | struct aureon_spec *spec = ice->spec; | 2109 | struct aureon_spec *spec = ice->spec; |
@@ -2160,7 +2160,7 @@ static int __devinit aureon_init(struct snd_ice1712 *ice) | |||
2160 | wm_set_vol(ice, i, spec->vol[i], spec->master[i % 2]); | 2160 | wm_set_vol(ice, i, spec->vol[i], spec->master[i % 2]); |
2161 | } | 2161 | } |
2162 | 2162 | ||
2163 | #ifdef CONFIG_PM | 2163 | #ifdef CONFIG_PM_SLEEP |
2164 | ice->pm_resume = aureon_resume; | 2164 | ice->pm_resume = aureon_resume; |
2165 | ice->pm_suspend_enabled = 1; | 2165 | ice->pm_suspend_enabled = 1; |
2166 | #endif | 2166 | #endif |
diff --git a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h index 0da778a69ef8..d0e7d87f09f0 100644 --- a/sound/pci/ice1712/ice1712.h +++ b/sound/pci/ice1712/ice1712.h | |||
@@ -384,7 +384,7 @@ struct snd_ice1712 { | |||
384 | char **ext_clock_names; | 384 | char **ext_clock_names; |
385 | int ext_clock_count; | 385 | int ext_clock_count; |
386 | void (*pro_open)(struct snd_ice1712 *, struct snd_pcm_substream *); | 386 | void (*pro_open)(struct snd_ice1712 *, struct snd_pcm_substream *); |
387 | #ifdef CONFIG_PM | 387 | #ifdef CONFIG_PM_SLEEP |
388 | int (*pm_suspend)(struct snd_ice1712 *); | 388 | int (*pm_suspend)(struct snd_ice1712 *); |
389 | int (*pm_resume)(struct snd_ice1712 *); | 389 | int (*pm_resume)(struct snd_ice1712 *); |
390 | unsigned int pm_suspend_enabled:1; | 390 | unsigned int pm_suspend_enabled:1; |
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index bed9f34f4efe..3050a5279253 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -2792,7 +2792,7 @@ static void __devexit snd_vt1724_remove(struct pci_dev *pci) | |||
2792 | pci_set_drvdata(pci, NULL); | 2792 | pci_set_drvdata(pci, NULL); |
2793 | } | 2793 | } |
2794 | 2794 | ||
2795 | #ifdef CONFIG_PM | 2795 | #ifdef CONFIG_PM_SLEEP |
2796 | static int snd_vt1724_suspend(struct device *dev) | 2796 | static int snd_vt1724_suspend(struct device *dev) |
2797 | { | 2797 | { |
2798 | struct pci_dev *pci = to_pci_dev(dev); | 2798 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -2878,7 +2878,7 @@ static SIMPLE_DEV_PM_OPS(snd_vt1724_pm, snd_vt1724_suspend, snd_vt1724_resume); | |||
2878 | #define SND_VT1724_PM_OPS &snd_vt1724_pm | 2878 | #define SND_VT1724_PM_OPS &snd_vt1724_pm |
2879 | #else | 2879 | #else |
2880 | #define SND_VT1724_PM_OPS NULL | 2880 | #define SND_VT1724_PM_OPS NULL |
2881 | #endif /* CONFIG_PM */ | 2881 | #endif /* CONFIG_PM_SLEEP */ |
2882 | 2882 | ||
2883 | static struct pci_driver vt1724_driver = { | 2883 | static struct pci_driver vt1724_driver = { |
2884 | .name = KBUILD_MODNAME, | 2884 | .name = KBUILD_MODNAME, |
diff --git a/sound/pci/ice1712/juli.c b/sound/pci/ice1712/juli.c index 98bc3b7681b5..14fd536b6452 100644 --- a/sound/pci/ice1712/juli.c +++ b/sound/pci/ice1712/juli.c | |||
@@ -486,7 +486,7 @@ static int __devinit juli_add_controls(struct snd_ice1712 *ice) | |||
486 | * suspend/resume | 486 | * suspend/resume |
487 | * */ | 487 | * */ |
488 | 488 | ||
489 | #ifdef CONFIG_PM | 489 | #ifdef CONFIG_PM_SLEEP |
490 | static int juli_resume(struct snd_ice1712 *ice) | 490 | static int juli_resume(struct snd_ice1712 *ice) |
491 | { | 491 | { |
492 | struct snd_akm4xxx *ak = ice->akm; | 492 | struct snd_akm4xxx *ak = ice->akm; |
@@ -652,7 +652,7 @@ static int __devinit juli_init(struct snd_ice1712 *ice) | |||
652 | 652 | ||
653 | ice->spdif.ops.open = juli_spdif_in_open; | 653 | ice->spdif.ops.open = juli_spdif_in_open; |
654 | 654 | ||
655 | #ifdef CONFIG_PM | 655 | #ifdef CONFIG_PM_SLEEP |
656 | ice->pm_resume = juli_resume; | 656 | ice->pm_resume = juli_resume; |
657 | ice->pm_suspend = juli_suspend; | 657 | ice->pm_suspend = juli_suspend; |
658 | ice->pm_suspend_enabled = 1; | 658 | ice->pm_suspend_enabled = 1; |
diff --git a/sound/pci/ice1712/prodigy_hifi.c b/sound/pci/ice1712/prodigy_hifi.c index 764cc93dbca4..7f2b63f97e61 100644 --- a/sound/pci/ice1712/prodigy_hifi.c +++ b/sound/pci/ice1712/prodigy_hifi.c | |||
@@ -1099,7 +1099,7 @@ static void ak4396_init(struct snd_ice1712 *ice) | |||
1099 | ak4396_write(ice, ak4396_inits[i], ak4396_inits[i+1]); | 1099 | ak4396_write(ice, ak4396_inits[i], ak4396_inits[i+1]); |
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | #ifdef CONFIG_PM | 1102 | #ifdef CONFIG_PM_SLEEP |
1103 | static int prodigy_hd2_resume(struct snd_ice1712 *ice) | 1103 | static int prodigy_hd2_resume(struct snd_ice1712 *ice) |
1104 | { | 1104 | { |
1105 | /* initialize ak4396 codec and restore previous mixer volumes */ | 1105 | /* initialize ak4396 codec and restore previous mixer volumes */ |
@@ -1140,7 +1140,7 @@ static int __devinit prodigy_hd2_init(struct snd_ice1712 *ice) | |||
1140 | return -ENOMEM; | 1140 | return -ENOMEM; |
1141 | ice->spec = spec; | 1141 | ice->spec = spec; |
1142 | 1142 | ||
1143 | #ifdef CONFIG_PM | 1143 | #ifdef CONFIG_PM_SLEEP |
1144 | ice->pm_resume = &prodigy_hd2_resume; | 1144 | ice->pm_resume = &prodigy_hd2_resume; |
1145 | ice->pm_suspend_enabled = 1; | 1145 | ice->pm_suspend_enabled = 1; |
1146 | #endif | 1146 | #endif |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index cd553f592e2d..5c4115289a9a 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -2620,7 +2620,7 @@ static int snd_intel8x0_free(struct intel8x0 *chip) | |||
2620 | return 0; | 2620 | return 0; |
2621 | } | 2621 | } |
2622 | 2622 | ||
2623 | #ifdef CONFIG_PM | 2623 | #ifdef CONFIG_PM_SLEEP |
2624 | /* | 2624 | /* |
2625 | * power management | 2625 | * power management |
2626 | */ | 2626 | */ |
@@ -2741,7 +2741,7 @@ static SIMPLE_DEV_PM_OPS(intel8x0_pm, intel8x0_suspend, intel8x0_resume); | |||
2741 | #define INTEL8X0_PM_OPS &intel8x0_pm | 2741 | #define INTEL8X0_PM_OPS &intel8x0_pm |
2742 | #else | 2742 | #else |
2743 | #define INTEL8X0_PM_OPS NULL | 2743 | #define INTEL8X0_PM_OPS NULL |
2744 | #endif /* CONFIG_PM */ | 2744 | #endif /* CONFIG_PM_SLEEP */ |
2745 | 2745 | ||
2746 | #define INTEL8X0_TESTBUF_SIZE 32768 /* enough large for one shot */ | 2746 | #define INTEL8X0_TESTBUF_SIZE 32768 /* enough large for one shot */ |
2747 | 2747 | ||
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index da44bb3f8e7a..4d551736531e 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c | |||
@@ -1008,7 +1008,7 @@ static int snd_intel8x0m_free(struct intel8x0m *chip) | |||
1008 | return 0; | 1008 | return 0; |
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | #ifdef CONFIG_PM | 1011 | #ifdef CONFIG_PM_SLEEP |
1012 | /* | 1012 | /* |
1013 | * power management | 1013 | * power management |
1014 | */ | 1014 | */ |
@@ -1067,7 +1067,7 @@ static SIMPLE_DEV_PM_OPS(intel8x0m_pm, intel8x0m_suspend, intel8x0m_resume); | |||
1067 | #define INTEL8X0M_PM_OPS &intel8x0m_pm | 1067 | #define INTEL8X0M_PM_OPS &intel8x0m_pm |
1068 | #else | 1068 | #else |
1069 | #define INTEL8X0M_PM_OPS NULL | 1069 | #define INTEL8X0M_PM_OPS NULL |
1070 | #endif /* CONFIG_PM */ | 1070 | #endif /* CONFIG_PM_SLEEP */ |
1071 | 1071 | ||
1072 | #ifdef CONFIG_PROC_FS | 1072 | #ifdef CONFIG_PROC_FS |
1073 | static void snd_intel8x0m_proc_read(struct snd_info_entry * entry, | 1073 | static void snd_intel8x0m_proc_read(struct snd_info_entry * entry, |
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index c85d1ffcc955..eb3cd3a4315e 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c | |||
@@ -789,7 +789,7 @@ struct snd_m3 { | |||
789 | 789 | ||
790 | unsigned int in_suspend; | 790 | unsigned int in_suspend; |
791 | 791 | ||
792 | #ifdef CONFIG_PM | 792 | #ifdef CONFIG_PM_SLEEP |
793 | u16 *suspend_mem; | 793 | u16 *suspend_mem; |
794 | #endif | 794 | #endif |
795 | 795 | ||
@@ -2368,7 +2368,7 @@ static int snd_m3_free(struct snd_m3 *chip) | |||
2368 | outw(0, chip->iobase + HOST_INT_CTRL); /* disable ints */ | 2368 | outw(0, chip->iobase + HOST_INT_CTRL); /* disable ints */ |
2369 | } | 2369 | } |
2370 | 2370 | ||
2371 | #ifdef CONFIG_PM | 2371 | #ifdef CONFIG_PM_SLEEP |
2372 | vfree(chip->suspend_mem); | 2372 | vfree(chip->suspend_mem); |
2373 | #endif | 2373 | #endif |
2374 | 2374 | ||
@@ -2390,7 +2390,7 @@ static int snd_m3_free(struct snd_m3 *chip) | |||
2390 | /* | 2390 | /* |
2391 | * APM support | 2391 | * APM support |
2392 | */ | 2392 | */ |
2393 | #ifdef CONFIG_PM | 2393 | #ifdef CONFIG_PM_SLEEP |
2394 | static int m3_suspend(struct device *dev) | 2394 | static int m3_suspend(struct device *dev) |
2395 | { | 2395 | { |
2396 | struct pci_dev *pci = to_pci_dev(dev); | 2396 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -2485,7 +2485,7 @@ static SIMPLE_DEV_PM_OPS(m3_pm, m3_suspend, m3_resume); | |||
2485 | #define M3_PM_OPS &m3_pm | 2485 | #define M3_PM_OPS &m3_pm |
2486 | #else | 2486 | #else |
2487 | #define M3_PM_OPS NULL | 2487 | #define M3_PM_OPS NULL |
2488 | #endif /* CONFIG_PM */ | 2488 | #endif /* CONFIG_PM_SLEEP */ |
2489 | 2489 | ||
2490 | #ifdef CONFIG_SND_MAESTRO3_INPUT | 2490 | #ifdef CONFIG_SND_MAESTRO3_INPUT |
2491 | static int __devinit snd_m3_input_register(struct snd_m3 *chip) | 2491 | static int __devinit snd_m3_input_register(struct snd_m3 *chip) |
@@ -2656,7 +2656,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci, | |||
2656 | } | 2656 | } |
2657 | chip->irq = pci->irq; | 2657 | chip->irq = pci->irq; |
2658 | 2658 | ||
2659 | #ifdef CONFIG_PM | 2659 | #ifdef CONFIG_PM_SLEEP |
2660 | chip->suspend_mem = vmalloc(sizeof(u16) * (REV_B_CODE_MEMORY_LENGTH + REV_B_DATA_MEMORY_LENGTH)); | 2660 | chip->suspend_mem = vmalloc(sizeof(u16) * (REV_B_CODE_MEMORY_LENGTH + REV_B_DATA_MEMORY_LENGTH)); |
2661 | if (chip->suspend_mem == NULL) | 2661 | if (chip->suspend_mem == NULL) |
2662 | snd_printk(KERN_WARNING "can't allocate apm buffer\n"); | 2662 | snd_printk(KERN_WARNING "can't allocate apm buffer\n"); |
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index 465cff25b146..e80e9a1e84aa 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c | |||
@@ -1377,7 +1377,7 @@ snd_nm256_peek_for_sig(struct nm256 *chip) | |||
1377 | return 0; | 1377 | return 0; |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | #ifdef CONFIG_PM | 1380 | #ifdef CONFIG_PM_SLEEP |
1381 | /* | 1381 | /* |
1382 | * APM event handler, so the card is properly reinitialized after a power | 1382 | * APM event handler, so the card is properly reinitialized after a power |
1383 | * event. | 1383 | * event. |
@@ -1441,7 +1441,7 @@ static SIMPLE_DEV_PM_OPS(nm256_pm, nm256_suspend, nm256_resume); | |||
1441 | #define NM256_PM_OPS &nm256_pm | 1441 | #define NM256_PM_OPS &nm256_pm |
1442 | #else | 1442 | #else |
1443 | #define NM256_PM_OPS NULL | 1443 | #define NM256_PM_OPS NULL |
1444 | #endif /* CONFIG_PM */ | 1444 | #endif /* CONFIG_PM_SLEEP */ |
1445 | 1445 | ||
1446 | static int snd_nm256_free(struct nm256 *chip) | 1446 | static int snd_nm256_free(struct nm256 *chip) |
1447 | { | 1447 | { |
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c index 37520a2b4dcf..2becae155a48 100644 --- a/sound/pci/oxygen/oxygen.c +++ b/sound/pci/oxygen/oxygen.c | |||
@@ -872,7 +872,7 @@ static struct pci_driver oxygen_driver = { | |||
872 | .id_table = oxygen_ids, | 872 | .id_table = oxygen_ids, |
873 | .probe = generic_oxygen_probe, | 873 | .probe = generic_oxygen_probe, |
874 | .remove = __devexit_p(oxygen_pci_remove), | 874 | .remove = __devexit_p(oxygen_pci_remove), |
875 | #ifdef CONFIG_PM | 875 | #ifdef CONFIG_PM_SLEEP |
876 | .driver = { | 876 | .driver = { |
877 | .pm = &oxygen_pci_pm, | 877 | .pm = &oxygen_pci_pm, |
878 | }, | 878 | }, |
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h index 7112a89fb8bd..09a24b24958b 100644 --- a/sound/pci/oxygen/oxygen.h +++ b/sound/pci/oxygen/oxygen.h | |||
@@ -161,7 +161,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, | |||
161 | ) | 161 | ) |
162 | ); | 162 | ); |
163 | void oxygen_pci_remove(struct pci_dev *pci); | 163 | void oxygen_pci_remove(struct pci_dev *pci); |
164 | #ifdef CONFIG_PM | 164 | #ifdef CONFIG_PM_SLEEP |
165 | extern const struct dev_pm_ops oxygen_pci_pm; | 165 | extern const struct dev_pm_ops oxygen_pci_pm; |
166 | #endif | 166 | #endif |
167 | void oxygen_pci_shutdown(struct pci_dev *pci); | 167 | void oxygen_pci_shutdown(struct pci_dev *pci); |
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index ab8738e21ad1..25697584b94c 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c | |||
@@ -726,7 +726,7 @@ void oxygen_pci_remove(struct pci_dev *pci) | |||
726 | } | 726 | } |
727 | EXPORT_SYMBOL(oxygen_pci_remove); | 727 | EXPORT_SYMBOL(oxygen_pci_remove); |
728 | 728 | ||
729 | #ifdef CONFIG_PM | 729 | #ifdef CONFIG_PM_SLEEP |
730 | static int oxygen_pci_suspend(struct device *dev) | 730 | static int oxygen_pci_suspend(struct device *dev) |
731 | { | 731 | { |
732 | struct pci_dev *pci = to_pci_dev(dev); | 732 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -824,7 +824,7 @@ static int oxygen_pci_resume(struct device *dev) | |||
824 | 824 | ||
825 | SIMPLE_DEV_PM_OPS(oxygen_pci_pm, oxygen_pci_suspend, oxygen_pci_resume); | 825 | SIMPLE_DEV_PM_OPS(oxygen_pci_pm, oxygen_pci_suspend, oxygen_pci_resume); |
826 | EXPORT_SYMBOL(oxygen_pci_pm); | 826 | EXPORT_SYMBOL(oxygen_pci_pm); |
827 | #endif /* CONFIG_PM */ | 827 | #endif /* CONFIG_PM_SLEEP */ |
828 | 828 | ||
829 | void oxygen_pci_shutdown(struct pci_dev *pci) | 829 | void oxygen_pci_shutdown(struct pci_dev *pci) |
830 | { | 830 | { |
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index d3b606b69f3b..3d71423b23bc 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c | |||
@@ -93,7 +93,7 @@ static struct pci_driver xonar_driver = { | |||
93 | .id_table = xonar_ids, | 93 | .id_table = xonar_ids, |
94 | .probe = xonar_probe, | 94 | .probe = xonar_probe, |
95 | .remove = __devexit_p(oxygen_pci_remove), | 95 | .remove = __devexit_p(oxygen_pci_remove), |
96 | #ifdef CONFIG_PM | 96 | #ifdef CONFIG_PM_SLEEP |
97 | .driver = { | 97 | .driver = { |
98 | .pm = &oxygen_pci_pm, | 98 | .pm = &oxygen_pci_pm, |
99 | }, | 99 | }, |
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index 760ee467cd9a..7d291542c5ba 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c | |||
@@ -464,7 +464,7 @@ struct snd_riptide { | |||
464 | 464 | ||
465 | unsigned long received_irqs; | 465 | unsigned long received_irqs; |
466 | unsigned long handled_irqs; | 466 | unsigned long handled_irqs; |
467 | #ifdef CONFIG_PM | 467 | #ifdef CONFIG_PM_SLEEP |
468 | int in_suspend; | 468 | int in_suspend; |
469 | #endif | 469 | #endif |
470 | }; | 470 | }; |
@@ -1150,7 +1150,7 @@ static void riptide_handleirq(unsigned long dev_id) | |||
1150 | } | 1150 | } |
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | #ifdef CONFIG_PM | 1153 | #ifdef CONFIG_PM_SLEEP |
1154 | static int riptide_suspend(struct device *dev) | 1154 | static int riptide_suspend(struct device *dev) |
1155 | { | 1155 | { |
1156 | struct pci_dev *pci = to_pci_dev(dev); | 1156 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -1193,7 +1193,7 @@ static SIMPLE_DEV_PM_OPS(riptide_pm, riptide_suspend, riptide_resume); | |||
1193 | #define RIPTIDE_PM_OPS &riptide_pm | 1193 | #define RIPTIDE_PM_OPS &riptide_pm |
1194 | #else | 1194 | #else |
1195 | #define RIPTIDE_PM_OPS NULL | 1195 | #define RIPTIDE_PM_OPS NULL |
1196 | #endif /* CONFIG_PM */ | 1196 | #endif /* CONFIG_PM_SLEEP */ |
1197 | 1197 | ||
1198 | static int try_to_load_firmware(struct cmdif *cif, struct snd_riptide *chip) | 1198 | static int try_to_load_firmware(struct cmdif *cif, struct snd_riptide *chip) |
1199 | { | 1199 | { |
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c index 805ab6e9a78f..51e43407ebc5 100644 --- a/sound/pci/sis7019.c +++ b/sound/pci/sis7019.c | |||
@@ -103,7 +103,7 @@ struct voice { | |||
103 | * we're not doing power management, we still need to allocate a page | 103 | * we're not doing power management, we still need to allocate a page |
104 | * for the silence buffer. | 104 | * for the silence buffer. |
105 | */ | 105 | */ |
106 | #ifdef CONFIG_PM | 106 | #ifdef CONFIG_PM_SLEEP |
107 | #define SIS_SUSPEND_PAGES 4 | 107 | #define SIS_SUSPEND_PAGES 4 |
108 | #else | 108 | #else |
109 | #define SIS_SUSPEND_PAGES 1 | 109 | #define SIS_SUSPEND_PAGES 1 |
@@ -1208,7 +1208,7 @@ static int sis_chip_init(struct sis7019 *sis) | |||
1208 | return 0; | 1208 | return 0; |
1209 | } | 1209 | } |
1210 | 1210 | ||
1211 | #ifdef CONFIG_PM | 1211 | #ifdef CONFIG_PM_SLEEP |
1212 | static int sis_suspend(struct device *dev) | 1212 | static int sis_suspend(struct device *dev) |
1213 | { | 1213 | { |
1214 | struct pci_dev *pci = to_pci_dev(dev); | 1214 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -1305,7 +1305,7 @@ static SIMPLE_DEV_PM_OPS(sis_pm, sis_suspend, sis_resume); | |||
1305 | #define SIS_PM_OPS &sis_pm | 1305 | #define SIS_PM_OPS &sis_pm |
1306 | #else | 1306 | #else |
1307 | #define SIS_PM_OPS NULL | 1307 | #define SIS_PM_OPS NULL |
1308 | #endif /* CONFIG_PM */ | 1308 | #endif /* CONFIG_PM_SLEEP */ |
1309 | 1309 | ||
1310 | static int sis_alloc_suspend(struct sis7019 *sis) | 1310 | static int sis_alloc_suspend(struct sis7019 *sis) |
1311 | { | 1311 | { |
diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c index d36e6ca147e1..8a6f1f76e870 100644 --- a/sound/pci/trident/trident.c +++ b/sound/pci/trident/trident.c | |||
@@ -177,7 +177,7 @@ static struct pci_driver trident_driver = { | |||
177 | .id_table = snd_trident_ids, | 177 | .id_table = snd_trident_ids, |
178 | .probe = snd_trident_probe, | 178 | .probe = snd_trident_probe, |
179 | .remove = __devexit_p(snd_trident_remove), | 179 | .remove = __devexit_p(snd_trident_remove), |
180 | #ifdef CONFIG_PM | 180 | #ifdef CONFIG_PM_SLEEP |
181 | .driver = { | 181 | .driver = { |
182 | .pm = &snd_trident_pm, | 182 | .pm = &snd_trident_pm, |
183 | }, | 183 | }, |
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index 94011dcae731..06b10d1a76e5 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c | |||
@@ -3919,7 +3919,7 @@ static void snd_trident_clear_voices(struct snd_trident * trident, unsigned shor | |||
3919 | } | 3919 | } |
3920 | } | 3920 | } |
3921 | 3921 | ||
3922 | #ifdef CONFIG_PM | 3922 | #ifdef CONFIG_PM_SLEEP |
3923 | static int snd_trident_suspend(struct device *dev) | 3923 | static int snd_trident_suspend(struct device *dev) |
3924 | { | 3924 | { |
3925 | struct pci_dev *pci = to_pci_dev(dev); | 3925 | struct pci_dev *pci = to_pci_dev(dev); |
@@ -3983,4 +3983,4 @@ static int snd_trident_resume(struct device *dev) | |||
3983 | } | 3983 | } |
3984 | 3984 | ||
3985 | SIMPLE_DEV_PM_OPS(snd_trident_pm, snd_trident_suspend, snd_trident_resume); | 3985 | SIMPLE_DEV_PM_OPS(snd_trident_pm, snd_trident_suspend, snd_trident_resume); |
3986 | #endif /* CONFIG_PM */ | 3986 | #endif /* CONFIG_PM_SLEEP */ |
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 0eb7245dd362..e3d32e2d574e 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -362,7 +362,7 @@ struct via82xx { | |||
362 | 362 | ||
363 | unsigned char old_legacy; | 363 | unsigned char old_legacy; |
364 | unsigned char old_legacy_cfg; | 364 | unsigned char old_legacy_cfg; |
365 | #ifdef CONFIG_PM | 365 | #ifdef CONFIG_PM_SLEEP |
366 | unsigned char legacy_saved; | 366 | unsigned char legacy_saved; |
367 | unsigned char legacy_cfg_saved; | 367 | unsigned char legacy_cfg_saved; |
368 | unsigned char spdif_ctrl_saved; | 368 | unsigned char spdif_ctrl_saved; |
@@ -2038,7 +2038,7 @@ static int __devinit snd_via686_init_misc(struct via82xx *chip) | |||
2038 | if (mpu_port >= 0x200) { /* force MIDI */ | 2038 | if (mpu_port >= 0x200) { /* force MIDI */ |
2039 | mpu_port &= 0xfffc; | 2039 | mpu_port &= 0xfffc; |
2040 | pci_write_config_dword(chip->pci, 0x18, mpu_port | 0x01); | 2040 | pci_write_config_dword(chip->pci, 0x18, mpu_port | 0x01); |
2041 | #ifdef CONFIG_PM | 2041 | #ifdef CONFIG_PM_SLEEP |
2042 | chip->mpu_port_saved = mpu_port; | 2042 | chip->mpu_port_saved = mpu_port; |
2043 | #endif | 2043 | #endif |
2044 | } else { | 2044 | } else { |
@@ -2090,7 +2090,7 @@ static int __devinit snd_via686_init_misc(struct via82xx *chip) | |||
2090 | 2090 | ||
2091 | snd_via686_create_gameport(chip, &legacy); | 2091 | snd_via686_create_gameport(chip, &legacy); |
2092 | 2092 | ||
2093 | #ifdef CONFIG_PM | 2093 | #ifdef CONFIG_PM_SLEEP |
2094 | chip->legacy_saved = legacy; | 2094 | chip->legacy_saved = legacy; |
2095 | chip->legacy_cfg_saved = legacy_cfg; | 2095 | chip->legacy_cfg_saved = legacy_cfg; |
2096 | #endif | 2096 | #endif |
@@ -2238,7 +2238,7 @@ static int snd_via82xx_chip_init(struct via82xx *chip) | |||
2238 | return 0; | 2238 | return 0; |
2239 | } | 2239 | } |
2240 | 2240 | ||
2241 | #ifdef CONFIG_PM | 2241 | #ifdef CONFIG_PM_SLEEP |
2242 | /* | 2242 | /* |
2243 | * power management | 2243 | * power management |
2244 | */ | 2244 | */ |
@@ -2313,7 +2313,7 @@ static SIMPLE_DEV_PM_OPS(snd_via82xx_pm, snd_via82xx_suspend, snd_via82xx_resume | |||
2313 | #define SND_VIA82XX_PM_OPS &snd_via82xx_pm | 2313 | #define SND_VIA82XX_PM_OPS &snd_via82xx_pm |
2314 | #else | 2314 | #else |
2315 | #define SND_VIA82XX_PM_OPS NULL | 2315 | #define SND_VIA82XX_PM_OPS NULL |
2316 | #endif /* CONFIG_PM */ | 2316 | #endif /* CONFIG_PM_SLEEP */ |
2317 | 2317 | ||
2318 | static int snd_via82xx_free(struct via82xx *chip) | 2318 | static int snd_via82xx_free(struct via82xx *chip) |
2319 | { | 2319 | { |
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c index e886bc16999d..8e0efc416f22 100644 --- a/sound/pci/via82xx_modem.c +++ b/sound/pci/via82xx_modem.c | |||
@@ -1019,7 +1019,7 @@ static int snd_via82xx_chip_init(struct via82xx_modem *chip) | |||
1019 | return 0; | 1019 | return 0; |
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | #ifdef CONFIG_PM | 1022 | #ifdef CONFIG_PM_SLEEP |
1023 | /* | 1023 | /* |
1024 | * power management | 1024 | * power management |
1025 | */ | 1025 | */ |
@@ -1076,7 +1076,7 @@ static SIMPLE_DEV_PM_OPS(snd_via82xx_pm, snd_via82xx_suspend, snd_via82xx_resume | |||
1076 | #define SND_VIA82XX_PM_OPS &snd_via82xx_pm | 1076 | #define SND_VIA82XX_PM_OPS &snd_via82xx_pm |
1077 | #else | 1077 | #else |
1078 | #define SND_VIA82XX_PM_OPS NULL | 1078 | #define SND_VIA82XX_PM_OPS NULL |
1079 | #endif /* CONFIG_PM */ | 1079 | #endif /* CONFIG_PM_SLEEP */ |
1080 | 1080 | ||
1081 | static int snd_via82xx_free(struct via82xx_modem *chip) | 1081 | static int snd_via82xx_free(struct via82xx_modem *chip) |
1082 | { | 1082 | { |
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index b89e7a86e9d8..fdfbaf857233 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c | |||
@@ -257,7 +257,7 @@ static void __devexit snd_vx222_remove(struct pci_dev *pci) | |||
257 | pci_set_drvdata(pci, NULL); | 257 | pci_set_drvdata(pci, NULL); |
258 | } | 258 | } |
259 | 259 | ||
260 | #ifdef CONFIG_PM | 260 | #ifdef CONFIG_PM_SLEEP |
261 | static int snd_vx222_suspend(struct device *dev) | 261 | static int snd_vx222_suspend(struct device *dev) |
262 | { | 262 | { |
263 | struct pci_dev *pci = to_pci_dev(dev); | 263 | struct pci_dev *pci = to_pci_dev(dev); |
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c index 4810356b97ba..e01fe34db9ec 100644 --- a/sound/pci/ymfpci/ymfpci.c +++ b/sound/pci/ymfpci/ymfpci.c | |||
@@ -355,7 +355,7 @@ static struct pci_driver ymfpci_driver = { | |||
355 | .id_table = snd_ymfpci_ids, | 355 | .id_table = snd_ymfpci_ids, |
356 | .probe = snd_card_ymfpci_probe, | 356 | .probe = snd_card_ymfpci_probe, |
357 | .remove = __devexit_p(snd_card_ymfpci_remove), | 357 | .remove = __devexit_p(snd_card_ymfpci_remove), |
358 | #ifdef CONFIG_PM | 358 | #ifdef CONFIG_PM_SLEEP |
359 | .driver = { | 359 | .driver = { |
360 | .pm = &snd_ymfpci_pm, | 360 | .pm = &snd_ymfpci_pm, |
361 | }, | 361 | }, |
diff --git a/sound/pci/ymfpci/ymfpci.h b/sound/pci/ymfpci/ymfpci.h index bddc4052286b..4631a2348915 100644 --- a/sound/pci/ymfpci/ymfpci.h +++ b/sound/pci/ymfpci/ymfpci.h | |||
@@ -363,7 +363,7 @@ struct snd_ymfpci { | |||
363 | const struct firmware *dsp_microcode; | 363 | const struct firmware *dsp_microcode; |
364 | const struct firmware *controller_microcode; | 364 | const struct firmware *controller_microcode; |
365 | 365 | ||
366 | #ifdef CONFIG_PM | 366 | #ifdef CONFIG_PM_SLEEP |
367 | u32 *saved_regs; | 367 | u32 *saved_regs; |
368 | u32 saved_ydsxgr_mode; | 368 | u32 saved_ydsxgr_mode; |
369 | u16 saved_dsxg_legacy; | 369 | u16 saved_dsxg_legacy; |
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index 62b23635b754..ee8b6366e48d 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c | |||
@@ -2242,7 +2242,7 @@ static int snd_ymfpci_free(struct snd_ymfpci *chip) | |||
2242 | pci_set_power_state(chip->pci, 3); | 2242 | pci_set_power_state(chip->pci, 3); |
2243 | #endif | 2243 | #endif |
2244 | 2244 | ||
2245 | #ifdef CONFIG_PM | 2245 | #ifdef CONFIG_PM_SLEEP |
2246 | vfree(chip->saved_regs); | 2246 | vfree(chip->saved_regs); |
2247 | #endif | 2247 | #endif |
2248 | if (chip->irq >= 0) | 2248 | if (chip->irq >= 0) |
@@ -2272,7 +2272,7 @@ static int snd_ymfpci_dev_free(struct snd_device *device) | |||
2272 | return snd_ymfpci_free(chip); | 2272 | return snd_ymfpci_free(chip); |
2273 | } | 2273 | } |
2274 | 2274 | ||
2275 | #ifdef CONFIG_PM | 2275 | #ifdef CONFIG_PM_SLEEP |
2276 | static int saved_regs_index[] = { | 2276 | static int saved_regs_index[] = { |
2277 | /* spdif */ | 2277 | /* spdif */ |
2278 | YDSXGR_SPDIFOUTCTRL, | 2278 | YDSXGR_SPDIFOUTCTRL, |
@@ -2374,7 +2374,7 @@ static int snd_ymfpci_resume(struct device *dev) | |||
2374 | } | 2374 | } |
2375 | 2375 | ||
2376 | SIMPLE_DEV_PM_OPS(snd_ymfpci_pm, snd_ymfpci_suspend, snd_ymfpci_resume); | 2376 | SIMPLE_DEV_PM_OPS(snd_ymfpci_pm, snd_ymfpci_suspend, snd_ymfpci_resume); |
2377 | #endif /* CONFIG_PM */ | 2377 | #endif /* CONFIG_PM_SLEEP */ |
2378 | 2378 | ||
2379 | int __devinit snd_ymfpci_create(struct snd_card *card, | 2379 | int __devinit snd_ymfpci_create(struct snd_card *card, |
2380 | struct pci_dev * pci, | 2380 | struct pci_dev * pci, |
@@ -2452,7 +2452,7 @@ int __devinit snd_ymfpci_create(struct snd_card *card, | |||
2452 | return err; | 2452 | return err; |
2453 | } | 2453 | } |
2454 | 2454 | ||
2455 | #ifdef CONFIG_PM | 2455 | #ifdef CONFIG_PM_SLEEP |
2456 | chip->saved_regs = vmalloc(YDSXGR_NUM_SAVED_REGS * sizeof(u32)); | 2456 | chip->saved_regs = vmalloc(YDSXGR_NUM_SAVED_REGS * sizeof(u32)); |
2457 | if (chip->saved_regs == NULL) { | 2457 | if (chip->saved_regs == NULL) { |
2458 | snd_ymfpci_free(chip); | 2458 | snd_ymfpci_free(chip); |
diff --git a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c index 56ad923bf6b5..a1d9b0792a1e 100644 --- a/sound/usb/6fire/firmware.c +++ b/sound/usb/6fire/firmware.c | |||
@@ -346,11 +346,10 @@ static int usb6fire_fw_check(u8 *version) | |||
346 | if (!memcmp(version, known_fw_versions + i, 4)) | 346 | if (!memcmp(version, known_fw_versions + i, 4)) |
347 | return 0; | 347 | return 0; |
348 | 348 | ||
349 | snd_printk(KERN_ERR PREFIX "invalid fimware version in device: " | 349 | snd_printk(KERN_ERR PREFIX "invalid fimware version in device: %*ph. " |
350 | "%02x %02x %02x %02x. " | ||
351 | "please reconnect to power. if this failure " | 350 | "please reconnect to power. if this failure " |
352 | "still happens, check your firmware installation.", | 351 | "still happens, check your firmware installation.", |
353 | version[0], version[1], version[2], version[3]); | 352 | 4, version); |
354 | return -EINVAL; | 353 | return -EINVAL; |
355 | } | 354 | } |
356 | 355 | ||