diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2007-08-21 02:58:35 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:59:20 -0400 |
commit | 1e02d6ea85e5ca3a8c49a7e2ef1656bfba902fc9 (patch) | |
tree | 8ac3bfe76293f5300cdb103b77911d0e9aacd162 /sound/pci/cmipci.c | |
parent | 56162aabb2fb8b9f4a8266feb7eb4edd9d1a4d49 (diff) |
[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: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/cmipci.c')
-rw-r--r-- | sound/pci/cmipci.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index f38054ead176..c42c51647df7 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -2923,6 +2923,13 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc | |||
2923 | break; | 2923 | break; |
2924 | } | 2924 | } |
2925 | 2925 | ||
2926 | sprintf(card->shortname, "C-Media PCI %s", card->driver); | ||
2927 | sprintf(card->longname, "%s (model %d) at 0x%lx, irq %i", | ||
2928 | card->shortname, | ||
2929 | cm->chip_version, | ||
2930 | cm->iobase, | ||
2931 | cm->irq); | ||
2932 | |||
2926 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, cm, &ops)) < 0) { | 2933 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, cm, &ops)) < 0) { |
2927 | snd_cmipci_free(cm); | 2934 | snd_cmipci_free(cm); |
2928 | return err; | 2935 | return err; |
@@ -3049,15 +3056,6 @@ static int __devinit snd_cmipci_probe(struct pci_dev *pci, | |||
3049 | } | 3056 | } |
3050 | card->private_data = cm; | 3057 | card->private_data = cm; |
3051 | 3058 | ||
3052 | sprintf(card->shortname, "C-Media PCI %s", card->driver); | ||
3053 | sprintf(card->longname, "%s (model %d) at 0x%lx, irq %i", | ||
3054 | card->shortname, | ||
3055 | cm->chip_version, | ||
3056 | cm->iobase, | ||
3057 | cm->irq); | ||
3058 | |||
3059 | //snd_printd("%s is detected\n", card->longname); | ||
3060 | |||
3061 | if ((err = snd_card_register(card)) < 0) { | 3059 | if ((err = snd_card_register(card)) < 0) { |
3062 | snd_card_free(card); | 3060 | snd_card_free(card); |
3063 | return err; | 3061 | return err; |