summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-04-07 15:48:42 +0200
committerJaroslav Kysela <perex@suse.cz>2005-05-29 09:58:22 +0200
commitbdaed50292bea3e2b20c68c2ffe9dbde7c0d6910 (patch)
tree7f056ec8acce0c50b9dc84611b24e4a711d0100d
parent5af4c83375cba113fb7e1ed57024a5442ca5060e (diff)
[ALSA] Check revision for the proper detection of audigy 2
EMU10K1/EMU10K2 driver Check ther revision to detect non-listed audigy 2 boards. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--include/sound/emu10k1.h1
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c18
2 files changed, 15 insertions, 4 deletions
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 6647919768bf..f5babd3f8452 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1040,6 +1040,7 @@ typedef struct {
u32 vendor;
u32 device;
u32 subsystem;
+ unsigned char revision;
unsigned char emu10k1_chip; /* Original SB Live. Not SB Live 24bit. */
unsigned char emu10k2_chip; /* Audigy 1 or Audigy 2. */
unsigned char ca0102_chip; /* Audigy 1 or Audigy 2. Not SB Audigy 2 Value. */
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index a3a1a10fb0c9..c6d53b459254 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -679,6 +679,14 @@ static emu_chip_details_t emu_chip_details[] = {
.spk71 = 1,
.spdif_bug = 1,
.ac97_chip = 1} ,
+ {.vendor = 0x1102, .device = 0x0004, .revision = 0x04,
+ .driver = "Audigy2", .name = "Audigy 2 [Unknown]",
+ .id = "Audigy2",
+ .emu10k2_chip = 1,
+ .ca0102_chip = 1,
+ .ca0151_chip = 1,
+ .spdif_bug = 1,
+ .ac97_chip = 1} ,
{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10020052,
.driver = "Audigy", .name = "Audigy 1 ES [SB0160]",
.id = "Audigy",
@@ -693,11 +701,10 @@ static emu_chip_details_t emu_chip_details[] = {
.ca0102_chip = 1,
.ac97_chip = 1} ,
{.vendor = 0x1102, .device = 0x0004,
- .driver = "Audigy", .name = "Audigy 1 or 2 [Unknown]",
+ .driver = "Audigy", .name = "Audigy 1 [Unknown]",
.id = "Audigy",
.emu10k2_chip = 1,
.ca0102_chip = 1,
- .spdif_bug = 1,
.ac97_chip = 1} ,
{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x40011102,
.driver = "EMU10K1", .name = "E-mu APS [4001]",
@@ -781,8 +788,11 @@ int __devinit snd_emu10k1_create(snd_card_t * card,
for (c = emu_chip_details; c->vendor; c++) {
if (c->vendor == pci->vendor && c->device == pci->device) {
- if (c->subsystem == emu->serial) break;
- if (c->subsystem == 0) break;
+ if (c->subsystem && c->subsystem != emu->serial)
+ continue;
+ if (c->revision && c->revision != emu->revision)
+ continue;
+ break;
}
}
if (c->vendor == 0) {