All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Wang, Xingchao" <xingchao.wang@intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Wang Xingchao <xingchao.wang@linux.intel.com>
Subject: Re: [PATCH 1/2] ALSA: hdmi - poll eld at resume time
Date: Tue, 25 Jun 2013 09:06:32 +0200	[thread overview]
Message-ID: <s5hy59yzn2f.wl%tiwai@suse.de> (raw)
In-Reply-To: <46B810F6945F7C4788E11DCE57EC4890118343CA@SHSMSX104.ccr.corp.intel.com>

At Tue, 25 Jun 2013 06:34:49 +0000,
Wang, Xingchao wrote:
> 
> Hi Takashi,
> 
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai@suse.de]
> > Sent: Tuesday, June 25, 2013 2:07 PM
> > To: Wang, Xingchao
> > Cc: alsa-devel@alsa-project.org; Wang Xingchao
> > Subject: Re: [PATCH 1/2] ALSA: hdmi - poll eld at resume time
> > 
> > At Tue, 25 Jun 2013 04:54:05 +0000,
> > Wang, Xingchao wrote:
> > >
> > > Hi Takashi,
> > >
> > >
> > > > -----Original Message-----
> > > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > > Sent: Monday, June 24, 2013 8:50 PM
> > > > To: Wang, Xingchao
> > > > Cc: alsa-devel@alsa-project.org; Wang Xingchao
> > > > Subject: Re: [PATCH 1/2] ALSA: hdmi - poll eld at resume time
> > > >
> > > > At Mon, 24 Jun 2013 12:19:42 +0000,
> > > > Wang, Xingchao wrote:
> > > > >
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > > > > Sent: Monday, June 24, 2013 7:33 PM
> > > > > > To: Wang Xingchao
> > > > > > Cc: alsa-devel@alsa-project.org; Wang, Xingchao
> > > > > > Subject: Re: [PATCH 1/2] ALSA: hdmi - poll eld at resume time
> > > > > >
> > > > > > 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?
> > > > >
> > > > > I would double check that. In my test, it doesnot work as expected.
> > > >
> > > > OK, I found the problem.  patch_hdmi.c enables the jack detection
> > > > stuff without the callback, so the resume code triggers the check of
> > > > jack detection but only updates the kcontrols.
> > >
> > > You patch did not resolve the issue.
> > > I added some debug log, the callback wasnot called at all.
> > 
> > Even if you unplugged while runtime suspend?
> 
> Yes, the controller/codec suspended in runtime already.
> 
> > 
> > The callback is called only when the plug status (i.e. the jack detection state)
> > change is detected at the resume time -- i.e. the state the driver holds differs
> > from the state at the resume.
> > 
> 
> Do you assume jackpoll_interval be non-zero? If so the hda_jackpoll_work will continue to run periodically.
> IMO the callback just need be called only once at resume time.

Hmm, the problem is that the callback updater isn't called in the
resume path as default.  The oneliner below will fix it.

But, looking through all changes, maybe your first patch is easier to
apply as is now.  I'll take it.

We need a bit more cleanups over init and resume codes after all.
The init callback is called before calling build_controls and
build_pcm, and the very same init callback is called also in the
resume path (if the resume callback is undefined).  This causes the
confusion, too.

In patch_hdmi.c, the init changes only the pin control and amp, and
can't touch anything else, because it cannot call any pin-related
events at that point since the necessary resources are added in the
later point, generic_hdmi_build_controls().


thanks,

Takashi



> 
> Thanks
> --xingchao
> 

  reply	other threads:[~2013-06-25  7:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 11:45 [PATCH 1/2] ALSA: hdmi - poll eld at resume time Wang Xingchao
2013-06-24 10:43 ` Wang, Xingchao
2013-06-24 11:32 ` Takashi Iwai
2013-06-24 12:19   ` Wang, Xingchao
2013-06-24 12:49     ` Takashi Iwai
2013-06-25  4:54       ` Wang, Xingchao
2013-06-25  6:06         ` Takashi Iwai
2013-06-25  6:34           ` Wang, Xingchao
2013-06-25  7:06             ` Takashi Iwai [this message]
2013-06-25  7:09               ` Takashi Iwai
2013-06-25  8:30                 ` Wang, Xingchao
2013-06-26  4:28                   ` Wang, Xingchao
2013-06-25  6:15       ` Wang, Xingchao
2013-06-24 11:45 ` [PATCH 2/2] ALSA: hda - get realtime ELD info when codec suspended Wang Xingchao
2013-06-24 11:36   ` Takashi Iwai
2013-06-24 11:56     ` Wang, Xingchao
2013-06-24 12:00       ` Takashi Iwai
2013-06-24 12:47         ` David Henningsson
2013-06-24 13:00           ` Takashi Iwai
2013-06-25  7:45             ` David Henningsson
2013-06-25  7:55               ` Takashi Iwai
2013-06-25  9:02                 ` David Henningsson
2013-06-25  9:33                   ` Wang, Xingchao
2013-06-25  9:43                     ` David Henningsson
2013-07-12  6:13                       ` Wang Xingchao
2013-07-15  4:28                         ` David Henningsson
2013-07-15  8:54                           ` Wang, Xingchao
2013-07-17 10:15                             ` Wang, Xingchao
2013-07-18  5:47                               ` Wang, Xingchao
2013-07-18  6:43                                 ` Takashi Iwai

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=s5hy59yzn2f.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=xingchao.wang@intel.com \
    --cc=xingchao.wang@linux.intel.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.