aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen_lib.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-09-22 03:03:42 -0400
committerClemens Ladisch <clemens@ladisch.de>2008-09-22 03:03:42 -0400
commitdbbbd6744439d95d2b0dc23c5cdca2c477377f76 (patch)
tree6a149c7dbc7d0889cf8c348be2618210661bea84 /sound/pci/oxygen/oxygen_lib.c
parentd76596b1ee7f5cdbd0b73d374ba72372a2c8b725 (diff)
ALSA: oxygen: configure MIDI via device_config
To enable the MIDI port, model drivers must now set flags in device_config, not only in misc_flags. This allows model drivers to enable the UART without creating an ALSA MIDI device. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/pci/oxygen/oxygen_lib.c')
-rw-r--r--sound/pci/oxygen/oxygen_lib.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index 02191c6a4e7b..b1997216b4af 100644
--- a/sound/pci/oxygen/oxygen_lib.c
+++ b/sound/pci/oxygen/oxygen_lib.c
@@ -502,10 +502,15 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
502 if (err < 0) 502 if (err < 0)
503 goto err_card; 503 goto err_card;
504 504
505 if (chip->model.misc_flags & OXYGEN_MISC_MIDI) { 505 if (chip->model.device_config & (MIDI_OUTPUT | MIDI_INPUT)) {
506 unsigned int info_flags = MPU401_INFO_INTEGRATED;
507 if (chip->model.device_config & MIDI_OUTPUT)
508 info_flags |= MPU401_INFO_OUTPUT;
509 if (chip->model.device_config & MIDI_INPUT)
510 info_flags |= MPU401_INFO_INPUT;
506 err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI, 511 err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI,
507 chip->addr + OXYGEN_MPU401, 512 chip->addr + OXYGEN_MPU401,
508 MPU401_INFO_INTEGRATED, 0, 0, 513 info_flags, 0, 0,
509 &chip->midi); 514 &chip->midi);
510 if (err < 0) 515 if (err < 0)
511 goto err_card; 516 goto err_card;