From: Takashi Iwai <tiwai@suse.de>
To: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Patches Audio <patches.audio@intel.com>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"Babu, Ramesh" <ramesh.babu@intel.com>,
"Koul, Vinod" <vinod.koul@intel.com>,
"broonie@kernel.org" <broonie@kernel.org>
Subject: Re: [PATCH 15/15] ASoC: hdac_hdmi: Keep display active while enumerating codec
Date: Wed, 02 Dec 2015 11:24:53 +0100 [thread overview]
Message-ID: <s5htwo1407e.wl-tiwai@suse.de> (raw)
In-Reply-To: <20151202153736.GA22880@subhransu-desktop>
On Wed, 02 Dec 2015 16:37:36 +0100,
Subhransu S. Prusty wrote:
>
> On Tue, Dec 01, 2015 at 06:08:28PM +0100, Takashi Iwai wrote:
> > On Tue, 01 Dec 2015 17:48:43 +0100,
> > Babu, Ramesh wrote:
> > >
> > > > On Tue, 01 Dec 2015 22:48:41 +0100,
> > > > Subhransu S. Prusty wrote:
> > > > >
> > > > > On Tue, Dec 01, 2015 at 01:57:01PM +0100, Takashi Iwai wrote:
> > > > > > On Tue, 01 Dec 2015 18:47:11 +0100,
> > > > > > Subhransu S. Prusty wrote:
> > > > > > >
> > > > > > > From: Ramesh Babu <ramesh.babu@intel.com>
> > > > > > >
> > > > > > > Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
> > > > > > > Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
> > > > > > > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> > > > > > > ---
> > > > > > > sound/soc/codecs/hdac_hdmi.c | 8 ++++++++
> > > > > > > 1 file changed, 8 insertions(+)
> > > > > > >
> > > > > > > diff --git a/sound/soc/codecs/hdac_hdmi.c
> > > > b/sound/soc/codecs/hdac_hdmi.c
> > > > > > > index 46aa5cc..fa3cfa5 100644
> > > > > > > --- a/sound/soc/codecs/hdac_hdmi.c
> > > > > > > +++ b/sound/soc/codecs/hdac_hdmi.c
> > > > > > > @@ -1136,6 +1136,14 @@ static int hdac_hdmi_dev_probe(struct
> > > > hdac_ext_device *edev)
> > > > > > > INIT_LIST_HEAD(&hdmi_priv->pin_list);
> > > > > > > INIT_LIST_HEAD(&hdmi_priv->cvt_list);
> > > > > > >
> > > > > > > + ret = snd_hdac_display_power(edev->hdac.bus, true);
> > > > > > > + if (ret < 0) {
> > > > > > > + dev_err(&edev->hdac.dev,
> > > > > > > + "Cannot turn on display power on i915 err: %d\n",
> > > > > > > + ret);
> > > > > > > + return ret;
> > > > > > > + }
> > > > > > > +
> > > > > > > ret = hdac_hdmi_parse_and_map_nid(edev, &hdmi_dais, &num_dais);
> > > > > > > if (ret < 0) {
> > > > > > > dev_err(&codec->dev, "Failed in parse and map nid with err:
> > > > %d\n", ret);
> > > > > > > --
> > > > > > > 1.9.1
> > > > > >
> > > > > > No counterpart to turn off?
> > > > > turned off in runtime suspend during first explicit suspend call.
> > > >
> > > > It's a refcount, hence it does matter how many times it's called.
> > > > Does it really balance well? It smells suspicious if you add only a
> > > > call to turn on without turning off...
> > >
> > > Display power is turned ON during device probe. When soc codec probe
> > > completes, runtime suspend call is invoked and display power is turned OFF.
> > > So refcount is balanced.
> >
> > The runtime suspend of the codec, or of the controller? I haven't
> > seen the codec suspend/resume doing it in this patchset, so I wonder.
>
> It is turned off in the runtime suspend of the codec. It was added in the
> basic driver patch series as part of PM enabling where it enables the
> display during runtime resume and disable during runtime suspend. But
> when the device runtime PM is first enabled and the device is put to
> suspend, only runtime suspend gets called which doesn't actually decrement
> the display reference count but throws a warning. With this patch that
> gets fixed as well.
So, the patch is about fixing the unbalance. It clarifies my
suspect. The problem is that $SUBJECT doesn't mention it at all, and
even the patch had zero changelog text. Please document more!
Also, if this is a fix, you should put Fixes tag.
BTW, who will turn off the display power at codec removal?
thanks,
Takashi
> > if it's really well balanced, you should add the proper comment in the
> > code who turns off at when and where. Otherwise reader will be lost.
>
> Sure. Will udpate the changelog and add some comments in the code as well.
>
> >
> >
> > Takashi
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
> --
>
next prev parent reply other threads:[~2015-12-02 10:24 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 17:42 [PATCH 00/15] ASoC: hdac_hdmi: Add DP & notification support Subhransu S. Prusty
2015-12-01 17:46 ` [PATCH 01/15] ASoC: hdac_hdmi: Fix to check num nodes correctly Subhransu S. Prusty
2015-12-01 12:27 ` Takashi Iwai
2015-12-01 19:08 ` Subhransu S. Prusty
2015-12-01 17:46 ` [PATCH 02/15] ASoC: hdac_hdmi: Fix to warn instead of err for no connected nids Subhransu S. Prusty
2016-01-08 13:44 ` Applied "ASoC: hdac_hdmi: Fix to warn instead of err for no connected nids" to the asoc tree Mark Brown
2015-12-01 17:46 ` [PATCH 03/15] ASoC: hdac_hdmi - Use list to add pins and converters Subhransu S. Prusty
2015-12-01 12:47 ` Takashi Iwai
2015-12-01 22:50 ` Subhransu S. Prusty
2015-12-01 18:52 ` Takashi Iwai
2015-12-02 9:31 ` Takashi Iwai
2015-12-03 10:36 ` Subhransu S. Prusty
2015-12-01 17:47 ` [PATCH 04/15] ALSA: hda - Add helper to read eld data Subhransu S. Prusty
2015-12-01 12:39 ` Takashi Iwai
2015-12-01 19:12 ` Subhransu S. Prusty
2015-12-01 13:55 ` Takashi Iwai
2015-12-01 17:47 ` [PATCH 05/15] ASoC: hdac_hdmi: Add hotplug notification and read eld Subhransu S. Prusty
2015-12-01 12:37 ` Takashi Iwai
2015-12-01 20:14 ` Subhransu S. Prusty
2015-12-01 17:47 ` [PATCH 06/15] ALSA: pcm: Add DRM helper to set constraint for format Subhransu S. Prusty
2015-12-01 12:55 ` Takashi Iwai
2015-12-02 12:27 ` Subhransu S. Prusty
2015-12-02 9:23 ` Takashi Iwai
2015-12-01 17:47 ` [PATCH 07/15] ASoC: hdac_hdmi: Apply constraints based on ELD Subhransu S. Prusty
2015-12-01 17:47 ` [PATCH 08/15] ASoC: hdac_hdmi: Enable DP1.2 and all converters/pins Subhransu S. Prusty
2015-12-01 17:47 ` [PATCH 09/15] ASoC: hdac_hdmi - create dais based on number of streams Subhransu S. Prusty
2015-12-01 17:47 ` [PATCH 10/15] ASoC: hdac_hdmi: Create widget/route based on nodes enumerated Subhransu S. Prusty
2015-12-01 17:47 ` [PATCH 11/15] ASoC: hdac_hdmi: Assign pin for stream based on dapm connection Subhransu S. Prusty
2015-12-01 17:47 ` [PATCH 12/15] drm/edid: Add API to help find connection type Subhransu S. Prusty
2015-12-02 9:53 ` Jani Nikula
2015-12-02 17:07 ` Thierry Reding
2015-12-03 16:08 ` [alsa-devel] " Subhransu S. Prusty
2015-12-03 11:09 ` Jani Nikula
2015-12-03 11:21 ` Thierry Reding
2015-12-03 17:14 ` Subhransu S. Prusty
2015-12-02 17:16 ` Subhransu S. Prusty
2015-12-01 17:47 ` [PATCH 13/15] ASoC: hdac_hdmi: Add infoframe support for dp audio Subhransu S. Prusty
2015-12-01 17:47 ` [PATCH 14/15] ASoC: hdac_hdmi: Add codec suspend/resume handler Subhransu S. Prusty
2015-12-01 17:47 ` [PATCH 15/15] ASoC: hdac_hdmi: Keep display active while enumerating codec Subhransu S. Prusty
2015-12-01 12:57 ` Takashi Iwai
2015-12-01 21:48 ` Subhransu S. Prusty
2015-12-01 16:33 ` Takashi Iwai
2015-12-01 16:48 ` Babu, Ramesh
2015-12-01 17:08 ` Takashi Iwai
2015-12-02 15:37 ` Subhransu S. Prusty
2015-12-02 10:24 ` Takashi Iwai [this message]
2015-12-02 10:31 ` Takashi Iwai
2015-12-02 16:23 ` Subhransu S. Prusty
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=s5htwo1407e.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=patches.audio@intel.com \
--cc=ramesh.babu@intel.com \
--cc=subhransu.s.prusty@intel.com \
--cc=vinod.koul@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox