All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda - hdmi defer to register acomp eld notifier
@ 2016-03-02  5:19 libin.yang
  2016-03-02  7:43 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: libin.yang @ 2016-03-02  5:19 UTC (permalink / raw)
  To: alsa-devel, tiwai; +Cc: libin.yang, mengdong.lin, Libin Yang

From: Libin Yang <libin.yang@linux.intel.com>

Defer to register acomp eld notifier until hdmi audio driver
is fully ready.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
---
 sound/pci/hda/patch_hdmi.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index aa2d6a2..a3de50b 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -2936,13 +2936,6 @@ static int patch_generic_hdmi(struct hda_codec *codec)
 			is_broxton(codec))
 		codec->core.link_power_control = 1;
 
-	if (codec_has_acomp(codec)) {
-		codec->depop_delay = 0;
-		spec->i915_audio_ops.audio_ptr = codec;
-		spec->i915_audio_ops.pin_eld_notify = intel_pin_eld_notify;
-		snd_hdac_i915_register_notifier(&spec->i915_audio_ops);
-	}
-
 	if (hdmi_parse_codec(codec) < 0) {
 		if (spec->i915_bound)
 			snd_hdac_i915_exit(&codec->bus->core);
@@ -2964,6 +2957,13 @@ static int patch_generic_hdmi(struct hda_codec *codec)
 
 	init_channel_allocations();
 
+	if (codec_has_acomp(codec)) {
+		codec->depop_delay = 0;
+		spec->i915_audio_ops.audio_ptr = codec;
+		spec->i915_audio_ops.pin_eld_notify = intel_pin_eld_notify;
+		snd_hdac_i915_register_notifier(&spec->i915_audio_ops);
+	}
+
 	WARN_ON(spec->dyn_pcm_assign && !codec_has_acomp(codec));
 	return 0;
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ALSA: hda - hdmi defer to register acomp eld notifier
  2016-03-02  5:19 [PATCH] ALSA: hda - hdmi defer to register acomp eld notifier libin.yang
@ 2016-03-02  7:43 ` Takashi Iwai
  2016-03-02  7:48   ` Yang, Libin
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2016-03-02  7:43 UTC (permalink / raw)
  To: libin.yang; +Cc: libin.yang, mengdong.lin, alsa-devel

On Wed, 02 Mar 2016 06:19:43 +0100,
libin.yang@linux.intel.com wrote:
> 
> From: Libin Yang <libin.yang@linux.intel.com>
> 
> Defer to register acomp eld notifier until hdmi audio driver
> is fully ready.

When you submit a patch, especially fixing something, please give
always "why".  This is the most important information.


thanks,

Takashi

> 
> Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
> ---
>  sound/pci/hda/patch_hdmi.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
> index aa2d6a2..a3de50b 100644
> --- a/sound/pci/hda/patch_hdmi.c
> +++ b/sound/pci/hda/patch_hdmi.c
> @@ -2936,13 +2936,6 @@ static int patch_generic_hdmi(struct hda_codec *codec)
>  			is_broxton(codec))
>  		codec->core.link_power_control = 1;
>  
> -	if (codec_has_acomp(codec)) {
> -		codec->depop_delay = 0;
> -		spec->i915_audio_ops.audio_ptr = codec;
> -		spec->i915_audio_ops.pin_eld_notify = intel_pin_eld_notify;
> -		snd_hdac_i915_register_notifier(&spec->i915_audio_ops);
> -	}
> -
>  	if (hdmi_parse_codec(codec) < 0) {
>  		if (spec->i915_bound)
>  			snd_hdac_i915_exit(&codec->bus->core);
> @@ -2964,6 +2957,13 @@ static int patch_generic_hdmi(struct hda_codec *codec)
>  
>  	init_channel_allocations();
>  
> +	if (codec_has_acomp(codec)) {
> +		codec->depop_delay = 0;
> +		spec->i915_audio_ops.audio_ptr = codec;
> +		spec->i915_audio_ops.pin_eld_notify = intel_pin_eld_notify;
> +		snd_hdac_i915_register_notifier(&spec->i915_audio_ops);
> +	}
> +
>  	WARN_ON(spec->dyn_pcm_assign && !codec_has_acomp(codec));
>  	return 0;
>  }
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ALSA: hda - hdmi defer to register acomp eld notifier
  2016-03-02  7:43 ` Takashi Iwai
@ 2016-03-02  7:48   ` Yang, Libin
  0 siblings, 0 replies; 3+ messages in thread
From: Yang, Libin @ 2016-03-02  7:48 UTC (permalink / raw)
  To: Takashi Iwai, libin.yang@linux.intel.com
  Cc: Lin, Mengdong, alsa-devel@alsa-project.org

Hi Takashi,

> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Wednesday, March 02, 2016 3:43 PM
> To: libin.yang@linux.intel.com
> Cc: alsa-devel@alsa-project.org; Lin, Mengdong; Yang, Libin
> Subject: Re: [PATCH] ALSA: hda - hdmi defer to register acomp eld notifier
> 
> On Wed, 02 Mar 2016 06:19:43 +0100,
> libin.yang@linux.intel.com wrote:
> >
> > From: Libin Yang <libin.yang@linux.intel.com>
> >
> > Defer to register acomp eld notifier until hdmi audio driver
> > is fully ready.
> 
> When you submit a patch, especially fixing something, please give
> always "why".  This is the most important information.

Get it. Thanks. I will explain it. 

Regards,
Libin

> 
> 
> thanks,
> 
> Takashi
> 
> >
> > Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
> > ---
> >  sound/pci/hda/patch_hdmi.c | 14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/sound/pci/hda/patch_hdmi.c
> b/sound/pci/hda/patch_hdmi.c
> > index aa2d6a2..a3de50b 100644
> > --- a/sound/pci/hda/patch_hdmi.c
> > +++ b/sound/pci/hda/patch_hdmi.c
> > @@ -2936,13 +2936,6 @@ static int patch_generic_hdmi(struct
> hda_codec *codec)
> >  			is_broxton(codec))
> >  		codec->core.link_power_control = 1;
> >
> > -	if (codec_has_acomp(codec)) {
> > -		codec->depop_delay = 0;
> > -		spec->i915_audio_ops.audio_ptr = codec;
> > -		spec->i915_audio_ops.pin_eld_notify =
> intel_pin_eld_notify;
> > -		snd_hdac_i915_register_notifier(&spec-
> >i915_audio_ops);
> > -	}
> > -
> >  	if (hdmi_parse_codec(codec) < 0) {
> >  		if (spec->i915_bound)
> >  			snd_hdac_i915_exit(&codec->bus->core);
> > @@ -2964,6 +2957,13 @@ static int patch_generic_hdmi(struct
> hda_codec *codec)
> >
> >  	init_channel_allocations();
> >
> > +	if (codec_has_acomp(codec)) {
> > +		codec->depop_delay = 0;
> > +		spec->i915_audio_ops.audio_ptr = codec;
> > +		spec->i915_audio_ops.pin_eld_notify =
> intel_pin_eld_notify;
> > +		snd_hdac_i915_register_notifier(&spec-
> >i915_audio_ops);
> > +	}
> > +
> >  	WARN_ON(spec->dyn_pcm_assign
> && !codec_has_acomp(codec));
> >  	return 0;
> >  }
> > --
> > 1.9.1
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-02  7:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-02  5:19 [PATCH] ALSA: hda - hdmi defer to register acomp eld notifier libin.yang
2016-03-02  7:43 ` Takashi Iwai
2016-03-02  7:48   ` Yang, Libin

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.