From 5b1b9bb2827dde0ee3139fee1ea0712855ac9b09 Mon Sep 17 00:00:00 2001 From: Alan Horstmann Date: Wed, 26 Apr 2006 18:13:59 +0200 Subject: [PATCH] --- yaml --- r: 28461 b: refs/heads/master c: 3bef229e4f13790402b1387ea8147906f217a766 h: refs/heads/master i: 28459: 4e669265d3969e6c4c8f4704934ee9014e7beee1 v: v3 --- [refs] | 2 +- trunk/sound/pci/ice1712/ews.c | 2 ++ trunk/sound/pci/ice1712/ice1712.c | 17 +++++++++++++++-- trunk/sound/pci/ice1712/ice1712.h | 2 ++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index fa93ab699b73..21d6e97b2e7e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 78fc030bdbbeebdea436f2b02a616d67e5f9bd9b +refs/heads/master: 3bef229e4f13790402b1387ea8147906f217a766 diff --git a/trunk/sound/pci/ice1712/ews.c b/trunk/sound/pci/ice1712/ews.c index 2c529e741384..2e1cf1120582 100644 --- a/trunk/sound/pci/ice1712/ews.c +++ b/trunk/sound/pci/ice1712/ews.c @@ -1031,6 +1031,8 @@ struct snd_ice1712_card_info snd_ice1712_ews_cards[] __devinitdata = { .model = "dmx6fire", .chip_init = snd_ice1712_ews_init, .build_controls = snd_ice1712_ews_add_controls, + .mpu401_1_name = "MIDI-Front DMX6fire", + .mpu401_2_name = "Wavetable DMX6fire", }, { } /* terminator */ }; diff --git a/trunk/sound/pci/ice1712/ice1712.c b/trunk/sound/pci/ice1712/ice1712.c index c56793b381e2..2821014b26e9 100644 --- a/trunk/sound/pci/ice1712/ice1712.c +++ b/trunk/sound/pci/ice1712/ice1712.c @@ -2743,8 +2743,14 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, snd_card_free(card); return err; } - - if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) + if (c->mpu401_1_name) + /* Prefered name available in card_info */ + snprintf(ice->rmidi[0]->name, + sizeof(ice->rmidi[0]->name), + "%s %d", c->mpu401_1_name, card->number); + + if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) { + /* 2nd port used */ if ((err = snd_mpu401_uart_new(card, 1, MPU401_HW_ICE1712, ICEREG(ice, MPU2_CTRL), 1, ice->irq, 0, @@ -2752,6 +2758,13 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, snd_card_free(card); return err; } + if (c->mpu401_2_name) + /* Prefered name available in card_info */ + snprintf(ice->rmidi[1]->name, + sizeof(ice->rmidi[1]->name), + "%s %d", c->mpu401_2_name, + card->number); + } } snd_ice1712_set_input_clock_source(ice, 0); diff --git a/trunk/sound/pci/ice1712/ice1712.h b/trunk/sound/pci/ice1712/ice1712.h index 053f8e56fd68..d4776319a0cd 100644 --- a/trunk/sound/pci/ice1712/ice1712.h +++ b/trunk/sound/pci/ice1712/ice1712.h @@ -495,6 +495,8 @@ struct snd_ice1712_card_info { int (*chip_init)(struct snd_ice1712 *); int (*build_controls)(struct snd_ice1712 *); unsigned int no_mpu401: 1; + const char *mpu401_1_name; + const char *mpu401_2_name; unsigned int eeprom_size; unsigned char *eeprom_data; };