diff options
author | Kailang Yang <kailang@realtek.com> | 2012-06-29 03:35:52 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-06-29 03:44:44 -0400 |
commit | 8663ff75cdca0a66f808e124c5592735793926af (patch) | |
tree | 1ed91a7c23ccd388377b5c9a1245eea4c0efab50 /sound/pci/hda/patch_realtek.c | |
parent | c47ccb2e8033517a230040971a00bd4d882e8f8f (diff) |
ALSA: hda - Fix no sound from ALC662 after Windows reboot
Windows use hidden register to control EAPD.
Linux use verb to control EAPD.
If windows reboot to Linux, it must change the EAPD control to verb
control.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5ccf10a4d593..aa4c25e0f327 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -6688,6 +6688,31 @@ static const struct alc_model_fixup alc662_fixup_models[] = { | |||
6688 | {} | 6688 | {} |
6689 | }; | 6689 | }; |
6690 | 6690 | ||
6691 | static void alc662_fill_coef(struct hda_codec *codec) | ||
6692 | { | ||
6693 | int val, coef; | ||
6694 | |||
6695 | coef = alc_get_coef0(codec); | ||
6696 | |||
6697 | switch (codec->vendor_id) { | ||
6698 | case 0x10ec0662: | ||
6699 | if ((coef & 0x00f0) == 0x0030) { | ||
6700 | val = alc_read_coef_idx(codec, 0x4); /* EAPD Ctrl */ | ||
6701 | alc_write_coef_idx(codec, 0x4, val & ~(1<<10)); | ||
6702 | } | ||
6703 | break; | ||
6704 | case 0x10ec0272: | ||
6705 | case 0x10ec0273: | ||
6706 | case 0x10ec0663: | ||
6707 | case 0x10ec0665: | ||
6708 | case 0x10ec0670: | ||
6709 | case 0x10ec0671: | ||
6710 | case 0x10ec0672: | ||
6711 | val = alc_read_coef_idx(codec, 0xd); /* EAPD Ctrl */ | ||
6712 | alc_write_coef_idx(codec, 0xd, val | (1<<14)); | ||
6713 | break; | ||
6714 | } | ||
6715 | } | ||
6691 | 6716 | ||
6692 | /* | 6717 | /* |
6693 | */ | 6718 | */ |
@@ -6707,6 +6732,9 @@ static int patch_alc662(struct hda_codec *codec) | |||
6707 | 6732 | ||
6708 | alc_fix_pll_init(codec, 0x20, 0x04, 15); | 6733 | alc_fix_pll_init(codec, 0x20, 0x04, 15); |
6709 | 6734 | ||
6735 | spec->init_hook = alc662_fill_coef; | ||
6736 | alc662_fill_coef(codec); | ||
6737 | |||
6710 | alc_pick_fixup(codec, alc662_fixup_models, | 6738 | alc_pick_fixup(codec, alc662_fixup_models, |
6711 | alc662_fixup_tbl, alc662_fixups); | 6739 | alc662_fixup_tbl, alc662_fixups); |
6712 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); | 6740 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); |