aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-09-02 08:03:05 -0400
committerJaroslav Kysela <perex@suse.cz>2005-09-12 04:41:01 -0400
commita5022b0dc6e45254437b75289e773876bb43e262 (patch)
treed3ede798938b8745eea6b68936e3b0d6e2dfd449 /sound/pci
parentb73c1c122a097500e1c3dd495045432a1c818b92 (diff)
[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>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/ac97/ac97_codec.c1
-rw-r--r--sound/pci/ac97/ac97_id.h1
-rw-r--r--sound/pci/ac97/ac97_patch.c15
3 files changed, 15 insertions, 2 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 5501f4440c92..3b66fa689366 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -112,6 +112,7 @@ static const ac97_codec_id_t snd_ac97_codec_ids[] = {
112{ 0x414c4723, 0xffffffff, "ALC650F", NULL, NULL }, /* already patched */ 112{ 0x414c4723, 0xffffffff, "ALC650F", NULL, NULL }, /* already patched */
113{ 0x414c4720, 0xfffffff0, "ALC650", patch_alc650, NULL }, 113{ 0x414c4720, 0xfffffff0, "ALC650", patch_alc650, NULL },
114{ 0x414c4760, 0xfffffff0, "ALC655", patch_alc655, NULL }, 114{ 0x414c4760, 0xfffffff0, "ALC655", patch_alc655, NULL },
115{ 0x414c4781, 0xffffffff, "ALC658D", NULL, NULL }, /* already patched */
115{ 0x414c4780, 0xfffffff0, "ALC658", patch_alc655, NULL }, 116{ 0x414c4780, 0xfffffff0, "ALC658", patch_alc655, NULL },
116{ 0x414c4790, 0xfffffff0, "ALC850", patch_alc850, NULL }, 117{ 0x414c4790, 0xfffffff0, "ALC850", patch_alc850, NULL },
117{ 0x414c4730, 0xffffffff, "ALC101", NULL, NULL }, 118{ 0x414c4730, 0xffffffff, "ALC101", NULL, NULL },
diff --git a/sound/pci/ac97/ac97_id.h b/sound/pci/ac97/ac97_id.h
index dadf387ad0b8..6d73514dc49e 100644
--- a/sound/pci/ac97/ac97_id.h
+++ b/sound/pci/ac97/ac97_id.h
@@ -52,6 +52,7 @@
52#define AC97_ID_ALC650F 0x414c4723 52#define AC97_ID_ALC650F 0x414c4723
53#define AC97_ID_ALC655 0x414c4760 53#define AC97_ID_ALC655 0x414c4760
54#define AC97_ID_ALC658 0x414c4780 54#define AC97_ID_ALC658 0x414c4780
55#define AC97_ID_ALC658D 0x414c4781
55#define AC97_ID_ALC850 0x414c4790 56#define AC97_ID_ALC850 0x414c4790
56#define AC97_ID_YMF753 0x594d4803 57#define AC97_ID_YMF753 0x594d4803
57#define AC97_ID_VT1616 0x49434551 58#define AC97_ID_VT1616 0x49434551
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 0acf51dd4478..045ddc743edc 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -2134,7 +2134,13 @@ int patch_alc655(ac97_t * ac97)
2134{ 2134{
2135 unsigned int val; 2135 unsigned int val;
2136 2136
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 }
2138 2144
2139 ac97->build_ops = &patch_alc655_ops; 2145 ac97->build_ops = &patch_alc655_ops;
2140 2146
@@ -2143,7 +2149,7 @@ int patch_alc655(ac97_t * ac97)
2143 2149
2144 /* adjust default values */ 2150 /* adjust default values */
2145 val = snd_ac97_read(ac97, 0x7a); /* misc control */ 2151 val = snd_ac97_read(ac97, 0x7a); /* misc control */
2146 if (ac97->id == 0x414c4780) /* ALC658 */ 2152 if (ac97->spec.dev_flags) /* ALC658 */
2147 val &= ~(1 << 1); /* Pin 47 is spdif input pin */ 2153 val &= ~(1 << 1); /* Pin 47 is spdif input pin */
2148 else { /* ALC655 */ 2154 else { /* ALC655 */
2149 if (ac97->subsystem_vendor == 0x1462 && 2155 if (ac97->subsystem_vendor == 0x1462 &&
@@ -2164,6 +2170,11 @@ int patch_alc655(ac97_t * ac97)
2164 /* full DAC volume */ 2170 /* full DAC volume */
2165 snd_ac97_write_cache(ac97, AC97_ALC650_SURR_DAC_VOL, 0x0808); 2171 snd_ac97_write_cache(ac97, AC97_ALC650_SURR_DAC_VOL, 0x0808);
2166 snd_ac97_write_cache(ac97, AC97_ALC650_LFE_DAC_VOL, 0x0808); 2172 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
2167 return 0; 2178 return 0;
2168} 2179}
2169 2180