diff options
author | Kailang Yang <kailang@realtek.com> | 2012-11-08 04:23:18 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-11-08 04:29:20 -0500 |
commit | 1387e2d12799e554df2f60e7ae7fe01384bcb96f (patch) | |
tree | f6f9addce5d95cc5952eb5272fa97450841e2972 /sound/pci | |
parent | f58161ba1b05a968e5136824b5a16b714b6a5317 (diff) |
ALSA: hda - Improve HP depop when system enter to S3
alc269_toggle_power_output() was only use in ALC269VB. I rename it to
alc269vb_toggle_power_output().
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/pci')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f7397ad02a0d..b25e9b22cd69 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -5840,7 +5840,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
5840 | return alc_parse_auto_config(codec, alc269_ignore, ssids); | 5840 | return alc_parse_auto_config(codec, alc269_ignore, ssids); |
5841 | } | 5841 | } |
5842 | 5842 | ||
5843 | static void alc269_toggle_power_output(struct hda_codec *codec, int power_up) | 5843 | static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) |
5844 | { | 5844 | { |
5845 | int val = alc_read_coef_idx(codec, 0x04); | 5845 | int val = alc_read_coef_idx(codec, 0x04); |
5846 | if (power_up) | 5846 | if (power_up) |
@@ -5857,10 +5857,10 @@ static void alc269_shutup(struct hda_codec *codec) | |||
5857 | if (spec->codec_variant != ALC269_TYPE_ALC269VB) | 5857 | if (spec->codec_variant != ALC269_TYPE_ALC269VB) |
5858 | return; | 5858 | return; |
5859 | 5859 | ||
5860 | if ((alc_get_coef0(codec) & 0x00ff) == 0x017) | 5860 | if (spec->codec_variant == ALC269_TYPE_ALC269VB) |
5861 | alc269_toggle_power_output(codec, 0); | 5861 | alc269vb_toggle_power_output(codec, 0); |
5862 | if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { | 5862 | if (spec->codec_variant == ALC269_TYPE_ALC269VB && |
5863 | alc269_toggle_power_output(codec, 0); | 5863 | (alc_get_coef0(codec) & 0x00ff) == 0x018) { |
5864 | msleep(150); | 5864 | msleep(150); |
5865 | } | 5865 | } |
5866 | } | 5866 | } |
@@ -5870,24 +5870,22 @@ static int alc269_resume(struct hda_codec *codec) | |||
5870 | { | 5870 | { |
5871 | struct alc_spec *spec = codec->spec; | 5871 | struct alc_spec *spec = codec->spec; |
5872 | 5872 | ||
5873 | if (spec->codec_variant == ALC269_TYPE_ALC269VB || | 5873 | if (spec->codec_variant == ALC269_TYPE_ALC269VB) |
5874 | alc269vb_toggle_power_output(codec, 0); | ||
5875 | if (spec->codec_variant == ALC269_TYPE_ALC269VB && | ||
5874 | (alc_get_coef0(codec) & 0x00ff) == 0x018) { | 5876 | (alc_get_coef0(codec) & 0x00ff) == 0x018) { |
5875 | alc269_toggle_power_output(codec, 0); | ||
5876 | msleep(150); | 5877 | msleep(150); |
5877 | } | 5878 | } |
5878 | 5879 | ||
5879 | codec->patch_ops.init(codec); | 5880 | codec->patch_ops.init(codec); |
5880 | 5881 | ||
5881 | if (spec->codec_variant == ALC269_TYPE_ALC269VB || | 5882 | if (spec->codec_variant == ALC269_TYPE_ALC269VB) |
5883 | alc269vb_toggle_power_output(codec, 1); | ||
5884 | if (spec->codec_variant == ALC269_TYPE_ALC269VB && | ||
5882 | (alc_get_coef0(codec) & 0x00ff) == 0x017) { | 5885 | (alc_get_coef0(codec) & 0x00ff) == 0x017) { |
5883 | alc269_toggle_power_output(codec, 1); | ||
5884 | msleep(200); | 5886 | msleep(200); |
5885 | } | 5887 | } |
5886 | 5888 | ||
5887 | if (spec->codec_variant == ALC269_TYPE_ALC269VB || | ||
5888 | (alc_get_coef0(codec) & 0x00ff) == 0x018) | ||
5889 | alc269_toggle_power_output(codec, 1); | ||
5890 | |||
5891 | snd_hda_codec_resume_amp(codec); | 5889 | snd_hda_codec_resume_amp(codec); |
5892 | snd_hda_codec_resume_cache(codec); | 5890 | snd_hda_codec_resume_cache(codec); |
5893 | hda_call_check_power_status(codec, 0x01); | 5891 | hda_call_check_power_status(codec, 0x01); |