Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=88039815d8868fb507eb69448f5a3a65c90b0bf2
Commit:     88039815d8868fb507eb69448f5a3a65c90b0bf2
Parent:     c78c950d28df984e39ad028a90bcdadcd3eda3b6
Author:     Clemens Ladisch <[EMAIL PROTECTED]>
AuthorDate: Mon Sep 3 09:56:23 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 15:59:45 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/cmipci.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index fdc4615..9149d00 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
                        snd_cmipci_write(cm, CM_REG_LEGACY_CTRL, val);
                        /* enable UART */
                        snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_UART_EN);
+                       if (inb(iomidi + 1) == 0xff) {
+                               snd_printk(KERN_ERR "cannot enable MPU-401 port"
+                                          " at %#lx\n", iomidi);
+                               snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1,
+                                                    CM_UART_EN);
+                               iomidi = 0;
+                       }
                }
        }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to