Update of /cvsroot/alsa/alsa-kernel/pci/trident In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5304/pci/trident
Modified Files: trident.c Log Message: Clemens Ladisch <[EMAIL PROTECTED]>: - fix names for MPU-401 ports This moves the initialization of card->shortname before the component creation so that the name for the rawmidi port is "<shortname> MPU-401" instead of "MPU-401 (UART) x-0". Index: trident.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/trident/trident.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- trident.c 12 Aug 2003 14:10:16 -0000 1.20 +++ trident.c 26 Jan 2004 14:27:13 -0000 1.21 @@ -106,6 +106,30 @@ snd_card_free(card); return err; } + + switch (trident->device) { + case TRIDENT_DEVICE_ID_DX: + str = "TRID4DWAVEDX"; + break; + case TRIDENT_DEVICE_ID_NX: + str = "TRID4DWAVENX"; + break; + case TRIDENT_DEVICE_ID_SI7018: + str = "SI7018"; + break; + default: + str = "Unknown"; + } + strcpy(card->driver, str); + if (trident->device == TRIDENT_DEVICE_ID_SI7018) { + strcpy(card->shortname, "SiS "); + } else { + strcpy(card->shortname, "Trident "); + } + strcat(card->shortname, card->driver); + sprintf(card->longname, "%s PCI Audio at 0x%lx, irq %d", + card->shortname, trident->port, trident->irq); + if ((err = snd_trident_pcm(trident, pcm_dev++, NULL)) < 0) { snd_card_free(card); return err; @@ -141,29 +165,6 @@ snd_trident_gameport(trident); - switch (trident->device) { - case TRIDENT_DEVICE_ID_DX: - str = "TRID4DWAVEDX"; - break; - case TRIDENT_DEVICE_ID_NX: - str = "TRID4DWAVENX"; - break; - case TRIDENT_DEVICE_ID_SI7018: - str = "SI7018"; - break; - default: - str = "Unknown"; - } - strcpy(card->driver, str); - if (trident->device == TRIDENT_DEVICE_ID_SI7018) { - strcpy(card->shortname, "SiS "); - } else { - strcpy(card->shortname, "Trident "); - } - strcat(card->shortname, card->driver); - sprintf(card->longname, "%s PCI Audio at 0x%lx, irq %d", - card->shortname, trident->port, trident->irq); - if ((err = snd_card_register(card)) < 0) { snd_card_free(card); return err; ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog