Changeset 35 for GPL/trunk/alsa-kernel/pci/ymfpci
- Timestamp:
- Dec 13, 2005, 9:08:20 PM (20 years ago)
- Location:
- GPL/trunk/alsa-kernel/pci/ymfpci
- Files:
-
- 2 edited
-
ymfpci.c (modified) (2 diffs)
-
ymfpci_main.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/pci/ymfpci/ymfpci.c
r34 r35 191 191 } 192 192 chip->fm_res = fm_res; 193 chip->mpu_res = mpu_res; 193 chip->mpu_res = mpu_res; 194 card->private_data = chip; 195 194 196 strcpy(card->driver, str); 195 197 sprintf(card->shortname, "Yamaha DS-XG (%s)", str); … … 270 272 271 273 static struct pci_driver driver = { 272 0,0,0,"Yamaha DS-XG PCI", 273 snd_ymfpci_ids, 274 snd_card_ymfpci_probe, 275 snd_card_ymfpci_remove, 276 SND_PCI_PM_CALLBACKS 274 .name = "Yamaha DS-1 PCI", 275 .id_table = snd_ymfpci_ids, 276 .probe = snd_card_ymfpci_probe, 277 .remove = snd_card_ymfpci_remove, 278 #ifdef CONFIG_PM 279 .suspend = snd_ymfpci_suspend, 280 .resume = snd_ymfpci_resume, 281 #endif 277 282 }; 283 278 284 279 285 static int __init alsa_card_ymfpci_init(void) -
GPL/trunk/alsa-kernel/pci/ymfpci/ymfpci_main.c
r34 r35 728 728 u32 status, nvoice, mode; 729 729 ymfpci_voice_t *voice; 730 #ifdef TARGET_OS2731 int fOurIrq = FALSE;732 #endif733 730 734 731 status = snd_ymfpci_readl(chip, YDSXGR_STATUS); 735 732 if (status & 0x80000000) { 736 #ifdef TARGET_OS2737 fOurIrq = TRUE;738 #endif739 733 chip->active_bank = snd_ymfpci_readl(chip, YDSXGR_CTRLSELECT) & 1; 740 734 spin_lock(&chip->voice_lock); … … 775 769 if (chip->rawmidi) 776 770 snd_mpu401_uart_interrupt(irq, chip->rawmidi->private_data, regs); 777 #ifdef TARGET_OS2778 if (fOurIrq) {779 eoi_irq(irq);780 }781 #endif //TARGET_OS2782 771 return IRQ_HANDLED; 783 772 } … … 2226 2215 #define YDSXGR_NUM_SAVED_REGS ARRAY_SIZE(saved_regs_index) 2227 2216 2228 static int snd_ymfpci_suspend(snd_card_t *card, unsigned int state) 2229 { 2230 ymfpci_t *chip = card->pm_private_data; 2217 int snd_ymfpci_suspend(struct pci_dev *pci, pm_message_t state) 2218 { 2219 struct snd_card *card = pci_get_drvdata(pci); 2220 struct snd_ymfpci *chip = card->private_data; 2231 2221 unsigned int i; 2232 2222 2223 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 2233 2224 snd_pcm_suspend_all(chip->pcm); 2234 2225 snd_pcm_suspend_all(chip->pcm2); … … 2241 2232 snd_ymfpci_writel(chip, YDSXGR_NATIVEDACOUTVOL, 0); 2242 2233 snd_ymfpci_disable_dsp(chip); 2243 return 0; 2244 } 2245 2246 static int snd_ymfpci_resume(snd_card_t *card, unsigned int state) 2247 { 2248 ymfpci_t *chip = card->pm_private_data; 2234 pci_disable_device(pci); 2235 pci_save_state(pci); 2236 return 0; 2237 } 2238 2239 int snd_ymfpci_resume(struct pci_dev *pci) 2240 { 2241 struct snd_card *card = pci_get_drvdata(pci); 2242 struct snd_ymfpci *chip = card->private_data; 2249 2243 unsigned int i; 2250 2244 2251 pci_enable_device(chip->pci); 2252 pci_set_master(chip->pci); 2253 snd_ymfpci_aclink_reset(chip->pci); 2245 pci_restore_state(pci); 2246 pci_enable_device(pci); 2247 pci_set_master(pci); 2248 snd_ymfpci_aclink_reset(pci); 2254 2249 snd_ymfpci_codec_ready(chip, 0); 2255 2250 snd_ymfpci_download_image(chip); … … 2268 2263 spin_unlock_irq(&chip->reg_lock); 2269 2264 } 2270 return 0; 2271 } 2265 snd_power_change_state(card, SNDRV_CTL_POWER_D0); 2266 return 0; 2267 } 2268 2272 2269 #endif /* CONFIG_PM */ 2273 2270 … … 2354 2351 return -ENOMEM; 2355 2352 } 2356 snd_card_set_pm_callback(card, snd_ymfpci_suspend, snd_ymfpci_resume, chip);2357 2353 #endif 2358 2359 snd_ymfpci_proc_init(card, chip);2360 2354 2361 2355 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { … … 2364 2358 } 2365 2359 2360 snd_ymfpci_proc_init(card, chip); 2361 2366 2362 snd_card_set_dev(card, &pci->dev); 2367 2363
Note:
See TracChangeset
for help on using the changeset viewer.
