diff options
Diffstat (limited to 'sound/pci/oxygen')
-rw-r--r-- | sound/pci/oxygen/hifier.c | 2 | ||||
-rw-r--r-- | sound/pci/oxygen/oxygen.c | 3 | ||||
-rw-r--r-- | sound/pci/oxygen/oxygen.h | 3 | ||||
-rw-r--r-- | sound/pci/oxygen/oxygen_lib.c | 12 | ||||
-rw-r--r-- | sound/pci/oxygen/virtuoso.c | 3 |
5 files changed, 13 insertions, 10 deletions
diff --git a/sound/pci/oxygen/hifier.c b/sound/pci/oxygen/hifier.c index 143d83d916dc..1e54a3cd721e 100644 --- a/sound/pci/oxygen/hifier.c +++ b/sound/pci/oxygen/hifier.c | |||
@@ -181,7 +181,7 @@ static int __devinit hifier_probe(struct pci_dev *pci, | |||
181 | ++dev; | 181 | ++dev; |
182 | return -ENOENT; | 182 | return -ENOENT; |
183 | } | 183 | } |
184 | err = oxygen_pci_probe(pci, index[dev], id[dev], 0, &model_hifier); | 184 | err = oxygen_pci_probe(pci, index[dev], id[dev], &model_hifier); |
185 | if (err >= 0) | 185 | if (err >= 0) |
186 | ++dev; | 186 | ++dev; |
187 | return err; | 187 | return err; |
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c index e9031ede9621..511ef34a43ca 100644 --- a/sound/pci/oxygen/oxygen.c +++ b/sound/pci/oxygen/oxygen.c | |||
@@ -336,6 +336,7 @@ static const struct oxygen_model model_meridian = { | |||
336 | CAPTURE_1_FROM_SPDIF | | 336 | CAPTURE_1_FROM_SPDIF | |
337 | CAPTURE_2_FROM_AC97_1, | 337 | CAPTURE_2_FROM_AC97_1, |
338 | .dac_channels = 8, | 338 | .dac_channels = 8, |
339 | .misc_flags = OXYGEN_MISC_MIDI, | ||
339 | .function_flags = OXYGEN_FUNCTION_SPI | | 340 | .function_flags = OXYGEN_FUNCTION_SPI | |
340 | OXYGEN_FUNCTION_ENABLE_SPI_4_5, | 341 | OXYGEN_FUNCTION_ENABLE_SPI_4_5, |
341 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | 342 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
@@ -356,7 +357,7 @@ static int __devinit generic_oxygen_probe(struct pci_dev *pci, | |||
356 | return -ENOENT; | 357 | return -ENOENT; |
357 | } | 358 | } |
358 | is_meridian = pci_id->driver_data; | 359 | is_meridian = pci_id->driver_data; |
359 | err = oxygen_pci_probe(pci, index[dev], id[dev], is_meridian, | 360 | err = oxygen_pci_probe(pci, index[dev], id[dev], |
360 | is_meridian ? &model_meridian : &model_generic); | 361 | is_meridian ? &model_meridian : &model_generic); |
361 | if (err >= 0) | 362 | if (err >= 0) |
362 | ++dev; | 363 | ++dev; |
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h index fde995cf2edf..5103482f65e4 100644 --- a/sound/pci/oxygen/oxygen.h +++ b/sound/pci/oxygen/oxygen.h | |||
@@ -103,6 +103,7 @@ struct oxygen_model { | |||
103 | size_t model_data_size; | 103 | size_t model_data_size; |
104 | unsigned int pcm_dev_cfg; | 104 | unsigned int pcm_dev_cfg; |
105 | u8 dac_channels; | 105 | u8 dac_channels; |
106 | u8 misc_flags; | ||
106 | u8 function_flags; | 107 | u8 function_flags; |
107 | u16 dac_i2s_format; | 108 | u16 dac_i2s_format; |
108 | u16 adc_i2s_format; | 109 | u16 adc_i2s_format; |
@@ -110,7 +111,7 @@ struct oxygen_model { | |||
110 | 111 | ||
111 | /* oxygen_lib.c */ | 112 | /* oxygen_lib.c */ |
112 | 113 | ||
113 | int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, int midi, | 114 | int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, |
114 | const struct oxygen_model *model); | 115 | const struct oxygen_model *model); |
115 | void oxygen_pci_remove(struct pci_dev *pci); | 116 | void oxygen_pci_remove(struct pci_dev *pci); |
116 | 117 | ||
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, |
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index 5bf3661ab1fe..fa79db696e2d 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c | |||
@@ -353,6 +353,7 @@ static const struct oxygen_model model_xonar = { | |||
353 | CAPTURE_0_FROM_I2S_2 | | 353 | CAPTURE_0_FROM_I2S_2 | |
354 | CAPTURE_1_FROM_SPDIF, | 354 | CAPTURE_1_FROM_SPDIF, |
355 | .dac_channels = 8, | 355 | .dac_channels = 8, |
356 | .misc_flags = OXYGEN_MISC_MIDI, | ||
356 | .function_flags = OXYGEN_FUNCTION_SPI | | 357 | .function_flags = OXYGEN_FUNCTION_SPI | |
357 | OXYGEN_FUNCTION_ENABLE_SPI_4_5, | 358 | OXYGEN_FUNCTION_ENABLE_SPI_4_5, |
358 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | 359 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
@@ -371,7 +372,7 @@ static int __devinit xonar_probe(struct pci_dev *pci, | |||
371 | ++dev; | 372 | ++dev; |
372 | return -ENOENT; | 373 | return -ENOENT; |
373 | } | 374 | } |
374 | err = oxygen_pci_probe(pci, index[dev], id[dev], 1, &model_xonar); | 375 | err = oxygen_pci_probe(pci, index[dev], id[dev], &model_xonar); |
375 | if (err >= 0) | 376 | if (err >= 0) |
376 | ++dev; | 377 | ++dev; |
377 | return err; | 378 | return err; |