aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKailang Yang <kailang@realtek.com>2014-10-29 04:10:13 -0400
committerTakashi Iwai <tiwai@suse.de>2014-10-30 04:01:17 -0400
commit1df8874bfab15671fe9433ec20807590ba86b334 (patch)
tree53e72a1374187d8b19e93306a5ba4bc1d4b68653 /sound
parentcf51eb9d0c6027d083893f8a72f26d7f007f1ff7 (diff)
ALSA: hda/realtek - Update Initial AMP for EAPD control
The default EAPD control uses verb command to control EAPD. Some codec does not have verb command for EAPD. It needs to control by hidden register. This update will avoid wrong behavior for some codec. This patch will fix double setup for EAPD. It just needs to turn on by one site for verb command or hidden register controlled. Detailed changes: - alc889_coef_init() is replaced with alc_update_coef_idx() with a correct COEF value. - for ALC262, ALC887 and ALC900, the EAPD setup via the hidden register is removed because this rather conflicts with the EAPD verb setup. - For ALC888-VC, also the hidden register access is removed in alc888_coef_init(). - Remove the dead #if 0 code for ALC267/ALC268. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 22d9d2104e99..ba72fffa7460 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -291,18 +291,14 @@ static void alc880_unsol_event(struct hda_codec *codec, unsigned int res)
291/* additional initialization for ALC888 variants */ 291/* additional initialization for ALC888 variants */
292static void alc888_coef_init(struct hda_codec *codec) 292static void alc888_coef_init(struct hda_codec *codec)
293{ 293{
294 if (alc_get_coef0(codec) == 0x20) 294 switch (alc_get_coef0(codec) & 0x00f0) {
295 /* alc888S-VC */ 295 /* alc888-VA */
296 alc_write_coef_idx(codec, 7, 0x830); 296 case 0x00:
297 else 297 /* alc888-VB */
298 /* alc888-VB */ 298 case 0x10:
299 alc_write_coef_idx(codec, 7, 0x3030); 299 alc_update_coef_idx(codec, 7, 0, 0x2030); /* Turn EAPD to High */
300} 300 break;
301 301 }
302/* additional initialization for ALC889 variants */
303static void alc889_coef_init(struct hda_codec *codec)
304{
305 alc_update_coef_idx(codec, 7, 0, 0x2010);
306} 302}
307 303
308/* turn on/off EAPD control (only if available) */ 304/* turn on/off EAPD control (only if available) */
@@ -359,25 +355,15 @@ static void alc_auto_init_amp(struct hda_codec *codec, int type)
359 case 0x10ec0260: 355 case 0x10ec0260:
360 alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x2010); 356 alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x2010);
361 break; 357 break;
362 case 0x10ec0262:
363 case 0x10ec0880: 358 case 0x10ec0880:
364 case 0x10ec0882: 359 case 0x10ec0882:
365 case 0x10ec0883: 360 case 0x10ec0883:
366 case 0x10ec0885: 361 case 0x10ec0885:
367 case 0x10ec0887: 362 alc_update_coef_idx(codec, 7, 0, 0x2030);
368 /*case 0x10ec0889:*/ /* this causes an SPDIF problem */
369 case 0x10ec0900:
370 alc889_coef_init(codec);
371 break; 363 break;
372 case 0x10ec0888: 364 case 0x10ec0888:
373 alc888_coef_init(codec); 365 alc888_coef_init(codec);
374 break; 366 break;
375#if 0 /* XXX: This may cause the silent output on speaker on some machines */
376 case 0x10ec0267:
377 case 0x10ec0268:
378 alc_update_coef_idx(codec, 7, 0, 0x3000);
379 break;
380#endif /* XXX */
381 } 367 }
382 break; 368 break;
383 } 369 }
@@ -1710,7 +1696,7 @@ static void alc889_fixup_coef(struct hda_codec *codec,
1710{ 1696{
1711 if (action != HDA_FIXUP_ACT_INIT) 1697 if (action != HDA_FIXUP_ACT_INIT)
1712 return; 1698 return;
1713 alc889_coef_init(codec); 1699 alc_update_coef_idx(codec, 7, 0, 0x2030);
1714} 1700}
1715 1701
1716/* toggle speaker-output according to the hp-jack state */ 1702/* toggle speaker-output according to the hp-jack state */