aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKailang Yang <kailang@realtek.com>2014-10-24 03:43:46 -0400
committerTakashi Iwai <tiwai@suse.de>2014-11-05 18:09:57 -0500
commitf3f9185f3e49c748e952dd579357048a42e89398 (patch)
tree7663051ebfc8cad70fe62c2f0b7a38fef92bffdb /sound
parent0725dda207e95ff25f1aa01432250323e0ec49d6 (diff)
ALSA: hda/realtek - Restore default value for ALC668
Restore the registers to prevent the abnormal digital power supply rising ratio/sequence to the codec and causing the incorrect default codec register restoration during initialization. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c40
1 files changed, 38 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 1af917f58a70..da03693099eb 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5669,6 +5669,35 @@ static void alc662_fixup_led_gpio1(struct hda_codec *codec,
5669 } 5669 }
5670} 5670}
5671 5671
5672static struct coef_fw alc668_coefs[] = {
5673 WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
5674 WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
5675 WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0),
5676 WRITE_COEF(0x0c, 0x7cf7), WRITE_COEF(0x0d, 0x1080), WRITE_COEF(0x0e, 0x7f7f),
5677 WRITE_COEF(0x0f, 0xcccc), WRITE_COEF(0x10, 0xddcc), WRITE_COEF(0x11, 0x0001),
5678 WRITE_COEF(0x13, 0x0), WRITE_COEF(0x14, 0x2aa0), WRITE_COEF(0x17, 0xa940),
5679 WRITE_COEF(0x19, 0x0), WRITE_COEF(0x1a, 0x0), WRITE_COEF(0x1b, 0x0),
5680 WRITE_COEF(0x1c, 0x0), WRITE_COEF(0x1d, 0x0), WRITE_COEF(0x1e, 0x7418),
5681 WRITE_COEF(0x1f, 0x0804), WRITE_COEF(0x20, 0x4200), WRITE_COEF(0x21, 0x0468),
5682 WRITE_COEF(0x22, 0x8ccc), WRITE_COEF(0x23, 0x0250), WRITE_COEF(0x24, 0x7418),
5683 WRITE_COEF(0x27, 0x0), WRITE_COEF(0x28, 0x8ccc), WRITE_COEF(0x2a, 0xff00),
5684 WRITE_COEF(0x2b, 0x8000), WRITE_COEF(0xa7, 0xff00), WRITE_COEF(0xa8, 0x8000),
5685 WRITE_COEF(0xaa, 0x2e17), WRITE_COEF(0xab, 0xa0c0), WRITE_COEF(0xac, 0x0),
5686 WRITE_COEF(0xad, 0x0), WRITE_COEF(0xae, 0x2ac6), WRITE_COEF(0xaf, 0xa480),
5687 WRITE_COEF(0xb0, 0x0), WRITE_COEF(0xb1, 0x0), WRITE_COEF(0xb2, 0x0),
5688 WRITE_COEF(0xb3, 0x0), WRITE_COEF(0xb4, 0x0), WRITE_COEF(0xb5, 0x1040),
5689 WRITE_COEF(0xb6, 0xd697), WRITE_COEF(0xb7, 0x902b), WRITE_COEF(0xb8, 0xd697),
5690 WRITE_COEF(0xb9, 0x902b), WRITE_COEF(0xba, 0xb8ba), WRITE_COEF(0xbb, 0xaaab),
5691 WRITE_COEF(0xbc, 0xaaaf), WRITE_COEF(0xbd, 0x6aaa), WRITE_COEF(0xbe, 0x1c02),
5692 WRITE_COEF(0xc0, 0x00ff), WRITE_COEF(0xc1, 0x0fa6),
5693 {}
5694};
5695
5696static void alc668_restore_default_value(struct hda_codec *codec)
5697{
5698 alc_process_coef_fw(codec, alc668_coefs);
5699}
5700
5672enum { 5701enum {
5673 ALC662_FIXUP_ASPIRE, 5702 ALC662_FIXUP_ASPIRE,
5674 ALC662_FIXUP_LED_GPIO1, 5703 ALC662_FIXUP_LED_GPIO1,
@@ -6136,8 +6165,15 @@ static int patch_alc662(struct hda_codec *codec)
6136 6165
6137 alc_fix_pll_init(codec, 0x20, 0x04, 15); 6166 alc_fix_pll_init(codec, 0x20, 0x04, 15);
6138 6167
6139 spec->init_hook = alc662_fill_coef; 6168 switch (codec->vendor_id) {
6140 alc662_fill_coef(codec); 6169 case 0x10ec0668:
6170 spec->init_hook = alc668_restore_default_value;
6171 break;
6172 default:
6173 spec->init_hook = alc662_fill_coef;
6174 alc662_fill_coef(codec);
6175 break;
6176 }
6141 6177
6142 snd_hda_pick_fixup(codec, alc662_fixup_models, 6178 snd_hda_pick_fixup(codec, alc662_fixup_models,
6143 alc662_fixup_tbl, alc662_fixups); 6179 alc662_fixup_tbl, alc662_fixups);