Update of /cvsroot/alsa/alsa-kernel/isa
In directory usw-pr-cvs1:/tmp/cvs-serv7489
Modified Files:
es18xx.c
Log Message:
fixed the detection and initialization of opl3 and mpu401.
Index: es18xx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/isa/es18xx.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- es18xx.c 13 Aug 2002 16:13:37 -0000 1.18
+++ es18xx.c 14 Oct 2002 10:10:58 -0000 1.19
@@ -1311,12 +1311,12 @@
if (chip->caps & ES18XX_CONTROL) {
/* Hardware volume IRQ */
snd_es18xx_config_write(chip, 0x27, chip->irq);
- if (chip->fm_port > SNDRV_AUTO_PORT) {
+ if (chip->fm_port > 0 && chip->fm_port != SNDRV_AUTO_PORT) {
/* FM I/O */
snd_es18xx_config_write(chip, 0x62, chip->fm_port >> 8);
snd_es18xx_config_write(chip, 0x63, chip->fm_port & 0xff);
}
- if (chip->mpu_port > SNDRV_AUTO_PORT) {
+ if (chip->mpu_port > 0 && chip->mpu_port != SNDRV_AUTO_PORT) {
/* MPU-401 I/O */
snd_es18xx_config_write(chip, 0x64, chip->mpu_port >> 8);
snd_es18xx_config_write(chip, 0x65, chip->mpu_port & 0xff);
@@ -1404,7 +1404,7 @@
snd_es18xx_mixer_write(chip, 0x7A, 0x68);
/* Enable and set hardware volume interrupt */
snd_es18xx_mixer_write(chip, 0x64, 0x06);
- if (chip->mpu_port > SNDRV_AUTO_PORT) {
+ if (chip->mpu_port > 0 && chip->mpu_port != SNDRV_AUTO_PORT) {
/* MPU401 share irq with audio
Joystick enabled
FM enabled */
@@ -2040,7 +2040,7 @@
/* skip csn and logdev initialization - already done in isapnp_configure */
isapnp_cfg_begin(pdev->bus->number, pdev->devfn);
isapnp_write_byte(0x27, pdev->irq_resource[0].start); /* Hardware Volume IRQ
Number */
- if (snd_mpu_port[dev] > SNDRV_AUTO_PORT)
+ if (snd_mpu_port[dev] != SNDRV_AUTO_PORT)
isapnp_write_byte(0x28, pdev->irq); /* MPU-401 IRQ Number
*/
isapnp_write_byte(0x72, pdev->irq_resource[0].start); /* second IRQ */
isapnp_cfg_end();
@@ -2147,16 +2147,18 @@
return err;
}
- if (snd_opl3_create(card, chip->fm_port, chip->fm_port + 2, OPL3_HW_OPL3, 0,
&opl3) < 0) {
- printk(KERN_ERR PFX "opl3 not detected at 0x%lx\n", chip->port);
- } else {
- if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
- snd_card_free(card);
- return err;
+ if (snd_fm_port[dev] > 0 && snd_fm_port[dev] != SNDRV_AUTO_PORT) {
+ if (snd_opl3_create(card, chip->fm_port, chip->fm_port + 2,
+OPL3_HW_OPL3, 0, &opl3) < 0) {
+ printk(KERN_ERR PFX "opl3 not detected at 0x%lx\n",
+chip->fm_port);
+ } else {
+ if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
+ snd_card_free(card);
+ return err;
+ }
}
}
- if (snd_mpu_port[dev] != SNDRV_AUTO_PORT) {
+ if (snd_mpu_port[dev] > 0 && snd_mpu_port[dev] != SNDRV_AUTO_PORT) {
if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES18XX,
chip->mpu_port, 0,
irq, 0,
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog