Commit c78c950d authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Jaroslav Kysela

[ALSA] cmipci: do not check for integrated FM/MIDI ports with chip version 37

Integrated MPU-401/OPL3 ports are available with chip version 39 and
later, so we do not test for the port with version 37.
Now that the test is known to work, we can again enable the MIDI port by
default.
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 8992e18d
......@@ -367,9 +367,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for C-Media CMI8338/8738/8768/8770 PCI sound cards.
mpu_port - port address of MIDI interface:
mpu_port - port address of MIDI interface (8338 only):
0x300,0x310,0x320,0x330 = legacy port,
1 = integrated PCI port (8738 or later),
0 = disable (default)
fm_port - port address of OPL-3 FM synthesizer (8x38 only):
0x388 = legacy port,
......
......@@ -209,12 +209,13 @@ In addition to the standard SB mixer, CM8x38 provides more functions.
MIDI CONTROLLER
---------------
The MPU401-UART interface is disabled as default. You need to set
module option "mpu_port" with a valid I/O port address to enable the
MIDI support. The valid I/O ports are 0x300, 0x310, 0x320 and 0x330.
Choose the value which doesn't conflict with other cards. With
CMI8738 and newer chips, you can use "mpu_port=1" to use a PCI port
address that does not conflict with any other card.
With CMI8338 chips, the MPU401-UART interface is disabled as default.
You need to set the module option "mpu_port" to a valid I/O port address
to enable MIDI support. Valid I/O ports are 0x300, 0x310, 0x320 and
0x330. Choose a value that doesn't conflict with other cards.
With CMI8738 and newer chips, the MIDI interface is enabled by default
and the driver automatically chooses a port address.
There is _no_ hardware wavetable function on this chip (except for
OPL3 synth below).
......
......@@ -2798,7 +2798,7 @@ static int __devinit snd_cmipci_create_fm(struct cmipci *cm, long fm_port)
if (!fm_port)
goto disable_fm;
if (cm->chip_version > 33) {
if (cm->chip_version >= 39) {
/* first try FM regs in PCI port range */
iosynth = cm->iobase + CM_REG_FM_PCI;
err = snd_opl3_create(cm->card, iosynth, iosynth + 2,
......@@ -2990,8 +2990,7 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc
return err;
}
val = 0;
if (cm->chip_version > 33 && mpu_port[dev] == 1) {
if (cm->chip_version >= 39) {
val = snd_cmipci_read_b(cm, CM_REG_MPU_PCI + 1);
if (val != 0x00 && val != 0xff) {
iomidi = cm->iobase + CM_REG_MPU_PCI;
......@@ -2999,6 +2998,7 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc
}
}
if (!integrated_midi) {
val = 0;
iomidi = mpu_port[dev];
switch (iomidi) {
case 0x320: val = CM_VMPU_320; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment