All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Dylan Reid <dgreid@chromium.org>
Cc: alsa-devel@alsa-project.org, swarren@nvidia.com
Subject: Re: [PATCH] ALSA: hda - Turn on PIN_OUT from hdmi playback prepare.
Date: Thu, 19 Jul 2012 11:26:30 +0200	[thread overview]
Message-ID: <s5h4np4gkzd.wl%tiwai@suse.de> (raw)
In-Reply-To: <1342689551-20669-1-git-send-email-dgreid@chromium.org>

At Thu, 19 Jul 2012 02:19:11 -0700,
Dylan Reid wrote:
> 
> 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.

Then we can remove the corresponding code in
generic_hdmi_playback_pcm_open()?


Takashi

> 
> Signed-off-by: Dylan Reid <dgreid@chromium.org>
> ---
>  sound/pci/hda/patch_hdmi.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
> index 0b4a1ea..c53f99c 100644
> --- a/sound/pci/hda/patch_hdmi.c
> +++ b/sound/pci/hda/patch_hdmi.c
> @@ -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
> 

  reply	other threads:[~2012-07-19  9:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19  9:19 [PATCH] ALSA: hda - Turn on PIN_OUT from hdmi playback prepare Dylan Reid
2012-07-19  9:26 ` Takashi Iwai [this message]
2012-07-19  9:34   ` Dylan Reid
2012-07-19  9:50     ` Rajeev kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h4np4gkzd.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=dgreid@chromium.org \
    --cc=swarren@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.