From c78c950d28df984e39ad028a90bcdadcd3eda3b6 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 3 Sep 2007 09:55:49 +0200 Subject: [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: Clemens Ladisch Signed-off-by: Jaroslav Kysela --- Documentation/sound/alsa/ALSA-Configuration.txt | 3 +-- Documentation/sound/alsa/CMIPCI.txt | 13 +++++++------ sound/pci/cmipci.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 38e775629c12..96bf25ccc1c5 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -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, diff --git a/Documentation/sound/alsa/CMIPCI.txt b/Documentation/sound/alsa/CMIPCI.txt index 664be46566b8..16935c8561f7 100644 --- a/Documentation/sound/alsa/CMIPCI.txt +++ b/Documentation/sound/alsa/CMIPCI.txt @@ -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). diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index af266eb83059..fdc4615ea0e7 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c @@ -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; -- cgit v1.2.3