]> err.no Git - linux-2.6/commitdiff
[ALSA] Use old default id strings for compatibility
authorTakashi Iwai <tiwai@suse.de>
Wed, 30 Mar 2005 12:22:25 +0000 (14:22 +0200)
committerJaroslav Kysela <perex@suse.cz>
Sun, 29 May 2005 07:00:47 +0000 (09:00 +0200)
EMU10K1/EMU10K2 driver
Use expliciitly the old default id strings for backward compatibility.
This will make 'alsactl restore' working again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/emu10k1.h
sound/pci/emu10k1/emu10k1_main.c

index b1e8ee8e0fab488e65d3dba578cb8b103bd0fbc9..6647919768bf9d431bee5bff529482549025859d 100644 (file)
@@ -1050,8 +1050,9 @@ typedef struct {
        unsigned char spdif_bug;    /* Has Spdif phasing bug */
        unsigned char ac97_chip;    /* Has an AC97 chip */
        unsigned char ecard;        /* APS EEPROM */
-       char * driver;
-       char * name;
+       const char *driver;
+       const char *name;
+       const char *id;         /* for backward compatibility - can be NULL if not needed */
 } emu_chip_details_t;
 
 struct _snd_emu10k1 {
index 38be0f1b0e7271ffc7b7416141dc5a75622820ab..a2fa5012c843426e6d9d7fd3f02d15b437f2d3fe 100644 (file)
@@ -616,15 +616,18 @@ static emu_chip_details_t emu_chip_details[] = {
        /* Audigy 2 Value AC3 out does not work yet. Need to find out how to turn off interpolators.*/
        {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10011102,
         .driver = "Audigy2", .name = "Audigy 2 Value [SB0400]", 
+        .id = "Audigy2",
         .emu10k2_chip = 1,
         .ca0108_chip = 1,
         .spk71 = 1} ,
        {.vendor = 0x1102, .device = 0x0008, 
         .driver = "Audigy2", .name = "Audigy 2 Value [Unknown]", 
+        .id = "Audigy2",
         .emu10k2_chip = 1,
         .ca0108_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20071102,
         .driver = "Audigy2", .name = "Audigy 4 PRO [SB0380]", 
+        .id = "Audigy2",
         .emu10k2_chip = 1,
         .ca0102_chip = 1,
         .ca0151_chip = 1,
@@ -633,6 +636,7 @@ static emu_chip_details_t emu_chip_details[] = {
         .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20021102,
         .driver = "Audigy2", .name = "Audigy 2 ZS [SB0350]", 
+        .id = "Audigy2",
         .emu10k2_chip = 1,
         .ca0102_chip = 1,
         .ca0151_chip = 1,
@@ -641,6 +645,7 @@ static emu_chip_details_t emu_chip_details[] = {
         .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20011102,
         .driver = "Audigy2", .name = "Audigy 2 ZS [2001]", 
+        .id = "Audigy2",
         .emu10k2_chip = 1,
         .ca0102_chip = 1,
         .ca0151_chip = 1,
@@ -649,6 +654,7 @@ static emu_chip_details_t emu_chip_details[] = {
         .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10071102,
         .driver = "Audigy2", .name = "Audigy 2 [SB0240]", 
+        .id = "Audigy2",
         .emu10k2_chip = 1,
         .ca0102_chip = 1,
         .ca0151_chip = 1,
@@ -657,12 +663,14 @@ static emu_chip_details_t emu_chip_details[] = {
         .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10051102,
         .driver = "Audigy2", .name = "Audigy 2 EX [1005]", 
+        .id = "Audigy2",
         .emu10k2_chip = 1,
         .ca0102_chip = 1,
         .ca0151_chip = 1,
         .spdif_bug = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102,
         .driver = "Audigy2", .name = "Audigy 2 Platinum [SB0240P]", 
+        .id = "Audigy2",
         .emu10k2_chip = 1,
         .ca0102_chip = 1,
         .ca0151_chip = 1,
@@ -671,34 +679,41 @@ static emu_chip_details_t emu_chip_details[] = {
         .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10020052,
         .driver = "Audigy", .name = "Audigy 1 ES [SB0160]", 
+        .id = "Audigy",
         .emu10k2_chip = 1,
         .ca0102_chip = 1,
         .spdif_bug = 1} ,
        {.vendor = 0x1102, .device = 0x0004,
         .driver = "Audigy", .name = "Audigy 1 or 2 [Unknown]", 
+        .id = "Audigy",
         .emu10k2_chip = 1,
         .ca0102_chip = 1,
         .spdif_bug = 1} ,
        {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x40011102,
         .driver = "EMU10K1", .name = "E-mu APS [4001]", 
+        .id = "APS",
         .emu10k1_chip = 1,
         .ecard = 1} ,
        {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80641102,
         .driver = "EMU10K1", .name = "SB Live 5.1", 
+        .id = "Live",
         .emu10k1_chip = 1,
         .ac97_chip = 1,
         .sblive51 = 1} ,
        {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80401102,
         .driver = "EMU10K1", .name = "SBLive! Platinum [CT4760P]", 
+        .id = "Live",
         .emu10k1_chip = 1,
         .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80271102,
         .driver = "EMU10K1", .name = "SBLive! Value [CT4832]", 
+        .id = "Live",
         .emu10k1_chip = 1,
         .ac97_chip = 1,
         .sblive51 = 1} ,
        {.vendor = 0x1102, .device = 0x0002,
         .driver = "EMU10K1", .name = "SB Live [Unknown]", 
+        .id = "Live",
         .emu10k1_chip = 1,
         .ac97_chip = 1,
         .sblive51 = 1} ,
@@ -772,6 +787,9 @@ int __devinit snd_emu10k1_create(snd_card_t * card,
        else
                snd_printdd("Sound card name=%s, vendor=0x%x, device=0x%x, subsystem=0x%x\n", c->name, pci->vendor, pci->device, emu->serial);
        
+       if (!*card->id && c->id)
+               strlcpy(card->id, c->id, sizeof(card->id));
+
        is_audigy = emu->audigy = c->emu10k2_chip;
 
        /* set the DMA transfer mask */