Re: [PATCH 15/15] ASoC: hdac_hdmi: Keep display active while enumerating codec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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@xxxxxxxxx>
> > > >
> > > > Signed-off-by: Ramesh Babu <ramesh.babu@xxxxxxxxx>
> > > > Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@xxxxxxxxx>
> > > > Signed-off-by: Vinod Koul <vinod.koul@xxxxxxxxx>
> > > > ---
> > > >  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. 





_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux