diff options
author | Dylan Reid <dgreid@chromium.org> | 2012-07-19 20:52:58 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-07-20 01:47:01 -0400 |
commit | 9e76e6d031482194a5b24d8e9ab88063fbd6b4b5 (patch) | |
tree | 08a5d2404be1c47d69ae615003563676ffe7793b /sound | |
parent | 1558eb838ff502faafacf26b6a711dbaae796009 (diff) |
ALSA: hda - Turn on PIN_OUT from hdmi playback prepare.
Turn on the pin widget's PIN_OUT bit from playback prepare. The pin is
enabled in open, but is disabled in hdmi_init_pin which is called during
system resume. This causes a system suspend/resume during playback to
mute HDMI/DP. Enabling the pin in prepare instead of open allows calling
snd_pcm_prepare after a system resume to restore audio.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 0b4a1ea147c6..641408dc28c0 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -876,7 +876,6 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, | |||
876 | struct hdmi_spec_per_pin *per_pin; | 876 | struct hdmi_spec_per_pin *per_pin; |
877 | struct hdmi_eld *eld; | 877 | struct hdmi_eld *eld; |
878 | struct hdmi_spec_per_cvt *per_cvt = NULL; | 878 | struct hdmi_spec_per_cvt *per_cvt = NULL; |
879 | int pinctl; | ||
880 | 879 | ||
881 | /* Validate hinfo */ | 880 | /* Validate hinfo */ |
882 | pin_idx = hinfo_to_pin_index(spec, hinfo); | 881 | pin_idx = hinfo_to_pin_index(spec, hinfo); |
@@ -912,11 +911,6 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, | |||
912 | snd_hda_codec_write(codec, per_pin->pin_nid, 0, | 911 | snd_hda_codec_write(codec, per_pin->pin_nid, 0, |
913 | AC_VERB_SET_CONNECT_SEL, | 912 | AC_VERB_SET_CONNECT_SEL, |
914 | mux_idx); | 913 | mux_idx); |
915 | pinctl = snd_hda_codec_read(codec, per_pin->pin_nid, 0, | ||
916 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); | ||
917 | snd_hda_codec_write(codec, per_pin->pin_nid, 0, | ||
918 | AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
919 | pinctl | PIN_OUT); | ||
920 | snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid); | 914 | snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid); |
921 | 915 | ||
922 | /* Initially set the converter's capabilities */ | 916 | /* Initially set the converter's capabilities */ |
@@ -1153,11 +1147,17 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
1153 | struct hdmi_spec *spec = codec->spec; | 1147 | struct hdmi_spec *spec = codec->spec; |
1154 | int pin_idx = hinfo_to_pin_index(spec, hinfo); | 1148 | int pin_idx = hinfo_to_pin_index(spec, hinfo); |
1155 | hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid; | 1149 | hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid; |
1150 | int pinctl; | ||
1156 | 1151 | ||
1157 | hdmi_set_channel_count(codec, cvt_nid, substream->runtime->channels); | 1152 | hdmi_set_channel_count(codec, cvt_nid, substream->runtime->channels); |
1158 | 1153 | ||
1159 | hdmi_setup_audio_infoframe(codec, pin_idx, substream); | 1154 | hdmi_setup_audio_infoframe(codec, pin_idx, substream); |
1160 | 1155 | ||
1156 | pinctl = snd_hda_codec_read(codec, pin_nid, 0, | ||
1157 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); | ||
1158 | snd_hda_codec_write(codec, pin_nid, 0, | ||
1159 | AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl | PIN_OUT); | ||
1160 | |||
1161 | return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); | 1161 | return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); |
1162 | } | 1162 | } |
1163 | 1163 | ||