ALSA: hda - Turn on PIN_OUT from hdmi playback prepare.
PATCH 1/1 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 allows calling snd_pcm_prepare after a system resume to restore audio.
--- sound/pci/hda/patch_hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+)
sound/pci/hda/patch_hdmi.c +6 -0
@@ -1153,11 +1153,17 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,struct hdmi_spec *spec = codec->spec;int pin_idx =hinfo_to_pin_index (spec, hinfo);hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid; +int pinctl;hdmi_set_channel_count (codec, cvt_nid, substream->runtime->channels);hdmi_setup_audio_infoframe (codec, pin_idx, substream); + pinctl =snd_hda_codec_read (codec, pin_nid,0 , +AC_VERB_GET_PIN_WIDGET_CONTROL ,0 ); +snd_hda_codec_write (codec, pin_nid,0 , +AC_VERB_SET_PIN_WIDGET_CONTROL , pinctl |PIN_OUT ); +return hdmi_setup_stream (codec, cvt_nid, pin_nid, stream_tag, format); }
Signature · 1 line
1.7.11.2.138.g2b53359
At Thu, 19 Jul 2012 02:19:11 -0700,
Quoted 6 lines · Dylan Reid
Turn on the pin widget's
PIN_OUTbit from playback prepare. The pin is enabled in open, but is disabled inhdmi_init_pinwhich is called during system resume. This causes a system suspend/resume during playback to mute HDMI/DP. Enabling the pin in prepare allows callingsnd_pcm_prepareafter a system resume to restore audio.
Then we can remove the corresponding code ingeneric_hdmi_playback_pcm_open()?
Takashi
Quoted 31 lines
Signed-off-by Dylan Reid <[email protected]>--- sound/pci/hda/patch_hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+)sound/pci/hda/patch_hdmi.c +6
-0@@ -1153,11 +1153,17 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,struct hdmi_spec *spec = codec->spec;int pin_idx =hinfo_to_pin_index (spec, hinfo);hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid; +int pinctl;hdmi_set_channel_count (codec, cvt_nid, substream->runtime->channels);hdmi_setup_audio_infoframe (codec, pin_idx, substream); + pinctl =snd_hda_codec_read (codec, pin_nid,0 , +AC_VERB_GET_PIN_WIDGET_CONTROL ,0 ); +snd_hda_codec_write (codec, pin_nid,0 , +AC_VERB_SET_PIN_WIDGET_CONTROL , pinctl |PIN_OUT ); +return hdmi_setup_stream (codec, cvt_nid, pin_nid, stream_tag, format); }Signature · 1 line
1.7.11.2.138.g2b53359
Quoted 11 lines · Takashi Iwai
At Thu, 19 Jul 2012 02:19:11 -0700,
Quoted 6 lines · Dylan Reid
Turn on the pin widget's
PIN_OUTbit from playback prepare. The pin is enabled in open, but is disabled inhdmi_init_pinwhich is called during system resume. This causes a system suspend/resume during playback to mute HDMI/DP. Enabling the pin in prepare allows callingsnd_pcm_prepareafter a system resume to restore audio.Then we can remove the corresponding code in
generic_hdmi_playback_pcm_open()?
good point, I'll run a quick test and send a new patch.
Quoted 35 lines
Takashi
Quoted 31 lines
Signed-off-by Dylan Reid <[email protected]>--- sound/pci/hda/patch_hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+)sound/pci/hda/patch_hdmi.c +6
-1@@ -1153,11 +1153,17 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,struct hdmi_spec *spec = codec->spec;int pin_idx =hinfo_to_pin_index (spec, hinfo);hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid; +int pinctl;hdmi_set_channel_count (codec, cvt_nid, substream->runtime->channels);hdmi_setup_audio_infoframe (codec, pin_idx, substream); + pinctl =snd_hda_codec_read (codec, pin_nid,0 , +AC_VERB_GET_PIN_WIDGET_CONTROL ,0 ); +snd_hda_codec_write (codec, pin_nid,0 , +AC_VERB_SET_PIN_WIDGET_CONTROL , pinctl |PIN_OUT ); +return hdmi_setup_stream (codec, cvt_nid, pin_nid, stream_tag, format); } --1.7.11.2.138.g2b53359
Quoted 10 lines · Dylan Reid
Quoted 9 lines · Takashi Iwai
At Thu, 19 Jul 2012 02:19:11 -0700,
Quoted 6 lines · Dylan Reid
Turn on the pin widget's
PIN_OUTbit from playback prepare. The pin is enabled in open, but is disabled inhdmi_init_pinwhich is called during system resume. This causes a system suspend/resume during playback to mute HDMI/DP. Enabling the pin in prepare allows callingsnd_pcm_prepareafter a system resume to restore audio.
Quoted 3 lines
Quoted 2 lines
Then we can remove the corresponding code in
generic_hdmi_playback_pcm_open()?good point, I'll run a quick test and send a new patch.
Leave a blank line before and after your comment, so that it easy to locate.
~Rajeev
Quoted 41 lines
Quoted 32 lines
Takashi
Quoted 28 lines
Signed-off-by Dylan Reid<[email protected]>--- sound/pci/hda/patch_hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+)sound/pci/hda/patch_hdmi.c +6
-0@@ -1153,11 +1153,17 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,struct hdmi_spec *spec = codec->spec;int pin_idx =hinfo_to_pin_index (spec, hinfo);hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid; +int pinctl;hdmi_set_channel_count (codec, cvt_nid, substream->runtime->channels);hdmi_setup_audio_infoframe (codec, pin_idx, substream); + pinctl =snd_hda_codec_read (codec, pin_nid,0 , +AC_VERB_GET_PIN_WIDGET_CONTROL ,0 ); +snd_hda_codec_write (codec, pin_nid,0 , +AC_VERB_SET_PIN_WIDGET_CONTROL , pinctl |PIN_OUT ); +return hdmi_setup_stream (codec, cvt_nid, pin_nid, stream_tag, format); }Quoted 3 lines
Quoted 3 lines
--
1.7.11.2.138.g2b53359_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
.