Skip to content

Commit f12aa40

Browse files
tiwaiJaroslav Kysela
authored andcommitted
[ALSA] emu10k1 - Fix loading of SBLive Game board
EMU10K1/EMU10K2 driver Fixed the error at loading SBLive Game board (and possible other models). The PCI SSIDs of this board conflicts with SB Live 5.1 Platinum, which has no AC97 chip. Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent c66186e commit f12aa40

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎include/sound/emu10k1.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ typedef struct {
10591059
unsigned char spk71; /* Has 7.1 speakers */
10601060
unsigned char sblive51; /* SBLive! 5.1 - extout 0x11 -> center, 0x12 -> lfe */
10611061
unsigned char spdif_bug; /* Has Spdif phasing bug */
1062-
unsigned char ac97_chip; /* Has an AC97 chip */
1062+
unsigned char ac97_chip; /* Has an AC97 chip: 1 = mandatory, 2 = optional */
10631063
unsigned char ecard; /* APS EEPROM */
10641064
const char *driver;
10651065
const char *name;

‎sound/pci/emu10k1/emu10k1_main.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,9 +756,12 @@ static emu_chip_details_t emu_chip_details[] = {
756756
.sblive51 = 1} ,
757757
/* Tested by alsa bugtrack user "hus" bug #1297 12th Aug 2005 */
758758
{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80611102,
759-
.driver = "EMU10K1", .name = "SBLive! Platinum 5.1 [SB0060]",
759+
.driver = "EMU10K1", .name = "SBLive 5.1 [SB0060]",
760760
.id = "Live",
761761
.emu10k1_chip = 1,
762+
.ac97_chip = 2, /* ac97 is optional; both SBLive 5.1 and platinum
763+
* share the same IDs!
764+
*/
762765
.sblive51 = 1} ,
763766
{.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80511102,
764767
.driver = "EMU10K1", .name = "SBLive! Value [CT4850]",

‎sound/pci/emu10k1/emumixer.c‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,13 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu,
802802
.read = snd_emu10k1_ac97_read,
803803
};
804804

805-
if ((err = snd_ac97_bus(emu->card, 0, &ops, NULL, &pbus)) < 0)
806-
return err;
805+
if ((err = snd_ac97_bus(emu->card, 0, &ops, NULL, &pbus)) < 0) {
806+
if (emu->card_capabilities->ac97_chip == 1)
807+
return err;
808+
snd_printd(KERN_INFO "emu10k1: AC97 is optional on this board\n");
809+
snd_printd(KERN_INFO" Proceeding without ac97 mixers...\n");
810+
goto no_ac97; /* FIXME: get rid of ugly gotos.. */
811+
}
807812
pbus->no_vra = 1; /* we don't need VRA */
808813

809814
memset(&ac97, 0, sizeof(ac97));
@@ -836,6 +841,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu,
836841
for (; *c; c++)
837842
remove_ctl(card, *c);
838843
} else {
844+
no_ac97:
839845
if (emu->card_capabilities->ecard)
840846
strcpy(emu->card->mixername, "EMU APS");
841847
else if (emu->audigy)

0 commit comments

Comments
 (0)