Commit 1e02d6ea authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Jaroslav Kysela

[ALSA] cmipci: fix MIDI device name

Initialize card->shortname early enough so that the MIDI device can pick
it up and does not need to have a generic name.
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 56162aab
...@@ -2923,6 +2923,13 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc ...@@ -2923,6 +2923,13 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc
break; break;
} }
sprintf(card->shortname, "C-Media PCI %s", card->driver);
sprintf(card->longname, "%s (model %d) at 0x%lx, irq %i",
card->shortname,
cm->chip_version,
cm->iobase,
cm->irq);
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, cm, &ops)) < 0) { if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, cm, &ops)) < 0) {
snd_cmipci_free(cm); snd_cmipci_free(cm);
return err; return err;
...@@ -3049,15 +3056,6 @@ static int __devinit snd_cmipci_probe(struct pci_dev *pci, ...@@ -3049,15 +3056,6 @@ static int __devinit snd_cmipci_probe(struct pci_dev *pci,
} }
card->private_data = cm; card->private_data = cm;
sprintf(card->shortname, "C-Media PCI %s", card->driver);
sprintf(card->longname, "%s (model %d) at 0x%lx, irq %i",
card->shortname,
cm->chip_version,
cm->iobase,
cm->irq);
//snd_printd("%s is detected\n", card->longname);
if ((err = snd_card_register(card)) < 0) { if ((err = snd_card_register(card)) < 0) {
snd_card_free(card); snd_card_free(card);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment