From: Takashi Iwai Subject: Re: [PATCH 1/2] ALSA: hdmi - poll eld at resume time Date: Mon, 24 Jun 2013 13:32:56 +0200 Message-ID: References: <1372074324-13563-1-git-send-email-xingchao.wang@linux.intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id D05F2261AFB for ; Mon, 24 Jun 2013 13:32:01 +0200 (CEST) In-Reply-To: <1372074324-13563-1-git-send-email-xingchao.wang@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Wang Xingchao Cc: alsa-devel@alsa-project.org, xingchao.wang@intel.com List-Id: alsa-devel@alsa-project.org At Mon, 24 Jun 2013 07:45:23 -0400, Wang Xingchao wrote: > > Hdmi driver may not receive intrinsic event from gfx side when > it's in runtime suspend mode. There's no ELD info when exit from > runtime suspend. This patch avoid missing ELD info. hda_call_codec_resume() sets the jack detection all dirty, thus each jack detection callback should be called at resume. Didn't it work as expected? Takashi > > Signed-off-by: Wang Xingchao > --- > sound/pci/hda/patch_hdmi.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c > index 7803ddd..cb8ac66 100644 > --- a/sound/pci/hda/patch_hdmi.c > +++ b/sound/pci/hda/patch_hdmi.c > @@ -1868,12 +1868,33 @@ static void generic_hdmi_free(struct hda_codec *codec) > kfree(spec); > } > > +#ifdef CONFIG_PM > +static int generic_hdmi_resume(struct hda_codec *codec) > +{ > + struct hdmi_spec *spec = codec->spec; > + int pin_idx; > + > + generic_hdmi_init(codec); > + snd_hda_codec_resume_amp(codec); > + snd_hda_codec_resume_cache(codec); > + > + for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) { > + struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); > + hdmi_present_sense(per_pin, 1); > + } > + return 0; > +} > +#endif > + > static const struct hda_codec_ops generic_hdmi_patch_ops = { > .init = generic_hdmi_init, > .free = generic_hdmi_free, > .build_pcms = generic_hdmi_build_pcms, > .build_controls = generic_hdmi_build_controls, > .unsol_event = hdmi_unsol_event, > +#ifdef CONFIG_PM > + .resume = generic_hdmi_resume, > +#endif > }; > > > -- > 1.8.1.2 >