Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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 <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>

authored by

Clemens Ladisch and committed by
Jaroslav Kysela
c78c950d 8992e18d

+11 -11
+1 -2
Documentation/sound/alsa/ALSA-Configuration.txt
··· 367 367 368 368 Module for C-Media CMI8338/8738/8768/8770 PCI sound cards. 369 369 370 - mpu_port - port address of MIDI interface: 370 + mpu_port - port address of MIDI interface (8338 only): 371 371 0x300,0x310,0x320,0x330 = legacy port, 372 - 1 = integrated PCI port (8738 or later), 373 372 0 = disable (default) 374 373 fm_port - port address of OPL-3 FM synthesizer (8x38 only): 375 374 0x388 = legacy port,
+7 -6
Documentation/sound/alsa/CMIPCI.txt
··· 209 209 MIDI CONTROLLER 210 210 --------------- 211 211 212 - The MPU401-UART interface is disabled as default. You need to set 213 - module option "mpu_port" with a valid I/O port address to enable the 214 - MIDI support. The valid I/O ports are 0x300, 0x310, 0x320 and 0x330. 215 - Choose the value which doesn't conflict with other cards. With 216 - CMI8738 and newer chips, you can use "mpu_port=1" to use a PCI port 217 - address that does not conflict with any other card. 212 + With CMI8338 chips, the MPU401-UART interface is disabled as default. 213 + You need to set the module option "mpu_port" to a valid I/O port address 214 + to enable MIDI support. Valid I/O ports are 0x300, 0x310, 0x320 and 215 + 0x330. Choose a value that doesn't conflict with other cards. 216 + 217 + With CMI8738 and newer chips, the MIDI interface is enabled by default 218 + and the driver automatically chooses a port address. 218 219 219 220 There is _no_ hardware wavetable function on this chip (except for 220 221 OPL3 synth below).
+3 -3
sound/pci/cmipci.c
··· 2798 2798 if (!fm_port) 2799 2799 goto disable_fm; 2800 2800 2801 - if (cm->chip_version > 33) { 2801 + if (cm->chip_version >= 39) { 2802 2802 /* first try FM regs in PCI port range */ 2803 2803 iosynth = cm->iobase + CM_REG_FM_PCI; 2804 2804 err = snd_opl3_create(cm->card, iosynth, iosynth + 2, ··· 2990 2990 return err; 2991 2991 } 2992 2992 2993 - val = 0; 2994 - if (cm->chip_version > 33 && mpu_port[dev] == 1) { 2993 + if (cm->chip_version >= 39) { 2995 2994 val = snd_cmipci_read_b(cm, CM_REG_MPU_PCI + 1); 2996 2995 if (val != 0x00 && val != 0xff) { 2997 2996 iomidi = cm->iobase + CM_REG_MPU_PCI; ··· 2998 2999 } 2999 3000 } 3000 3001 if (!integrated_midi) { 3002 + val = 0; 3001 3003 iomidi = mpu_port[dev]; 3002 3004 switch (iomidi) { 3003 3005 case 0x320: val = CM_VMPU_320; break;