Changeset 426 for GPL/trunk/alsa-kernel/isa/opl3sa2.c
- Timestamp:
- May 9, 2009, 11:45:26 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/isa/opl3sa2.c
r410 r426 184 184 #if 0 185 185 outb(0x1d, port); /* password */ 186 printk( "read [0x%lx] = 0x%x\n", port, inb(port));186 printk(KERN_DEBUG "read [0x%lx] = 0x%x\n", port, inb(port)); 187 187 #endif 188 188 outb(reg, chip->port); /* register */ 189 189 result = inb(chip->port + 1); 190 190 #if 0 191 printk("read [0x%lx] = 0x%x [0x%x]\n", port, result, inb(port)); 191 printk(KERN_DEBUG "read [0x%lx] = 0x%x [0x%x]\n", 192 port, result, inb(port)); 192 193 #endif 193 194 return result; … … 238 239 return -EBUSY; 239 240 } 240 // snd_printk("REG 0A = 0x%x\n", snd_opl3sa2_read(chip, 0x0a)); 241 /* 242 snd_printk(KERN_DEBUG "REG 0A = 0x%x\n", 243 snd_opl3sa2_read(chip, 0x0a)); 244 */ 241 245 chip->version = 0; 242 246 tmp = snd_opl3sa2_read(chip, OPL3SA2_MISC); … … 482 486 OPL3SA2_SINGLE_TLV("Mic Playback Volume", 0, 0x09, 0, 31, 1, 483 487 db_scale_5bit_12db_max), 488 OPL3SA2_SINGLE("ZV Port Switch", 0, 0x02, 0, 1, 0), 484 489 }; 485 490 … … 555 560 static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state) 556 561 { 557 struct snd_opl3sa2 *chip = card->private_data; 558 559 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 560 chip->wss->suspend(chip->wss); 561 /* power down */ 562 snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); 562 if (card) { 563 struct snd_opl3sa2 *chip = card->private_data; 564 565 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 566 chip->wss->suspend(chip->wss); 567 /* power down */ 568 snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); 569 } 563 570 564 571 return 0; … … 567 574 static int snd_opl3sa2_resume(struct snd_card *card) 568 575 { 569 struct snd_opl3sa2 *chip = card->private_data;576 struct snd_opl3sa2 *chip; 570 577 int i; 571 578 579 if (!card) 580 return 0; 581 582 chip = card->private_data; 572 583 /* power up */ 573 584 snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D0); … … 618 629 struct snd_opl3sa2 *chip = card->private_data; 619 630 if (chip->irq >= 0) 620 free_irq(chip->irq, (void *)chip);631 free_irq(chip->irq, card); 621 632 release_and_free_resource(chip->res_port); 622 633 } … … 633 644 return err; 634 645 strcpy(card->driver, "OPL3SA2"); 635 strcpy(card->shortname, "Yamaha OPL3-SA 2");646 strcpy(card->shortname, "Yamaha OPL3-SA"); 636 647 chip = card->private_data; 637 648 spin_lock_init(&chip->reg_lock);
Note:
See TracChangeset
for help on using the changeset viewer.