Skip to contentSkip to conversation

ALSA: hda - hdmi defer to register acomp eld notifier

PATCH In review [email protected] 3 participants 3 messages Mar 2, 2016 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda - hdmi defer to register acomp eld notifier

From: Libin Yang <[email protected]>

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

---
 sound/pci/hda/patch_hdmi.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
sound/pci/hda/patch_hdmi.c +7 -7
index aa2d6a2..a3de50b 100644
@@ -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;
 }
Signature · 1 line
1.9.1
#1 lore raw
Quoted 5 lines · On Wed, 02 Mar 2016 06:19:43 +0100, [email protected] wrote:

From: Libin Yang <[email protected]>

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

Quoted 41 lines
---
 sound/pci/hda/patch_hdmi.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
sound/pci/hda/patch_hdmi.c +7 -7
index aa2d6a2..a3de50b 100644
@@ -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;
 }
Signature · 1 line
1.9.1
#2 lore raw

Hi Takashi,

Quoted 10 lines

-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Wednesday, March 02, 2016 3:43 PM
To: [email protected]
Cc: [email protected]; Lin, Mengdong; Yang, Libin
Subject: Re: [PATCH] ALSA: hda - hdmi defer to register acomp eld notifier

Quoted 1 line · On Wed, 02 Mar 2016 06:19:43 +0100, [email protected] wrote:
Quoted 7 lines
Quoted 4 lines

From: Libin Yang <[email protected]>

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

Quoted 55 lines

thanks,

Takashi

Review

Quoted 7 lines
---
 sound/pci/hda/patch_hdmi.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
(quoted diff) +0 -0

b/sound/pci/hda/patch_hdmi.c

sound/pci/hda/patch_hdmi.c static int patch_generic_hdmi(struct

Quoted 4 lines

index aa2d6a2..a3de50b 100644

sound/pci/hda/patch_hdmi.c +0 -0
@@ -2936,13 +2936,6 @@ static int patch_generic_hdmi(struct

hda_codec *codec)

sound/pci/hda/patch_hdmi.c static int patch_generic_hdmi(struct hda_codec *codec)

Quoted 7 lines
sound/pci/hda/patch_hdmi.c +0 -4
 			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;

sound/pci/hda/patch_hdmi.c static int patch_generic_hdmi(struct

Quoted 8 lines
sound/pci/hda/patch_hdmi.c +0 -3
-		snd_hdac_i915_register_notifier(&spec-
 i915_audio_ops);
-	}
-
 	if (hdmi_parse_codec(codec) < 0) {
 		if (spec->i915_bound)
sound/pci/hda/patch_hdmi.c +0 -0
 			snd_hdac_i915_exit(&codec->bus->core);
@@ -2964,6 +2957,13 @@ static int patch_generic_hdmi(struct

hda_codec *codec)

sound/pci/hda/patch_hdmi.c static int patch_generic_hdmi(struct hda_codec *codec)

Quoted 7 lines
sound/pci/hda/patch_hdmi.c +4 -0
 	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;

sound/pci/hda/patch_hdmi.c static int patch_generic_hdmi(struct · line 2967

Quoted 5 lines
sound/pci/hda/patch_hdmi.c +3 -0
+		snd_hdac_i915_register_notifier(&spec-
 i915_audio_ops);
+	}
+
 	WARN_ON(spec->dyn_pcm_assign

&& !codec_has_acomp(codec));

Quoted 5 lines
sound/pci/hda/patch_hdmi.c +0 -1
 	return 0;
 }
--

1.9.1