aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/opl3sa2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/opl3sa2.c')
-rw-r--r--sound/isa/opl3sa2.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index e81cbe86823a..949fee5cd070 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -133,7 +133,7 @@ struct snd_opl3sa2 {
133 spinlock_t reg_lock; 133 spinlock_t reg_lock;
134 struct snd_hwdep *synth; 134 struct snd_hwdep *synth;
135 struct snd_rawmidi *rmidi; 135 struct snd_rawmidi *rmidi;
136 struct snd_cs4231 *cs4231; 136 struct snd_wss *wss;
137 unsigned char ctlregs[0x20]; 137 unsigned char ctlregs[0x20];
138 int ymode; /* SL added */ 138 int ymode; /* SL added */
139 struct snd_kcontrol *master_switch; 139 struct snd_kcontrol *master_switch;
@@ -318,7 +318,7 @@ static irqreturn_t snd_opl3sa2_interrupt(int irq, void *dev_id)
318 318
319 if (status & 0x07) { /* TI,CI,PI */ 319 if (status & 0x07) { /* TI,CI,PI */
320 handled = 1; 320 handled = 1;
321 snd_cs4231_interrupt(irq, chip->cs4231); 321 snd_wss_interrupt(irq, chip->wss);
322 } 322 }
323 323
324 if (status & 0x40) { /* hardware volume change */ 324 if (status & 0x40) { /* hardware volume change */
@@ -573,7 +573,7 @@ static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state)
573 struct snd_opl3sa2 *chip = card->private_data; 573 struct snd_opl3sa2 *chip = card->private_data;
574 574
575 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 575 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
576 chip->cs4231->suspend(chip->cs4231); 576 chip->wss->suspend(chip->wss);
577 /* power down */ 577 /* power down */
578 snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); 578 snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3);
579 579
@@ -597,8 +597,8 @@ static int snd_opl3sa2_resume(struct snd_card *card)
597 for (i = 0x12; i <= 0x16; i++) 597 for (i = 0x12; i <= 0x16; i++)
598 snd_opl3sa2_write(chip, i, chip->ctlregs[i]); 598 snd_opl3sa2_write(chip, i, chip->ctlregs[i]);
599 } 599 }
600 /* restore cs4231 */ 600 /* restore wss */
601 chip->cs4231->resume(chip->cs4231); 601 chip->wss->resume(chip->wss);
602 602
603 snd_power_change_state(card, SNDRV_CTL_POWER_D0); 603 snd_power_change_state(card, SNDRV_CTL_POWER_D0);
604 return 0; 604 return 0;
@@ -659,7 +659,7 @@ static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev)
659{ 659{
660 int xirq, xdma1, xdma2; 660 int xirq, xdma1, xdma2;
661 struct snd_opl3sa2 *chip; 661 struct snd_opl3sa2 *chip;
662 struct snd_cs4231 *cs4231; 662 struct snd_wss *wss;
663 struct snd_opl3 *opl3; 663 struct snd_opl3 *opl3;
664 int err; 664 int err;
665 665
@@ -679,23 +679,25 @@ static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev)
679 return -ENODEV; 679 return -ENODEV;
680 } 680 }
681 chip->irq = xirq; 681 chip->irq = xirq;
682 if ((err = snd_cs4231_create(card, 682 err = snd_wss_create(card,
683 wss_port[dev] + 4, -1, 683 wss_port[dev] + 4, -1,
684 xirq, xdma1, xdma2, 684 xirq, xdma1, xdma2,
685 CS4231_HW_OPL3SA2, 685 WSS_HW_OPL3SA2, WSS_HWSHARE_IRQ, &wss);
686 CS4231_HWSHARE_IRQ, 686 if (err < 0) {
687 &cs4231)) < 0) {
688 snd_printd("Oops, WSS not detected at 0x%lx\n", wss_port[dev] + 4); 687 snd_printd("Oops, WSS not detected at 0x%lx\n", wss_port[dev] + 4);
689 return err; 688 return err;
690 } 689 }
691 chip->cs4231 = cs4231; 690 chip->wss = wss;
692 if ((err = snd_cs4231_pcm(cs4231, 0, NULL)) < 0) 691 err = snd_wss_pcm(wss, 0, NULL);
692 if (err < 0)
693 return err; 693 return err;
694 if ((err = snd_cs4231_mixer(cs4231)) < 0) 694 err = snd_wss_mixer(wss);
695 if (err < 0)
695 return err; 696 return err;
696 if ((err = snd_opl3sa2_mixer(chip)) < 0) 697 if ((err = snd_opl3sa2_mixer(chip)) < 0)
697 return err; 698 return err;
698 if ((err = snd_cs4231_timer(cs4231, 0, NULL)) < 0) 699 err = snd_wss_timer(wss, 0, NULL);
700 if (err < 0)
699 return err; 701 return err;
700 if (fm_port[dev] >= 0x340 && fm_port[dev] < 0x400) { 702 if (fm_port[dev] >= 0x340 && fm_port[dev] < 0x400) {
701 if ((err = snd_opl3_create(card, fm_port[dev], 703 if ((err = snd_opl3_create(card, fm_port[dev],