aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorAlan Horstmann <gineera@aspect135.co.uk>2006-04-26 12:13:59 -0400
committerJaroslav Kysela <perex@suse.cz>2006-06-22 15:32:47 -0400
commit3bef229e4f13790402b1387ea8147906f217a766 (patch)
tree27d4bac19a6b64c14886954b2da552321e7c08f0 /sound/pci
parent78fc030bdbbeebdea436f2b02a616d67e5f9bd9b (diff)
[ALSA] ice1712 - Provides specified midi port names instead of defaults
Patch provides for the ice1712 card driver to overwrite the midi port name string given by default in mpu401_uart, with one specified in snd_ice1712_card_info. Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/ice1712/ews.c2
-rw-r--r--sound/pci/ice1712/ice1712.c17
-rw-r--r--sound/pci/ice1712/ice1712.h2
3 files changed, 19 insertions, 2 deletions
diff --git a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c
index 2c529e741384..2e1cf1120582 100644
--- a/sound/pci/ice1712/ews.c
+++ b/sound/pci/ice1712/ews.c
@@ -1031,6 +1031,8 @@ struct snd_ice1712_card_info snd_ice1712_ews_cards[] __devinitdata = {
1031 .model = "dmx6fire", 1031 .model = "dmx6fire",
1032 .chip_init = snd_ice1712_ews_init, 1032 .chip_init = snd_ice1712_ews_init,
1033 .build_controls = snd_ice1712_ews_add_controls, 1033 .build_controls = snd_ice1712_ews_add_controls,
1034 .mpu401_1_name = "MIDI-Front DMX6fire",
1035 .mpu401_2_name = "Wavetable DMX6fire",
1034 }, 1036 },
1035 { } /* terminator */ 1037 { } /* terminator */
1036}; 1038};
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index c56793b381e2..2821014b26e9 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -2743,8 +2743,14 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
2743 snd_card_free(card); 2743 snd_card_free(card);
2744 return err; 2744 return err;
2745 } 2745 }
2746 2746 if (c->mpu401_1_name)
2747 if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) 2747 /* Prefered name available in card_info */
2748 snprintf(ice->rmidi[0]->name,
2749 sizeof(ice->rmidi[0]->name),
2750 "%s %d", c->mpu401_1_name, card->number);
2751
2752 if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) {
2753 /* 2nd port used */
2748 if ((err = snd_mpu401_uart_new(card, 1, MPU401_HW_ICE1712, 2754 if ((err = snd_mpu401_uart_new(card, 1, MPU401_HW_ICE1712,
2749 ICEREG(ice, MPU2_CTRL), 1, 2755 ICEREG(ice, MPU2_CTRL), 1,
2750 ice->irq, 0, 2756 ice->irq, 0,
@@ -2752,6 +2758,13 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
2752 snd_card_free(card); 2758 snd_card_free(card);
2753 return err; 2759 return err;
2754 } 2760 }
2761 if (c->mpu401_2_name)
2762 /* Prefered name available in card_info */
2763 snprintf(ice->rmidi[1]->name,
2764 sizeof(ice->rmidi[1]->name),
2765 "%s %d", c->mpu401_2_name,
2766 card->number);
2767 }
2755 } 2768 }
2756 2769
2757 snd_ice1712_set_input_clock_source(ice, 0); 2770 snd_ice1712_set_input_clock_source(ice, 0);
diff --git a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h
index 053f8e56fd68..d4776319a0cd 100644
--- a/sound/pci/ice1712/ice1712.h
+++ b/sound/pci/ice1712/ice1712.h
@@ -495,6 +495,8 @@ struct snd_ice1712_card_info {
495 int (*chip_init)(struct snd_ice1712 *); 495 int (*chip_init)(struct snd_ice1712 *);
496 int (*build_controls)(struct snd_ice1712 *); 496 int (*build_controls)(struct snd_ice1712 *);
497 unsigned int no_mpu401: 1; 497 unsigned int no_mpu401: 1;
498 const char *mpu401_1_name;
499 const char *mpu401_2_name;
498 unsigned int eeprom_size; 500 unsigned int eeprom_size;
499 unsigned char *eeprom_data; 501 unsigned char *eeprom_data;
500}; 502};