X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fpci%2Fau88x0%2Fau88x0_mpu401.c;fp=sound%2Fpci%2Fau88x0%2Fau88x0_mpu401.c;h=82aec911212f650402b21d8cdbd598cb87ab17eb;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=c75d368ea0871c1790455a74c6fbd50212eee5df;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/sound/pci/au88x0/au88x0_mpu401.c b/sound/pci/au88x0/au88x0_mpu401.c index c75d368ea..82aec9112 100644 --- a/sound/pci/au88x0/au88x0_mpu401.c +++ b/sound/pci/au88x0/au88x0_mpu401.c @@ -70,6 +70,9 @@ static int __devinit snd_vortex_midi(vortex_t * vortex) temp |= (MIDI_CLOCK_DIV << 8) | ((mode >> 24) & 0xff) << 4; hwwrite(vortex->mmio, VORTEX_CTRL2, temp); hwwrite(vortex->mmio, VORTEX_MIDI_CMD, MPU401_RESET); + /* Set some kind of mode */ + if (mode) + hwwrite(vortex->mmio, VORTEX_MIDI_CMD, MPU401_ENTER_UART); /* Check if anything is OK. */ temp = hwread(vortex->mmio, VORTEX_MIDI_DATA); @@ -92,22 +95,18 @@ static int __devinit snd_vortex_midi(vortex_t * vortex) return temp; } #else - port = (unsigned long)(vortex->mmio + VORTEX_MIDI_DATA); + port = (unsigned long)(vortex->mmio + (VORTEX_MIDI_DATA >> 2)); if ((temp = snd_mpu401_uart_new(vortex->card, 0, MPU401_HW_AUREAL, port, - MPU401_INFO_INTEGRATED | MPU401_INFO_MMIO, - 0, 0, &rmidi)) != 0) { + 1, 0, 0, &rmidi)) != 0) { hwwrite(vortex->mmio, VORTEX_CTRL, (hwread(vortex->mmio, VORTEX_CTRL) & ~CTRL_MIDI_PORT) & ~CTRL_MIDI_EN); return temp; } mpu = rmidi->private_data; - mpu->cport = (unsigned long)(vortex->mmio + VORTEX_MIDI_CMD); + mpu->cport = (unsigned long)(vortex->mmio + (VORTEX_MIDI_CMD >> 2)); #endif - /* Overwrite MIDI name */ - snprintf(rmidi->name, sizeof(rmidi->name), "%s MIDI %d", CARD_NAME_SHORT , vortex->card->number); - vortex->rmidi = rmidi; return 0; }