From 44fb7aae82b37f5bb66cb1423e2babb11d90969e Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 21 Jan 2008 08:45:37 +0100 Subject: [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 Signed-off-by: Jaroslav Kysela --- sound/pci/oxygen/oxygen_lib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sound/pci/oxygen/oxygen_lib.c') diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index bd0050b1214..b7079adc3d9 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, -- cgit v1.2.3