diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-03-19 03:20:59 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:28 -0400 |
commit | db12b8e301455cf18644aa3b765ae10869eb947c (patch) | |
tree | a572f2ed562624cb06431b82a3ee4a19725763ad /sound/pci/oxygen/oxygen_lib.c | |
parent | 87eedd2fd409d5cd515ccd6fc454cef15c5fa38b (diff) |
[ALSA] oxygen: move MIDI flag to model struct
Put the flag that enables the MIDI port into the model structure instead
of passing it as a separate parameter to oxygen_pci_probe().
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen/oxygen_lib.c')
-rw-r--r-- | sound/pci/oxygen/oxygen_lib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index b7c7eb33106c..87df2b81c573 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c | |||
@@ -253,11 +253,13 @@ static void oxygen_init(struct oxygen *chip) | |||
253 | OXYGEN_DMA_A_BURST_8 | | 253 | OXYGEN_DMA_A_BURST_8 | |
254 | OXYGEN_DMA_MULTICH_BURST_8); | 254 | OXYGEN_DMA_MULTICH_BURST_8); |
255 | oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, 0); | 255 | oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, 0); |
256 | oxygen_write8_masked(chip, OXYGEN_MISC, 0, | 256 | oxygen_write8_masked(chip, OXYGEN_MISC, |
257 | chip->model->misc_flags, | ||
257 | OXYGEN_MISC_WRITE_PCI_SUBID | | 258 | OXYGEN_MISC_WRITE_PCI_SUBID | |
258 | OXYGEN_MISC_REC_C_FROM_SPDIF | | 259 | OXYGEN_MISC_REC_C_FROM_SPDIF | |
259 | OXYGEN_MISC_REC_B_FROM_AC97 | | 260 | OXYGEN_MISC_REC_B_FROM_AC97 | |
260 | OXYGEN_MISC_REC_A_FROM_MULTICH); | 261 | OXYGEN_MISC_REC_A_FROM_MULTICH | |
262 | OXYGEN_MISC_MIDI); | ||
261 | oxygen_write8(chip, OXYGEN_REC_FORMAT, | 263 | oxygen_write8(chip, OXYGEN_REC_FORMAT, |
262 | (OXYGEN_FORMAT_16 << OXYGEN_REC_FORMAT_A_SHIFT) | | 264 | (OXYGEN_FORMAT_16 << OXYGEN_REC_FORMAT_A_SHIFT) | |
263 | (OXYGEN_FORMAT_16 << OXYGEN_REC_FORMAT_B_SHIFT) | | 265 | (OXYGEN_FORMAT_16 << OXYGEN_REC_FORMAT_B_SHIFT) | |
@@ -400,7 +402,7 @@ static void oxygen_card_free(struct snd_card *card) | |||
400 | } | 402 | } |
401 | 403 | ||
402 | int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, | 404 | int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, |
403 | int midi, const struct oxygen_model *model) | 405 | const struct oxygen_model *model) |
404 | { | 406 | { |
405 | struct snd_card *card; | 407 | struct snd_card *card; |
406 | struct oxygen *chip; | 408 | struct oxygen *chip; |
@@ -472,9 +474,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, | |||
472 | if (err < 0) | 474 | if (err < 0) |
473 | goto err_card; | 475 | goto err_card; |
474 | 476 | ||
475 | oxygen_write8_masked(chip, OXYGEN_MISC, | 477 | if (model->misc_flags & OXYGEN_MISC_MIDI) { |
476 | midi ? OXYGEN_MISC_MIDI : 0, OXYGEN_MISC_MIDI); | ||
477 | if (midi) { | ||
478 | err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI, | 478 | err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI, |
479 | chip->addr + OXYGEN_MPU401, | 479 | chip->addr + OXYGEN_MPU401, |
480 | MPU401_INFO_INTEGRATED, 0, 0, | 480 | MPU401_INFO_INTEGRATED, 0, 0, |