Skip to content

Commit a5022b0

Browse files
tiwaiJaroslav Kysela
authored andcommitted
[ALSA] Fix ALC658D support
AC97 Codec Fix the internal speaker problem (e.g. Targa Traveller 826) with ALC658D codec. The info is taken from Cyberlink/realtek-modified code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent b73c1c1 commit a5022b0

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

‎sound/pci/ac97/ac97_codec.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ static const ac97_codec_id_t snd_ac97_codec_ids[] = {
112112
{ 0x414c4723, 0xffffffff, "ALC650F", NULL, NULL }, /* already patched */
113113
{ 0x414c4720, 0xfffffff0, "ALC650", patch_alc650, NULL },
114114
{ 0x414c4760, 0xfffffff0, "ALC655", patch_alc655, NULL },
115+
{ 0x414c4781, 0xffffffff, "ALC658D", NULL, NULL }, /* already patched */
115116
{ 0x414c4780, 0xfffffff0, "ALC658", patch_alc655, NULL },
116117
{ 0x414c4790, 0xfffffff0, "ALC850", patch_alc850, NULL },
117118
{ 0x414c4730, 0xffffffff, "ALC101", NULL, NULL },

‎sound/pci/ac97/ac97_id.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#define AC97_ID_ALC650F 0x414c4723
5353
#define AC97_ID_ALC655 0x414c4760
5454
#define AC97_ID_ALC658 0x414c4780
55+
#define AC97_ID_ALC658D 0x414c4781
5556
#define AC97_ID_ALC850 0x414c4790
5657
#define AC97_ID_YMF753 0x594d4803
5758
#define AC97_ID_VT1616 0x49434551

‎sound/pci/ac97/ac97_patch.c‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,7 +2134,13 @@ int patch_alc655(ac97_t * ac97)
21342134
{
21352135
unsigned int val;
21362136

2137-
ac97->spec.dev_flags = (ac97->id == 0x414c4780); /* ALC658 */
2137+
if (ac97->id == AC97_ID_ALC658) {
2138+
ac97->spec.dev_flags = 1; /* ALC658 */
2139+
if ((snd_ac97_read(ac97, AC97_ALC650_REVISION) & 0x3f) == 2) {
2140+
ac97->id = AC97_ID_ALC658D;
2141+
ac97->spec.dev_flags = 2;
2142+
}
2143+
}
21382144

21392145
ac97->build_ops = &patch_alc655_ops;
21402146

@@ -2143,7 +2149,7 @@ int patch_alc655(ac97_t * ac97)
21432149

21442150
/* adjust default values */
21452151
val = snd_ac97_read(ac97, 0x7a); /* misc control */
2146-
if (ac97->id == 0x414c4780) /* ALC658 */
2152+
if (ac97->spec.dev_flags) /* ALC658 */
21472153
val &= ~(1 << 1); /* Pin 47 is spdif input pin */
21482154
else { /* ALC655 */
21492155
if (ac97->subsystem_vendor == 0x1462 &&
@@ -2164,6 +2170,11 @@ int patch_alc655(ac97_t * ac97)
21642170
/* full DAC volume */
21652171
snd_ac97_write_cache(ac97, AC97_ALC650_SURR_DAC_VOL, 0x0808);
21662172
snd_ac97_write_cache(ac97, AC97_ALC650_LFE_DAC_VOL, 0x0808);
2173+
2174+
/* update undocumented bit... */
2175+
if (ac97->id == AC97_ID_ALC658D)
2176+
snd_ac97_update_bits(ac97, 0x74, 0x0800, 0x0800);
2177+
21672178
return 0;
21682179
}
21692180

0 commit comments

Comments
 (0)