mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
	MANAGEM..." <alsa-devel@alsa-project.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] [sound] hdac-codec runtime suspended at PM:Suspend.
Date: Thu, 15 Mar 2018 16:12:44 +0530	[thread overview]
Message-ID: <20180315104237.GB13659@subhransu-desktop> (raw)
In-Reply-To: <20180314153714.GA11459@anshuman.gupta@intel.com>

On Wed, Mar 14, 2018 at 09:07:14PM +0530, Anshuman Gupta wrote:
> On Wed, Mar 14, 2018 at 11:53:58AM +0100, Rafael J. Wysocki wrote:
> > On Wed, Mar 14, 2018 at 11:38 AM, Anshuman Gupta
> > <anshuman.gupta@intel.com> wrote:
> > > On Mon, Mar 12, 2018 at 12:26:53PM +0100, Rafael J. Wysocki wrote:
> > >> On Mon, Mar 12, 2018 at 12:17 PM, Anshuman Gupta
> > >> <anshuman.gupta@intel.com> wrote:
> > >> >
> > >> > +       if (pm_runtime_status_suspended(dev))
> > >> > +               return;
> > >>
> > >> That, again, is somewhat fragile from the concurrency perspective.
> > >>
> > 
> > And here you want to avoid the below if the device is still suspended.
>   Yes, if we do not avoid the code below, complete callback takes about 
>   3 seconds due to snd_hdac_codec_read timed out because hdac controller 
>   would be in runtime suspend state.	
> > 
> > Why is the below code located in the ->complete callback anyway?
> > Shouldn't it be there in the ->resume one?
> > 
>   Yes even i am also having same doubt, why these power down and power up
>   sequences are part of prepare and complete callback.
>   Adding driver author "Subhransu S. Prusty" to provide more inputs on this.

This driver needs a late resume as it receives a jack notification from the
i915 driver and the skl controller driver resume may not have happened and
in turn hda controller may not ready. This ensures a synchronization for
jack event during resume from S3.

I think this patch defeats the purpose.

Regards,
Subhransu

> > >> >         /* Power up afg */
> > >> >         snd_hdac_codec_read(hdac, hdac->afg, 0, AC_VERB_SET_POWER_STATE,
> > >> >                                                         AC_PWRST_D0);
> > >> > --
> > >> > 2.7.4
> 
> -- 
> Thanks,
> Anshuman

-- 

  parent reply	other threads:[~2018-03-15 10:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 11:17 Anshuman Gupta
2018-03-12 11:26 ` Rafael J. Wysocki
     [not found]   ` <5aa8fbe9.4251620a.c3daa.3711SMTPIN_ADDED_BROKEN@mx.google.com>
2018-03-14 10:53     ` Rafael J. Wysocki
     [not found]       ` <20180314153714.GA11459@anshuman.gupta@intel.com>
2018-03-15 10:42         ` Subhransu S. Prusty [this message]
     [not found]           ` <20180315153230.GA16531@anshuman.gupta@intel.com>
2018-03-26  7:03             ` Subhransu S. Prusty
2018-03-26  7:30               ` Takashi Iwai
2018-03-27 15:36                 ` Lukas Wunner
2018-08-18 18:12   ` [PATCH v2 0/1] cover-letter " Anshuman Gupta
2018-08-18 18:12     ` [PATCH v2 1/1] " Anshuman Gupta
2018-08-28 16:34       ` Anshuman Gupta
2018-08-28 17:05         ` 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=20180315104237.GB13659@subhransu-desktop \
    --to=subhransu.s.prusty@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=anshuman.gupta@intel.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=rafael@kernel.org \
    --cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®