diff options
author | Alan Horstmann <gineera@aspect135.co.uk> | 2006-05-03 17:07:29 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-06-22 21:33:26 +0200 |
commit | 520290e43f9880da34e542185838816c6d79a340 (patch) | |
tree | bf98333a95a459ea41dbe05b5d56785061ae3525 /sound/pci/au88x0/au88x0.c | |
parent | a59524faf3a2050e14a1c9038eb006ce96025394 (diff) |
[ALSA] au88x0 - Init before create components
Change the order in vortex_probe to set the card details before creating the
components, meaning for example that card->shortname is available when
registering the midi port.
I have also added extra to card->shortname, and a line to overwrite the midi
name following snd_mpu401_uart_new.
Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/au88x0/au88x0.c')
-rw-r--r-- | sound/pci/au88x0/au88x0.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index 126870ec063a..8a3b118989bf 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c @@ -261,6 +261,13 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) return err; } snd_vortex_workaround(pci, pcifix[dev]); + + // Card details needed in snd_vortex_midi + strcpy(card->driver, CARD_NAME_SHORT); + sprintf(card->shortname, "Aureal Vortex %s", CARD_NAME_SHORT); + sprintf(card->longname, "%s at 0x%lx irq %i", + card->shortname, chip->io, chip->irq); + // (4) Alloc components. // ADB pcm. if ((err = snd_vortex_new_pcm(chip, VORTEX_PCM_ADB, NR_ADB)) < 0) { @@ -323,11 +330,6 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) #endif // (5) - strcpy(card->driver, CARD_NAME_SHORT); - strcpy(card->shortname, CARD_NAME_SHORT); - sprintf(card->longname, "%s at 0x%lx irq %i", - card->shortname, chip->io, chip->irq); - if ((err = pci_read_config_word(pci, PCI_DEVICE_ID, &(chip->device))) < 0) { snd_card_free(card); |