aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2007-09-03 03:56:23 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:59:45 -0400
commit88039815d8868fb507eb69448f5a3a65c90b0bf2 (patch)
treec2acd01aac77c96933c15502fcf9fef28e19f1d7
parentc78c950d28df984e39ad028a90bcdadcd3eda3b6 (diff)
[ALSA] cmipci: check that the legacy MIDI port works
Check that the UART_EN bit actually enabled the MPU-401 port. Apparently, C-Media thinks that it is a good idea to be paranoid here. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r--sound/pci/cmipci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index fdc4615ea0e7..9149d00d1ad5 100644
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -3012,6 +3012,13 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc
3012 snd_cmipci_write(cm, CM_REG_LEGACY_CTRL, val); 3012 snd_cmipci_write(cm, CM_REG_LEGACY_CTRL, val);
3013 /* enable UART */ 3013 /* enable UART */
3014 snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_UART_EN); 3014 snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_UART_EN);
3015 if (inb(iomidi + 1) == 0xff) {
3016 snd_printk(KERN_ERR "cannot enable MPU-401 port"
3017 " at %#lx\n", iomidi);
3018 snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1,
3019 CM_UART_EN);
3020 iomidi = 0;
3021 }
3015 } 3022 }
3016 } 3023 }
3017 3024