aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index a2fa5012c843..c51a8ae464e2 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -787,8 +787,22 @@ int __devinit snd_emu10k1_create(snd_card_t * card,
787 else 787 else
788 snd_printdd("Sound card name=%s, vendor=0x%x, device=0x%x, subsystem=0x%x\n", c->name, pci->vendor, pci->device, emu->serial); 788 snd_printdd("Sound card name=%s, vendor=0x%x, device=0x%x, subsystem=0x%x\n", c->name, pci->vendor, pci->device, emu->serial);
789 789
790 if (!*card->id && c->id) 790 if (!*card->id && c->id) {
791 int i, n = 0;
791 strlcpy(card->id, c->id, sizeof(card->id)); 792 strlcpy(card->id, c->id, sizeof(card->id));
793 for (;;) {
794 for (i = 0; i < snd_ecards_limit; i++) {
795 if (snd_cards[i] && !strcmp(snd_cards[i]->id, card->id))
796 break;
797 }
798 if (i >= snd_ecards_limit)
799 break;
800 n++;
801 if (n >= SNDRV_CARDS)
802 break;
803 snprintf(card->id, sizeof(card->id), "%s_%d", c->id, n);
804 }
805 }
792 806
793 is_audigy = emu->audigy = c->emu10k2_chip; 807 is_audigy = emu->audigy = c->emu10k2_chip;
794 808