diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-01-21 02:45:37 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 11:30:06 -0500 |
commit | 44fb7aae82b37f5bb66cb1423e2babb11d90969e (patch) | |
tree | 031a965cf320c285f811e5b3de17152984ee4abf /sound/pci/oxygen/oxygen_lib.c | |
parent | db2396d4959340dbe2b617bde3beb2268f1e3658 (diff) |
[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 <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/oxygen/oxygen_lib.c')
-rw-r--r-- | sound/pci/oxygen/oxygen_lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index bd0050b12149..b7079adc3d92 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) | |||
306 | } | 306 | } |
307 | 307 | ||
308 | int __devinit oxygen_pci_probe(struct pci_dev *pci, int index, char *id, | 308 | int __devinit oxygen_pci_probe(struct pci_dev *pci, int index, char *id, |
309 | const struct oxygen_model *model) | 309 | int midi, const struct oxygen_model *model) |
310 | { | 310 | { |
311 | struct snd_card *card; | 311 | struct snd_card *card; |
312 | struct oxygen *chip; | 312 | struct oxygen *chip; |
@@ -374,7 +374,9 @@ int __devinit oxygen_pci_probe(struct pci_dev *pci, int index, char *id, | |||
374 | if (err < 0) | 374 | if (err < 0) |
375 | goto err_card; | 375 | goto err_card; |
376 | 376 | ||
377 | if (oxygen_read8(chip, OXYGEN_MISC) & OXYGEN_MISC_MIDI) { | 377 | oxygen_write8_masked(chip, OXYGEN_MISC, |
378 | midi ? OXYGEN_MISC_MIDI : 0, OXYGEN_MISC_MIDI); | ||
379 | if (midi) { | ||
378 | err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI, | 380 | err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI, |
379 | chip->addr + OXYGEN_MPU401, | 381 | chip->addr + OXYGEN_MPU401, |
380 | MPU401_INFO_INTEGRATED, 0, 0, | 382 | MPU401_INFO_INTEGRATED, 0, 0, |