diff options
author | Alan Horstmann <gineera@aspect135.co.uk> | 2006-04-26 18:13:59 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-06-22 21:32:47 +0200 |
commit | 3bef229e4f13790402b1387ea8147906f217a766 (patch) | |
tree | 27d4bac19a6b64c14886954b2da552321e7c08f0 /sound/pci/ice1712/ice1712.c | |
parent | [ALSA] Change seq_midi.c so client name is card, rather than port, specific (diff) | |
download | linux-3bef229e4f13790402b1387ea8147906f217a766.tar.xz linux-3bef229e4f13790402b1387ea8147906f217a766.zip |
[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/ice1712/ice1712.c')
-rw-r--r-- | sound/pci/ice1712/ice1712.c | 17 |
1 files changed, 15 insertions, 2 deletions
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, 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); |