Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=44fb7aae82b37f5bb66cb1423e2babb11d90969e
Commit:     44fb7aae82b37f5bb66cb1423e2babb11d90969e
Parent:     db2396d4959340dbe2b617bde3beb2268f1e3658
Author:     Clemens Ladisch <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 21 08:45:37 2008 +0100
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Thu Jan 31 17:30:06 2008 +0100

    [ALSA] oxygen: remove MIDI autodetection
    
    The MIDI bit in the MISC register is set by default and cannot be used
    to detect the presence of a MIDI port.  Instead, add a parameter to the
    oxygen_pci_probe() function so that model drivers can specify this.
    
    Signed-off-by: Clemens Ladisch <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/oxygen/oxygen.c     |    2 +-
 sound/pci/oxygen/oxygen.h     |    2 +-
 sound/pci/oxygen/oxygen_lib.c |    6 ++++--
 sound/pci/oxygen/virtuoso.c   |    2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index e0e54ab..b11341f 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -327,7 +327,7 @@ static int __devinit generic_oxygen_probe(struct pci_dev 
*pci,
                return -ENOENT;
        }
        model = pci_id->driver_data ? &model_meridian : &model_generic;
-       err = oxygen_pci_probe(pci, index[dev], id[dev], model);
+       err = oxygen_pci_probe(pci, index[dev], id[dev], 1, model);
        if (err >= 0)
                ++dev;
        return err;
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h
index 98cccc6..1c402cb 100644
--- a/sound/pci/oxygen/oxygen.h
+++ b/sound/pci/oxygen/oxygen.h
@@ -92,7 +92,7 @@ struct oxygen_model {
 
 /* oxygen_lib.c */
 
-int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
+int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, int midi,
                     const struct oxygen_model *model);
 void oxygen_pci_remove(struct pci_dev *pci);
 
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index bd0050b..b7079ad 100644
--- a/sound/pci/oxygen/oxygen_lib.c
+++ b/sound/pci/oxygen/oxygen_lib.c
@@ -306,7 +306,7 @@ static void oxygen_card_free(struct snd_card *card)
 }
 
 int __devinit oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
-                              const struct oxygen_model *model)
+                              int midi, const struct oxygen_model *model)
 {
        struct snd_card *card;
        struct oxygen *chip;
@@ -374,7 +374,9 @@ int __devinit oxygen_pci_probe(struct pci_dev *pci, int 
index, char *id,
        if (err < 0)
                goto err_card;
 
-       if (oxygen_read8(chip, OXYGEN_MISC) & OXYGEN_MISC_MIDI) {
+       oxygen_write8_masked(chip, OXYGEN_MISC,
+                            midi ? OXYGEN_MISC_MIDI : 0, OXYGEN_MISC_MIDI);
+       if (midi) {
                err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI,
                                          chip->addr + OXYGEN_MPU401,
                                          MPU401_INFO_INTEGRATED, 0, 0,
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c
index 1a0367b..7397571 100644
--- a/sound/pci/oxygen/virtuoso.c
+++ b/sound/pci/oxygen/virtuoso.c
@@ -266,7 +266,7 @@ static int __devinit xonar_probe(struct pci_dev *pci,
                ++dev;
                return -ENOENT;
        }
-       err = oxygen_pci_probe(pci, index[dev], id[dev], &model_xonar);
+       err = oxygen_pci_probe(pci, index[dev], id[dev], 1, &model_xonar);
        if (err >= 0)
                ++dev;
        return err;
-
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