All of lore.kernel.org
 help / color / mirror / Atom feed
* Dell AIO speaker pop noise
@ 2019-04-16  7:30 Kailang
  2019-04-16  7:56 ` hwang4
  2019-04-16  8:01 ` Jaroslav Kysela
  0 siblings, 2 replies; 19+ messages in thread
From: Kailang @ 2019-04-16  7:30 UTC (permalink / raw)
  To: Takashi Iwai (tiwai@suse.de); +Cc: hwang4,  (alsa-devel@alsa-project.org)

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

Hi Takashi,

Issue 1: The noise keeps occurring via speaker when Headset is plugged in.
Issue 2: The humming noise is occuring when switching to sound of settings.
	 The noise will be stopped when switching to other options of settings.
Issue 3: The popping noise occurred for one second when plugged in and removed the headset.

This patch will solve this three issues.

BR,
Kailang

[-- Attachment #2: 0000-dell-aio-spk-noise.patch --]
[-- Type: application/octet-stream, Size: 2268 bytes --]

From 1d77714bd35c9178e20904c569cd6a9c2d649e1b Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Tue, 16 Apr 2019 15:20:20 +0800
Subject: [PATCH] ALSA: hda/realtek - Fixed Dell AIO speaker noise

Issue 1: The noise keeps occurring via speaker when Headset is plugged in.
Issue 2: The humming noise is occuring when switching to sound of settings.
	 The noise will be stopped when switching to other options of settings.
Issue 3: The popping noise occurred for one second when plugged in and removed the headset.

This patch will solve this three issues.

Signed-off-by: Kailang Yang <kailang@realtek.com>

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 810479766090..0ded0809546d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5452,6 +5452,19 @@ static void alc274_fixup_bind_dacs(struct hda_codec *codec,
 	spec->gen.preferred_dacs = preferred_pairs;
 }
 
+static void alc274_fixup_aio_speaker(struct hda_codec *codec,
+				    const struct hda_fixup *fix, int action)
+{
+	struct alc_spec *spec = codec->spec;
+
+	switch (action) {
+	case HDA_FIXUP_ACT_PRE_PROBE:
+		codec->power_save_node = 0;
+		spec->gen.suppress_auto_mute = 1;
+		break;
+	}
+}
+
 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
 static void alc285_fixup_invalidate_dacs(struct hda_codec *codec,
 			      const struct hda_fixup *fix, int action)
@@ -5677,6 +5690,7 @@ enum {
 	ALC294_FIXUP_LENOVO_MIC_LOCATION,
 	ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
 	ALC700_FIXUP_INTEL_REFERENCE,
+	ALC274_FIXUP_DELL_AIO_SPK,
 	ALC274_FIXUP_DELL_BIND_DACS,
 	ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
 	ALC298_FIXUP_TPT470_DOCK,
@@ -6551,11 +6565,17 @@ static const struct hda_fixup alc269_fixups[] = {
 			{}
 		}
 	},
+	[ALC274_FIXUP_DELL_AIO_SPK] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc274_fixup_aio_speaker,
+		.chained = true,
+		.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
+	},
 	[ALC274_FIXUP_DELL_BIND_DACS] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc274_fixup_bind_dacs,
 		.chained = true,
-		.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
+		.chain_id = ALC274_FIXUP_DELL_AIO_SPK
 	},
 	[ALC274_FIXUP_DELL_AIO_LINEOUT_VERB] = {
 		.type = HDA_FIXUP_PINS,

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* Re: Dell AIO speaker pop noise
  2019-04-16  7:30 Dell AIO speaker pop noise Kailang
@ 2019-04-16  7:56 ` hwang4
  2019-04-16  8:01 ` Jaroslav Kysela
  1 sibling, 0 replies; 19+ messages in thread
From: hwang4 @ 2019-04-16  7:56 UTC (permalink / raw)
  To: Kailang, Takashi Iwai (tiwai@suse.de); +Cc: (alsa-devel@alsa-project.org)

  Tested-by: Hui Wang <hui.wang@canonical.com>

On 2019/4/16 下午3:30, Kailang wrote:
> Hi Takashi,
>
> Issue 1: The noise keeps occurring via speaker when Headset is plugged in.
> Issue 2: The humming noise is occuring when switching to sound of settings.
> 	 The noise will be stopped when switching to other options of settings.
> Issue 3: The popping noise occurred for one second when plugged in and removed the headset.
>
> This patch will solve this three issues.
>
> BR,
> Kailang
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Dell AIO speaker pop noise
  2019-04-16  7:30 Dell AIO speaker pop noise Kailang
  2019-04-16  7:56 ` hwang4
@ 2019-04-16  8:01 ` Jaroslav Kysela
  2019-04-16  8:21   ` Takashi Iwai
  1 sibling, 1 reply; 19+ messages in thread
From: Jaroslav Kysela @ 2019-04-16  8:01 UTC (permalink / raw)
  To: Kailang, Takashi Iwai (tiwai@suse.de)
  Cc: hwang4, (alsa-devel@alsa-project.org)

Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> Hi Takashi,
> 
> Issue 1: The noise keeps occurring via speaker when Headset is plugged in.
> Issue 2: The humming noise is occuring when switching to sound of settings.
> 	 The noise will be stopped when switching to other options of settings.
> Issue 3: The popping noise occurred for one second when plugged in and removed the headset.
> 
> This patch will solve this three issues.

Hi,

  could you explain, why the power-save function causes this behaviour? Can we do something else than turning off the power-save codec settings to avoid such noises? I have this question because it's
really easy to disable something, but I feel that the culprit of the noises might be just the wrong codec settings. I guess that you have probably full documentation for the codec and probably for the
hardware, so it might be nice to find the real culprit.

			Thank you,
				Jaroslav

> 
> BR,
> Kailang
> 
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 


-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

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

* Re: Dell AIO speaker pop noise
  2019-04-16  8:01 ` Jaroslav Kysela
@ 2019-04-16  8:21   ` Takashi Iwai
  2019-04-16  8:59     ` Kailang
  0 siblings, 1 reply; 19+ messages in thread
From: Takashi Iwai @ 2019-04-16  8:21 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: hwang4, (alsa-devel@alsa-project.org), Kailang

On Tue, 16 Apr 2019 10:01:31 +0200,
Jaroslav Kysela wrote:
> 
> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> > Hi Takashi,
> > 
> > Issue 1: The noise keeps occurring via speaker when Headset is plugged in.
> > Issue 2: The humming noise is occuring when switching to sound of settings.
> > 	 The noise will be stopped when switching to other options of settings.
> > Issue 3: The popping noise occurred for one second when plugged in and removed the headset.
> > 
> > This patch will solve this three issues.
> 
> Hi,
> 
>   could you explain, why the power-save function causes this behaviour? Can we do something else than turning off the power-save codec settings to avoid such noises? I have this question because it's
> really easy to disable something, but I feel that the culprit of the noises might be just the wrong codec settings. I guess that you have probably full documentation for the codec and probably for the
> hardware, so it might be nice to find the real culprit.

Note that power_save_node=0 doesn't mean that the whole power saving
is disabled.  It disables the fine-grained power saving, i.e. powering
down the unused widget nodes.

If so, I wonder whether this might be about the default pin-shutup
behavior.  I improved the click noise problem on my Dell desktop by
disabling the pin shutup.  See commit c0ca5eced222.
Kailang, Hui, did you try to add the chain to ALC269_FIXUP_NO_SHUTUP?


thanks,

Takashi

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

* Re: Dell AIO speaker pop noise
  2019-04-16  8:21   ` Takashi Iwai
@ 2019-04-16  8:59     ` Kailang
  2019-04-16  9:31       ` hwang4
  2019-04-16  9:59       ` Takashi Iwai
  0 siblings, 2 replies; 19+ messages in thread
From: Kailang @ 2019-04-16  8:59 UTC (permalink / raw)
  To: Takashi Iwai, Jaroslav Kysela; +Cc: hwang4, (alsa-devel@alsa-project.org)



> -----Original Message-----
> From: Takashi Iwai <tiwai@suse.de>
> Sent: Tuesday, April 16, 2019 4:22 PM
> To: Jaroslav Kysela <perex@perex.cz>
> Cc: Kailang <kailang@realtek.com>; hwang4 <hui.wang@canonical.com>;
> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> 
> On Tue, 16 Apr 2019 10:01:31 +0200,
> Jaroslav Kysela wrote:
> >
> > Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> > > Hi Takashi,
> > >
> > > Issue 1: The noise keeps occurring via speaker when Headset is plugged in.
> > > Issue 2: The humming noise is occuring when switching to sound of
> settings.
> > > 	 The noise will be stopped when switching to other options of settings.
> > > Issue 3: The popping noise occurred for one second when plugged in and
> removed the headset.
> > >
> > > This patch will solve this three issues.
> >
> > Hi,
> >
> >   could you explain, why the power-save function causes this
> > behaviour? Can we do something else than turning off the power-save
> > codec settings to avoid such noises? I have this question because it's really
> easy to disable something, but I feel that the culprit of the noises might be just
> the wrong codec settings. I guess that you have probably full documentation
> for the codec and probably for the hardware, so it might be nice to find the
> real culprit.
> 
> Note that power_save_node=0 doesn't mean that the whole power saving is
> disabled.  It disables the fine-grained power saving, i.e. powering down the
> unused widget nodes.
> 
> If so, I wonder whether this might be about the default pin-shutup behavior.  I
> improved the click noise problem on my Dell desktop by disabling the pin
> shutup.  See commit c0ca5eced222.
> Kailang, Hui, did you try to add the chain to ALC269_FIXUP_NO_SHUTUP?
> 
This noise was not happen on poweroff.
AIO use external AMP. So, it will be need to have a reference voltage via codec.
So, Pin-ctls was not be 0. I apply option spec->gen.suppress_auto_mute = 1 to avoid that. 
Internal SPK PIN also don't enter to D3. But I find it just only happen on ALC274 family codecs.
ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0 will let PIN to D0.

power_save = 0 it also could solve issue.



> 
> thanks,
> 
> Takashi
> 
> ------Please consider the environment before printing this e-mail.

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

* Re: Dell AIO speaker pop noise
  2019-04-16  8:59     ` Kailang
@ 2019-04-16  9:31       ` hwang4
  2019-04-16  9:43         ` Takashi Iwai
  2019-04-16  9:59       ` Takashi Iwai
  1 sibling, 1 reply; 19+ messages in thread
From: hwang4 @ 2019-04-16  9:31 UTC (permalink / raw)
  To: Kailang, Takashi Iwai, Jaroslav Kysela; +Cc: (alsa-devel@alsa-project.org)


On 2019/4/16 下午4:59, Kailang wrote:
>
>> -----Original Message-----
>> From: Takashi Iwai <tiwai@suse.de>
>> Sent: Tuesday, April 16, 2019 4:22 PM
>> To: Jaroslav Kysela <perex@perex.cz>
>> Cc: Kailang <kailang@realtek.com>; hwang4 <hui.wang@canonical.com>;
>> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
>>
>> On Tue, 16 Apr 2019 10:01:31 +0200,
>> Jaroslav Kysela wrote:
>>> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
>>>> Hi Takashi,
>>>>
>>>> Issue 1: The noise keeps occurring via speaker when Headset is plugged in.
>>>> Issue 2: The humming noise is occuring when switching to sound of
>> settings.
>>>> 	 The noise will be stopped when switching to other options of settings.
>>>> Issue 3: The popping noise occurred for one second when plugged in and
>> removed the headset.
>>>> This patch will solve this three issues.
>>> Hi,
>>>
>>>    could you explain, why the power-save function causes this
>>> behaviour? Can we do something else than turning off the power-save
>>> codec settings to avoid such noises? I have this question because it's really
>> easy to disable something, but I feel that the culprit of the noises might be just
>> the wrong codec settings. I guess that you have probably full documentation
>> for the codec and probably for the hardware, so it might be nice to find the
>> real culprit.
>>
>> Note that power_save_node=0 doesn't mean that the whole power saving is
>> disabled.  It disables the fine-grained power saving, i.e. powering down the
>> unused widget nodes.
>>
>> If so, I wonder whether this might be about the default pin-shutup behavior.  I
>> improved the click noise problem on my Dell desktop by disabling the pin
>> shutup.  See commit c0ca5eced222.
>> Kailang, Hui, did you try to add the chain to ALC269_FIXUP_NO_SHUTUP?
>>
> This noise was not happen on poweroff.
> AIO use external AMP. So, it will be need to have a reference voltage via codec.
> So, Pin-ctls was not be 0. I apply option spec->gen.suppress_auto_mute = 1 to avoid that.
> Internal SPK PIN also don't enter to D3. But I find it just only happen on ALC274 family codecs.
> ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0 will let PIN to D0.
>
> power_save = 0 it also could solve issue.


Yes, avoid setting pinctl is only part fix, the ODM said the main 
problem is the EAPD pin is high->low->high->low periodically, it has sth 
to do with the widget node power state.

>
>
>
>> thanks,
>>
>> Takashi
>>
>> ------Please consider the environment before printing this e-mail.
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Dell AIO speaker pop noise
  2019-04-16  9:31       ` hwang4
@ 2019-04-16  9:43         ` Takashi Iwai
  2019-04-16 11:26           ` hwang4
  0 siblings, 1 reply; 19+ messages in thread
From: Takashi Iwai @ 2019-04-16  9:43 UTC (permalink / raw)
  To: hwang4; +Cc: (alsa-devel@alsa-project.org), Kailang

On Tue, 16 Apr 2019 11:31:22 +0200,
hwang4 wrote:
> 
> 
> On 2019/4/16 下午4:59, Kailang wrote:
> >
> >> -----Original Message-----
> >> From: Takashi Iwai <tiwai@suse.de>
> >> Sent: Tuesday, April 16, 2019 4:22 PM
> >> To: Jaroslav Kysela <perex@perex.cz>
> >> Cc: Kailang <kailang@realtek.com>; hwang4 <hui.wang@canonical.com>;
> >> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> >> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> >>
> >> On Tue, 16 Apr 2019 10:01:31 +0200,
> >> Jaroslav Kysela wrote:
> >>> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> >>>> Hi Takashi,
> >>>>
> >>>> Issue 1: The noise keeps occurring via speaker when Headset is plugged in.
> >>>> Issue 2: The humming noise is occuring when switching to sound of
> >> settings.
> >>>> 	 The noise will be stopped when switching to other options of settings.
> >>>> Issue 3: The popping noise occurred for one second when plugged in and
> >> removed the headset.
> >>>> This patch will solve this three issues.
> >>> Hi,
> >>>
> >>>    could you explain, why the power-save function causes this
> >>> behaviour? Can we do something else than turning off the power-save
> >>> codec settings to avoid such noises? I have this question because it's really
> >> easy to disable something, but I feel that the culprit of the noises might be just
> >> the wrong codec settings. I guess that you have probably full documentation
> >> for the codec and probably for the hardware, so it might be nice to find the
> >> real culprit.
> >>
> >> Note that power_save_node=0 doesn't mean that the whole power saving is
> >> disabled.  It disables the fine-grained power saving, i.e. powering down the
> >> unused widget nodes.
> >>
> >> If so, I wonder whether this might be about the default pin-shutup behavior.  I
> >> improved the click noise problem on my Dell desktop by disabling the pin
> >> shutup.  See commit c0ca5eced222.
> >> Kailang, Hui, did you try to add the chain to ALC269_FIXUP_NO_SHUTUP?
> >>
> > This noise was not happen on poweroff.
> > AIO use external AMP. So, it will be need to have a reference voltage via codec.
> > So, Pin-ctls was not be 0. I apply option spec->gen.suppress_auto_mute = 1 to avoid that.
> > Internal SPK PIN also don't enter to D3. But I find it just only happen on ALC274 family codecs.
> > ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0 will let PIN to D0.
> >
> > power_save = 0 it also could solve issue.
> 
> 
> Yes, avoid setting pinctl is only part fix, the ODM said the main
> problem is the EAPD pin is high->low->high->low periodically, it has
> sth to do with the widget node power state.

FWIW, there is also spec->gen.keep_eapd_on=1 that prevents the EAPD
toggle at power saving.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Dell AIO speaker pop noise
  2019-04-16  8:59     ` Kailang
  2019-04-16  9:31       ` hwang4
@ 2019-04-16  9:59       ` Takashi Iwai
  2019-04-16 10:11         ` Kailang
  1 sibling, 1 reply; 19+ messages in thread
From: Takashi Iwai @ 2019-04-16  9:59 UTC (permalink / raw)
  To: Kailang; +Cc: hwang4, (alsa-devel@alsa-project.org)

On Tue, 16 Apr 2019 10:59:37 +0200,
Kailang wrote:
> 
> 
> 
> > -----Original Message-----
> > From: Takashi Iwai <tiwai@suse.de>
> > Sent: Tuesday, April 16, 2019 4:22 PM
> > To: Jaroslav Kysela <perex@perex.cz>
> > Cc: Kailang <kailang@realtek.com>; hwang4 <hui.wang@canonical.com>;
> > (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> > Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> > 
> > On Tue, 16 Apr 2019 10:01:31 +0200,
> > Jaroslav Kysela wrote:
> > >
> > > Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> > > > Hi Takashi,
> > > >
> > > > Issue 1: The noise keeps occurring via speaker when Headset is plugged in.
> > > > Issue 2: The humming noise is occuring when switching to sound of
> > settings.
> > > > 	 The noise will be stopped when switching to other options of settings.
> > > > Issue 3: The popping noise occurred for one second when plugged in and
> > removed the headset.
> > > >
> > > > This patch will solve this three issues.
> > >
> > > Hi,
> > >
> > >   could you explain, why the power-save function causes this
> > > behaviour? Can we do something else than turning off the power-save
> > > codec settings to avoid such noises? I have this question because it's really
> > easy to disable something, but I feel that the culprit of the noises might be just
> > the wrong codec settings. I guess that you have probably full documentation
> > for the codec and probably for the hardware, so it might be nice to find the
> > real culprit.
> > 
> > Note that power_save_node=0 doesn't mean that the whole power saving is
> > disabled.  It disables the fine-grained power saving, i.e. powering down the
> > unused widget nodes.
> > 
> > If so, I wonder whether this might be about the default pin-shutup behavior.  I
> > improved the click noise problem on my Dell desktop by disabling the pin
> > shutup.  See commit c0ca5eced222.
> > Kailang, Hui, did you try to add the chain to ALC269_FIXUP_NO_SHUTUP?
> > 
> This noise was not happen on poweroff.

The pin shutup change helped at the resume click noise in my case.

> AIO use external AMP. So, it will be need to have a reference voltage via codec.
> So, Pin-ctls was not be 0. I apply option spec->gen.suppress_auto_mute = 1 to avoid that. 

If a specific widget must not enter D3, you can filter out by setting
with power filter.  An example is found in patch_sigmatel.c
stac_vref_led_power_filter() which avoids D3 on AFG node for keeping
mute LED working.


Takashi

> Internal SPK PIN also don't enter to D3. But I find it just only happen on ALC274 family codecs.
> ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0 will let PIN to D0.
> 
> power_save = 0 it also could solve issue.
> 
> 
> 
> > 
> > thanks,
> > 
> > Takashi
> > 
> > ------Please consider the environment before printing this e-mail.
> 

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

* Re: Dell AIO speaker pop noise
  2019-04-16  9:59       ` Takashi Iwai
@ 2019-04-16 10:11         ` Kailang
  0 siblings, 0 replies; 19+ messages in thread
From: Kailang @ 2019-04-16 10:11 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: hwang4, (alsa-devel@alsa-project.org)



> -----Original Message-----
> From: Takashi Iwai <tiwai@suse.de>
> Sent: Tuesday, April 16, 2019 5:59 PM
> To: Kailang <kailang@realtek.com>
> Cc: Jaroslav Kysela <perex@perex.cz>; hwang4 <hui.wang@canonical.com>;
> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> 
> On Tue, 16 Apr 2019 10:59:37 +0200,
> Kailang wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Takashi Iwai <tiwai@suse.de>
> > > Sent: Tuesday, April 16, 2019 4:22 PM
> > > To: Jaroslav Kysela <perex@perex.cz>
> > > Cc: Kailang <kailang@realtek.com>; hwang4 <hui.wang@canonical.com>;
> > > (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> > > Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> > >
> > > On Tue, 16 Apr 2019 10:01:31 +0200,
> > > Jaroslav Kysela wrote:
> > > >
> > > > Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> > > > > Hi Takashi,
> > > > >
> > > > > Issue 1: The noise keeps occurring via speaker when Headset is plugged
> in.
> > > > > Issue 2: The humming noise is occuring when switching to sound
> > > > > of
> > > settings.
> > > > > 	 The noise will be stopped when switching to other options of
> settings.
> > > > > Issue 3: The popping noise occurred for one second when plugged
> > > > > in and
> > > removed the headset.
> > > > >
> > > > > This patch will solve this three issues.
> > > >
> > > > Hi,
> > > >
> > > >   could you explain, why the power-save function causes this
> > > > behaviour? Can we do something else than turning off the
> > > > power-save codec settings to avoid such noises? I have this
> > > > question because it's really
> > > easy to disable something, but I feel that the culprit of the noises
> > > might be just the wrong codec settings. I guess that you have
> > > probably full documentation for the codec and probably for the
> > > hardware, so it might be nice to find the real culprit.
> > >
> > > Note that power_save_node=0 doesn't mean that the whole power saving
> > > is disabled.  It disables the fine-grained power saving, i.e.
> > > powering down the unused widget nodes.
> > >
> > > If so, I wonder whether this might be about the default pin-shutup
> > > behavior.  I improved the click noise problem on my Dell desktop by
> > > disabling the pin shutup.  See commit c0ca5eced222.
> > > Kailang, Hui, did you try to add the chain to ALC269_FIXUP_NO_SHUTUP?
> > >
> > This noise was not happen on poweroff.
> 
> The pin shutup change helped at the resume click noise in my case.
> 
> > AIO use external AMP. So, it will be need to have a reference voltage via
> codec.
> > So, Pin-ctls was not be 0. I apply option spec->gen.suppress_auto_mute = 1 to
> avoid that.
> 
> If a specific widget must not enter D3, you can filter out by setting with power
> filter.  An example is found in patch_sigmatel.c
> stac_vref_led_power_filter() which avoids D3 on AFG node for keeping mute
> LED working.

Only ALC274 has this issue. It just PIN don't enter to D3. But codec enter to D3 will not have this issue.
When power_save = 1, codec will enter to D3 after one more second. If this time PIN in D3 state, it will show noise from speaker.
If set power_save_node = 0, noise was gone.
This symptom that I test on ALC225 with external AMP machine. It was not has this symptom.

> 
> 
> Takashi
> 
> > Internal SPK PIN also don't enter to D3. But I find it just only happen on
> ALC274 family codecs.
> > ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0 will let
> PIN to D0.
> >
> > power_save = 0 it also could solve issue.
> >
> >
> >
> > >
> > > thanks,
> > >
> > > Takashi
> > >
> > > ------Please consider the environment before printing this e-mail.
> >

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

* Re: Dell AIO speaker pop noise
  2019-04-16  9:43         ` Takashi Iwai
@ 2019-04-16 11:26           ` hwang4
  2019-04-16 11:57             ` Takashi Iwai
  2019-04-16 14:18             ` Kailang
  0 siblings, 2 replies; 19+ messages in thread
From: hwang4 @ 2019-04-16 11:26 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: (alsa-devel@alsa-project.org), Kailang


On 2019/4/16 下午5:43, Takashi Iwai wrote:
> On Tue, 16 Apr 2019 11:31:22 +0200,
> hwang4 wrote:
>>
>> On 2019/4/16 下午4:59, Kailang wrote:
>>>> -----Original Message-----
>>>> From: Takashi Iwai <tiwai@suse.de>
>>>> Sent: Tuesday, April 16, 2019 4:22 PM
>>>> To: Jaroslav Kysela <perex@perex.cz>
>>>> Cc: Kailang <kailang@realtek.com>; hwang4 <hui.wang@canonical.com>;
>>>> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
>>>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
>>>>
>>>> On Tue, 16 Apr 2019 10:01:31 +0200,
>>>> Jaroslav Kysela wrote:
>>>>> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
>>>>>> Hi Takashi,
>>>>>>
>>>>>> Issue 1: The noise keeps occurring via speaker when Headset is plugged in.
>>>>>> Issue 2: The humming noise is occuring when switching to sound of
>>>> settings.
>>>>>> 	 The noise will be stopped when switching to other options of settings.
>>>>>> Issue 3: The popping noise occurred for one second when plugged in and
>>>> removed the headset.
>>>>>> This patch will solve this three issues.
>>>>> Hi,
>>>>>
>>>>>     could you explain, why the power-save function causes this
>>>>> behaviour? Can we do something else than turning off the power-save
>>>>> codec settings to avoid such noises? I have this question because it's really
>>>> easy to disable something, but I feel that the culprit of the noises might be just
>>>> the wrong codec settings. I guess that you have probably full documentation
>>>> for the codec and probably for the hardware, so it might be nice to find the
>>>> real culprit.
>>>>
>>>> Note that power_save_node=0 doesn't mean that the whole power saving is
>>>> disabled.  It disables the fine-grained power saving, i.e. powering down the
>>>> unused widget nodes.
>>>>
>>>> If so, I wonder whether this might be about the default pin-shutup behavior.  I
>>>> improved the click noise problem on my Dell desktop by disabling the pin
>>>> shutup.  See commit c0ca5eced222.
>>>> Kailang, Hui, did you try to add the chain to ALC269_FIXUP_NO_SHUTUP?
>>>>
>>> This noise was not happen on poweroff.
>>> AIO use external AMP. So, it will be need to have a reference voltage via codec.
>>> So, Pin-ctls was not be 0. I apply option spec->gen.suppress_auto_mute = 1 to avoid that.
>>> Internal SPK PIN also don't enter to D3. But I find it just only happen on ALC274 family codecs.
>>> ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0 will let PIN to D0.
>>>
>>> power_save = 0 it also could solve issue.
>>
>> Yes, avoid setting pinctl is only part fix, the ODM said the main
>> problem is the EAPD pin is high->low->high->low periodically, it has
>> sth to do with the widget node power state.
> FWIW, there is also spec->gen.keep_eapd_on=1 that prevents the EAPD
> toggle at power saving.

Got it, but does it prevent Nodes or the whole codec from entering D3?

Here the EADP is low, it is not because the set_eapd() is called, I 
checked the EAPD of all nodes, they are all 0x2 all the time. And 
patch_realtek already set the own_eapd_ctl=1, and the NID for speaker is 
0x16, it is not in the:

     static hda_nid_t pins[] = {
         0x0f, 0x10, 0x14, 0x15, 0x17, 0
     };

So the driver will not set the eapd to 0 for speaker. If keep_eapd_on=1 
can prevent codec/nodes from entering D3, maybe it will help.

Thanks,

Hui.

>
>
> Takashi
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Dell AIO speaker pop noise
  2019-04-16 11:26           ` hwang4
@ 2019-04-16 11:57             ` Takashi Iwai
  2019-04-16 13:52               ` Kailang
  2019-04-16 14:18             ` Kailang
  1 sibling, 1 reply; 19+ messages in thread
From: Takashi Iwai @ 2019-04-16 11:57 UTC (permalink / raw)
  To: hwang4; +Cc: (alsa-devel@alsa-project.org), Kailang

On Tue, 16 Apr 2019 13:26:47 +0200,
hwang4 wrote:
> 
> 
> On 2019/4/16 下午5:43, Takashi Iwai wrote:
> > On Tue, 16 Apr 2019 11:31:22 +0200,
> > hwang4 wrote:
> >>
> >> On 2019/4/16 下午4:59, Kailang wrote:
> >>>> -----Original Message-----
> >>>> From: Takashi Iwai <tiwai@suse.de>
> >>>> Sent: Tuesday, April 16, 2019 4:22 PM
> >>>> To: Jaroslav Kysela <perex@perex.cz>
> >>>> Cc: Kailang <kailang@realtek.com>; hwang4 <hui.wang@canonical.com>;
> >>>> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> >>>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> >>>>
> >>>> On Tue, 16 Apr 2019 10:01:31 +0200,
> >>>> Jaroslav Kysela wrote:
> >>>>> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> >>>>>> Hi Takashi,
> >>>>>>
> >>>>>> Issue 1: The noise keeps occurring via speaker when Headset is plugged in.
> >>>>>> Issue 2: The humming noise is occuring when switching to sound of
> >>>> settings.
> >>>>>> 	 The noise will be stopped when switching to other options of settings.
> >>>>>> Issue 3: The popping noise occurred for one second when plugged in and
> >>>> removed the headset.
> >>>>>> This patch will solve this three issues.
> >>>>> Hi,
> >>>>>
> >>>>>     could you explain, why the power-save function causes this
> >>>>> behaviour? Can we do something else than turning off the power-save
> >>>>> codec settings to avoid such noises? I have this question because it's really
> >>>> easy to disable something, but I feel that the culprit of the noises might be just
> >>>> the wrong codec settings. I guess that you have probably full documentation
> >>>> for the codec and probably for the hardware, so it might be nice to find the
> >>>> real culprit.
> >>>>
> >>>> Note that power_save_node=0 doesn't mean that the whole power saving is
> >>>> disabled.  It disables the fine-grained power saving, i.e. powering down the
> >>>> unused widget nodes.
> >>>>
> >>>> If so, I wonder whether this might be about the default pin-shutup behavior.  I
> >>>> improved the click noise problem on my Dell desktop by disabling the pin
> >>>> shutup.  See commit c0ca5eced222.
> >>>> Kailang, Hui, did you try to add the chain to ALC269_FIXUP_NO_SHUTUP?
> >>>>
> >>> This noise was not happen on poweroff.
> >>> AIO use external AMP. So, it will be need to have a reference voltage via codec.
> >>> So, Pin-ctls was not be 0. I apply option spec->gen.suppress_auto_mute = 1 to avoid that.
> >>> Internal SPK PIN also don't enter to D3. But I find it just only happen on ALC274 family codecs.
> >>> ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0 will let PIN to D0.
> >>>
> >>> power_save = 0 it also could solve issue.
> >>
> >> Yes, avoid setting pinctl is only part fix, the ODM said the main
> >> problem is the EAPD pin is high->low->high->low periodically, it has
> >> sth to do with the widget node power state.
> > FWIW, there is also spec->gen.keep_eapd_on=1 that prevents the EAPD
> > toggle at power saving.
> 
> Got it, but does it prevent Nodes or the whole codec from entering D3?
> 
> Here the EADP is low, it is not because the set_eapd() is called, I
> checked the EAPD of all nodes, they are all 0x2 all the time. And
> patch_realtek already set the own_eapd_ctl=1, and the NID for speaker
> is 0x16, it is not in the:
> 
>     static hda_nid_t pins[] = {
>         0x0f, 0x10, 0x14, 0x15, 0x17, 0
>     };
> 
> So the driver will not set the eapd to 0 for speaker.

OK, right, with own_eapd_ctl, the flag change makes no sense.

> If
> keep_eapd_on=1 can prevent codec/nodes from entering D3, maybe it will
> help.

Actually it's possible to prevent the specific route (path) from the
dynamic power down, too.  You can look for the path and set
path->pin_fixed=1.  But it'd be a bit too tricky and complex.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Dell AIO speaker pop noise
  2019-04-16 11:57             ` Takashi Iwai
@ 2019-04-16 13:52               ` Kailang
  0 siblings, 0 replies; 19+ messages in thread
From: Kailang @ 2019-04-16 13:52 UTC (permalink / raw)
  To: Takashi Iwai, hwang4; +Cc: (alsa-devel@alsa-project.org)



> -----Original Message-----
> From: Takashi Iwai <tiwai@suse.de>
> Sent: Tuesday, April 16, 2019 7:58 PM
> To: hwang4 <hui.wang@canonical.com>
> Cc: (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>; Kailang
> <kailang@realtek.com>
> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> 
> On Tue, 16 Apr 2019 13:26:47 +0200,
> hwang4 wrote:
> >
> >
> > On 2019/4/16 下午5:43, Takashi Iwai wrote:
> > > On Tue, 16 Apr 2019 11:31:22 +0200,
> > > hwang4 wrote:
> > >>
> > >> On 2019/4/16 下午4:59, Kailang wrote:
> > >>>> -----Original Message-----
> > >>>> From: Takashi Iwai <tiwai@suse.de>
> > >>>> Sent: Tuesday, April 16, 2019 4:22 PM
> > >>>> To: Jaroslav Kysela <perex@perex.cz>
> > >>>> Cc: Kailang <kailang@realtek.com>; hwang4
> > >>>> <hui.wang@canonical.com>;
> > >>>> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> > >>>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> > >>>>
> > >>>> On Tue, 16 Apr 2019 10:01:31 +0200, Jaroslav Kysela wrote:
> > >>>>> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> > >>>>>> Hi Takashi,
> > >>>>>>
> > >>>>>> Issue 1: The noise keeps occurring via speaker when Headset is
> plugged in.
> > >>>>>> Issue 2: The humming noise is occuring when switching to sound
> > >>>>>> of
> > >>>> settings.
> > >>>>>> 	 The noise will be stopped when switching to other options of
> settings.
> > >>>>>> Issue 3: The popping noise occurred for one second when plugged
> > >>>>>> in and
> > >>>> removed the headset.
> > >>>>>> This patch will solve this three issues.
> > >>>>> Hi,
> > >>>>>
> > >>>>>     could you explain, why the power-save function causes this
> > >>>>> behaviour? Can we do something else than turning off the
> > >>>>> power-save codec settings to avoid such noises? I have this
> > >>>>> question because it's really
> > >>>> easy to disable something, but I feel that the culprit of the
> > >>>> noises might be just the wrong codec settings. I guess that you
> > >>>> have probably full documentation for the codec and probably for
> > >>>> the hardware, so it might be nice to find the real culprit.
> > >>>>
> > >>>> Note that power_save_node=0 doesn't mean that the whole power
> > >>>> saving is disabled.  It disables the fine-grained power saving,
> > >>>> i.e. powering down the unused widget nodes.
> > >>>>
> > >>>> If so, I wonder whether this might be about the default
> > >>>> pin-shutup behavior.  I improved the click noise problem on my
> > >>>> Dell desktop by disabling the pin shutup.  See commit c0ca5eced222.
> > >>>> Kailang, Hui, did you try to add the chain to
> ALC269_FIXUP_NO_SHUTUP?
> > >>>>
> > >>> This noise was not happen on poweroff.
> > >>> AIO use external AMP. So, it will be need to have a reference voltage via
> codec.
> > >>> So, Pin-ctls was not be 0. I apply option spec->gen.suppress_auto_mute =
> 1 to avoid that.
> > >>> Internal SPK PIN also don't enter to D3. But I find it just only happen on
> ALC274 family codecs.
> > >>> ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0 will
> let PIN to D0.
> > >>>
> > >>> power_save = 0 it also could solve issue.
> > >>
> > >> Yes, avoid setting pinctl is only part fix, the ODM said the main
> > >> problem is the EAPD pin is high->low->high->low periodically, it
> > >> has sth to do with the widget node power state.
> > > FWIW, there is also spec->gen.keep_eapd_on=1 that prevents the EAPD
> > > toggle at power saving.
> >
> > Got it, but does it prevent Nodes or the whole codec from entering D3?
> >
> > Here the EADP is low, it is not because the set_eapd() is called, I
> > checked the EAPD of all nodes, they are all 0x2 all the time. And
> > patch_realtek already set the own_eapd_ctl=1, and the NID for speaker
> > is 0x16, it is not in the:
> >
> >     static hda_nid_t pins[] = {
> >         0x0f, 0x10, 0x14, 0x15, 0x17, 0
> >     };
> >

I described the EAPD usage.
It just need to set NID 0x14 to eapd on.
0x15 0x17 also could let EAPD on. (0x0f and 0x10 was support by very old codec ALC260)
If it need to turn on eapd to enable external AMP or speaker, it only could setup one NID to turn on EAPD.
	
> > So the driver will not set the eapd to 0 for speaker.
> 
> OK, right, with own_eapd_ctl, the flag change makes no sense.
> 
> > If
> > keep_eapd_on=1 can prevent codec/nodes from entering D3, maybe it will
> > help.
> 
> Actually it's possible to prevent the specific route (path) from the dynamic
> power down, too.  You can look for the path and set
> path->pin_fixed=1.  But it'd be a bit too tricky and complex.
> 
> 
> Takashi
> 
> ------Please consider the environment before printing this e-mail.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Dell AIO speaker pop noise
  2019-04-16 11:26           ` hwang4
  2019-04-16 11:57             ` Takashi Iwai
@ 2019-04-16 14:18             ` Kailang
  2019-04-16 15:04               ` hwang4
  1 sibling, 1 reply; 19+ messages in thread
From: Kailang @ 2019-04-16 14:18 UTC (permalink / raw)
  To: hwang4, Takashi Iwai; +Cc: (alsa-devel@alsa-project.org)

Hi Hui,

AIO was wire power cable. It doesn't include battery.
I think AIO can use power_save = 0 option.
Because codec power consumption was lower. It was 0.01W~0.02W without work time.
How did you think?

CPU or VGA chip which power consumption was more than 20W above.

BR,
Kailang

> -----Original Message-----
> From: hwang4 <hui.wang@canonical.com>
> Sent: Tuesday, April 16, 2019 7:27 PM
> To: Takashi Iwai <tiwai@suse.de>
> Cc: (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>; Kailang
> <kailang@realtek.com>
> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> 
> On 2019/4/16 下午5:43, Takashi Iwai wrote:
> > On Tue, 16 Apr 2019 11:31:22 +0200,
> > hwang4 wrote:
> >>
> >> On 2019/4/16 下午4:59, Kailang wrote:
> >>>> -----Original Message-----
> >>>> From: Takashi Iwai <tiwai@suse.de>
> >>>> Sent: Tuesday, April 16, 2019 4:22 PM
> >>>> To: Jaroslav Kysela <perex@perex.cz>
> >>>> Cc: Kailang <kailang@realtek.com>; hwang4
> <hui.wang@canonical.com>;
> >>>> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> >>>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> >>>>
> >>>> On Tue, 16 Apr 2019 10:01:31 +0200, Jaroslav Kysela wrote:
> >>>>> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> >>>>>> Hi Takashi,
> >>>>>>
> >>>>>> Issue 1: The noise keeps occurring via speaker when Headset is
> plugged in.
> >>>>>> Issue 2: The humming noise is occuring when switching to sound of
> >>>> settings.
> >>>>>> 	 The noise will be stopped when switching to other options of
> settings.
> >>>>>> Issue 3: The popping noise occurred for one second when plugged
> >>>>>> in and
> >>>> removed the headset.
> >>>>>> This patch will solve this three issues.
> >>>>> Hi,
> >>>>>
> >>>>>     could you explain, why the power-save function causes this
> >>>>> behaviour? Can we do something else than turning off the
> >>>>> power-save codec settings to avoid such noises? I have this
> >>>>> question because it's really
> >>>> easy to disable something, but I feel that the culprit of the
> >>>> noises might be just the wrong codec settings. I guess that you
> >>>> have probably full documentation for the codec and probably for the
> >>>> hardware, so it might be nice to find the real culprit.
> >>>>
> >>>> Note that power_save_node=0 doesn't mean that the whole power
> >>>> saving is disabled.  It disables the fine-grained power saving,
> >>>> i.e. powering down the unused widget nodes.
> >>>>
> >>>> If so, I wonder whether this might be about the default pin-shutup
> >>>> behavior.  I improved the click noise problem on my Dell desktop by
> >>>> disabling the pin shutup.  See commit c0ca5eced222.
> >>>> Kailang, Hui, did you try to add the chain to ALC269_FIXUP_NO_SHUTUP?
> >>>>
> >>> This noise was not happen on poweroff.
> >>> AIO use external AMP. So, it will be need to have a reference voltage via
> codec.
> >>> So, Pin-ctls was not be 0. I apply option spec->gen.suppress_auto_mute = 1
> to avoid that.
> >>> Internal SPK PIN also don't enter to D3. But I find it just only happen on
> ALC274 family codecs.
> >>> ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0 will let
> PIN to D0.
> >>>
> >>> power_save = 0 it also could solve issue.
> >>
> >> Yes, avoid setting pinctl is only part fix, the ODM said the main
> >> problem is the EAPD pin is high->low->high->low periodically, it has
> >> sth to do with the widget node power state.
> > FWIW, there is also spec->gen.keep_eapd_on=1 that prevents the EAPD
> > toggle at power saving.
> 
> Got it, but does it prevent Nodes or the whole codec from entering D3?
> 
> Here the EADP is low, it is not because the set_eapd() is called, I checked the
> EAPD of all nodes, they are all 0x2 all the time. And patch_realtek already set
> the own_eapd_ctl=1, and the NID for speaker is 0x16, it is not in the:
> 
>      static hda_nid_t pins[] = {
>          0x0f, 0x10, 0x14, 0x15, 0x17, 0
>      };
> 
> So the driver will not set the eapd to 0 for speaker. If keep_eapd_on=1 can
> prevent codec/nodes from entering D3, maybe it will help.
> 
> Thanks,
> 
> Hui.
> 
> >
> >
> > Takashi
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@alsa-project.org
> > https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 
> ------Please consider the environment before printing this e-mail.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Dell AIO speaker pop noise
  2019-04-16 14:18             ` Kailang
@ 2019-04-16 15:04               ` hwang4
  2019-04-16 15:16                 ` Takashi Iwai
  2019-04-17  7:37                 ` Kailang
  0 siblings, 2 replies; 19+ messages in thread
From: hwang4 @ 2019-04-16 15:04 UTC (permalink / raw)
  To: Kailang, Takashi Iwai; +Cc: (alsa-devel@alsa-project.org)


On 2019/4/16 下午10:18, Kailang wrote:
> Hi Hui,
>
> AIO was wire power cable. It doesn't include battery.
> I think AIO can use power_save = 0 option.
> Because codec power consumption was lower. It was 0.01W~0.02W without work time.
> How did you think?

That sounds good. But I just checked the kconfig of ubuntu bionic kernel 
(4.15) , we set CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 already.  I guess 
there is some package to change it to 1, in the past it was TLP package.

Is it possible the HW has some problem. The EAPD is the output pin from 
codec, if there is no pull-up resistor for this pin and the codec is 
entering D3, what the status is for EAPD pin? high or low? After the 
codec is entering D3, is the EAPD pin open-drain output?


Thanks,

Hui.


>
> CPU or VGA chip which power consumption was more than 20W above.
>
> BR,
> Kailang
>
>> -----Original Message-----
>> From: hwang4 <hui.wang@canonical.com>
>> Sent: Tuesday, April 16, 2019 7:27 PM
>> To: Takashi Iwai <tiwai@suse.de>
>> Cc: (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>; Kailang
>> <kailang@realtek.com>
>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
>>
>> On 2019/4/16 下午5:43, Takashi Iwai wrote:
>>> On Tue, 16 Apr 2019 11:31:22 +0200,
>>> hwang4 wrote:
>>>> On 2019/4/16 下午4:59, Kailang wrote:
>>>>>> -----Original Message-----
>>>>>> From: Takashi Iwai <tiwai@suse.de>
>>>>>> Sent: Tuesday, April 16, 2019 4:22 PM
>>>>>> To: Jaroslav Kysela <perex@perex.cz>
>>>>>> Cc: Kailang <kailang@realtek.com>; hwang4
>> <hui.wang@canonical.com>;
>>>>>> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
>>>>>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
>>>>>>
>>>>>> On Tue, 16 Apr 2019 10:01:31 +0200, Jaroslav Kysela wrote:
>>>>>>> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
>>>>>>>> Hi Takashi,
>>>>>>>>
>>>>>>>> Issue 1: The noise keeps occurring via speaker when Headset is
>> plugged in.
>>>>>>>> Issue 2: The humming noise is occuring when switching to sound of
>>>>>> settings.
>>>>>>>> 	 The noise will be stopped when switching to other options of
>> settings.
>>>>>>>> Issue 3: The popping noise occurred for one second when plugged
>>>>>>>> in and
>>>>>> removed the headset.
>>>>>>>> This patch will solve this three issues.
>>>>>>> Hi,
>>>>>>>
>>>>>>>      could you explain, why the power-save function causes this
>>>>>>> behaviour? Can we do something else than turning off the
>>>>>>> power-save codec settings to avoid such noises? I have this
>>>>>>> question because it's really
>>>>>> easy to disable something, but I feel that the culprit of the
>>>>>> noises might be just the wrong codec settings. I guess that you
>>>>>> have probably full documentation for the codec and probably for the
>>>>>> hardware, so it might be nice to find the real culprit.
>>>>>>
>>>>>> Note that power_save_node=0 doesn't mean that the whole power
>>>>>> saving is disabled.  It disables the fine-grained power saving,
>>>>>> i.e. powering down the unused widget nodes.
>>>>>>
>>>>>> If so, I wonder whether this might be about the default pin-shutup
>>>>>> behavior.  I improved the click noise problem on my Dell desktop by
>>>>>> disabling the pin shutup.  See commit c0ca5eced222.
>>>>>> Kailang, Hui, did you try to add the chain to ALC269_FIXUP_NO_SHUTUP?
>>>>>>
>>>>> This noise was not happen on poweroff.
>>>>> AIO use external AMP. So, it will be need to have a reference voltage via
>> codec.
>>>>> So, Pin-ctls was not be 0. I apply option spec->gen.suppress_auto_mute = 1
>> to avoid that.
>>>>> Internal SPK PIN also don't enter to D3. But I find it just only happen on
>> ALC274 family codecs.
>>>>> ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0 will let
>> PIN to D0.
>>>>> power_save = 0 it also could solve issue.
>>>> Yes, avoid setting pinctl is only part fix, the ODM said the main
>>>> problem is the EAPD pin is high->low->high->low periodically, it has
>>>> sth to do with the widget node power state.
>>> FWIW, there is also spec->gen.keep_eapd_on=1 that prevents the EAPD
>>> toggle at power saving.
>> Got it, but does it prevent Nodes or the whole codec from entering D3?
>>
>> Here the EADP is low, it is not because the set_eapd() is called, I checked the
>> EAPD of all nodes, they are all 0x2 all the time. And patch_realtek already set
>> the own_eapd_ctl=1, and the NID for speaker is 0x16, it is not in the:
>>
>>       static hda_nid_t pins[] = {
>>           0x0f, 0x10, 0x14, 0x15, 0x17, 0
>>       };
>>
>> So the driver will not set the eapd to 0 for speaker. If keep_eapd_on=1 can
>> prevent codec/nodes from entering D3, maybe it will help.
>>
>> Thanks,
>>
>> Hui.
>>
>>>
>>> Takashi
>>> _______________________________________________
>>> Alsa-devel mailing list
>>> Alsa-devel@alsa-project.org
>>> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>> ------Please consider the environment before printing this e-mail.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Dell AIO speaker pop noise
  2019-04-16 15:04               ` hwang4
@ 2019-04-16 15:16                 ` Takashi Iwai
  2019-04-26  8:32                   ` Kailang
  2019-04-17  7:37                 ` Kailang
  1 sibling, 1 reply; 19+ messages in thread
From: Takashi Iwai @ 2019-04-16 15:16 UTC (permalink / raw)
  To: hwang4; +Cc: (alsa-devel@alsa-project.org), Kailang

On Tue, 16 Apr 2019 17:04:19 +0200,
hwang4 wrote:
> 
> 
> On 2019/4/16 下午10:18, Kailang wrote:
> > Hi Hui,
> >
> > AIO was wire power cable. It doesn't include battery.
> > I think AIO can use power_save = 0 option.
> > Because codec power consumption was lower. It was 0.01W~0.02W without work time.
> > How did you think?
> 
> That sounds good. But I just checked the kconfig of ubuntu bionic
> kernel (4.15) , we set CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 already.  I
> guess there is some package to change it to 1, in the past it was TLP
> package.

The parameter is dynamically adjustable so you cannot disable it
completely in that way.

> Is it possible the HW has some problem. The EAPD is the output pin
> from codec, if there is no pull-up resistor for this pin and the codec
> is entering D3, what the status is for EAPD pin? high or low? After
> the codec is entering D3, is the EAPD pin open-drain output?

Well, it'd be helpful if you guys clarify more specifically what we
need to disable.  Is it only about EAPD pin for NID 0x14?  Or anything
else?  Depending on the requirement, we may have another less
intrusive fix.


thanks,

Takashi

> 
> 
> Thanks,
> 
> Hui.
> 
> 
> >
> > CPU or VGA chip which power consumption was more than 20W above.
> >
> > BR,
> > Kailang
> >
> >> -----Original Message-----
> >> From: hwang4 <hui.wang@canonical.com>
> >> Sent: Tuesday, April 16, 2019 7:27 PM
> >> To: Takashi Iwai <tiwai@suse.de>
> >> Cc: (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>; Kailang
> >> <kailang@realtek.com>
> >> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> >>
> >> On 2019/4/16 下午5:43, Takashi Iwai wrote:
> >>> On Tue, 16 Apr 2019 11:31:22 +0200,
> >>> hwang4 wrote:
> >>>> On 2019/4/16 下午4:59, Kailang wrote:
> >>>>>> -----Original Message-----
> >>>>>> From: Takashi Iwai <tiwai@suse.de>
> >>>>>> Sent: Tuesday, April 16, 2019 4:22 PM
> >>>>>> To: Jaroslav Kysela <perex@perex.cz>
> >>>>>> Cc: Kailang <kailang@realtek.com>; hwang4
> >> <hui.wang@canonical.com>;
> >>>>>> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> >>>>>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> >>>>>>
> >>>>>> On Tue, 16 Apr 2019 10:01:31 +0200, Jaroslav Kysela wrote:
> >>>>>>> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> >>>>>>>> Hi Takashi,
> >>>>>>>>
> >>>>>>>> Issue 1: The noise keeps occurring via speaker when Headset is
> >> plugged in.
> >>>>>>>> Issue 2: The humming noise is occuring when switching to sound of
> >>>>>> settings.
> >>>>>>>> 	 The noise will be stopped when switching to other options of
> >> settings.
> >>>>>>>> Issue 3: The popping noise occurred for one second when plugged
> >>>>>>>> in and
> >>>>>> removed the headset.
> >>>>>>>> This patch will solve this three issues.
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>>      could you explain, why the power-save function causes this
> >>>>>>> behaviour? Can we do something else than turning off the
> >>>>>>> power-save codec settings to avoid such noises? I have this
> >>>>>>> question because it's really
> >>>>>> easy to disable something, but I feel that the culprit of the
> >>>>>> noises might be just the wrong codec settings. I guess that you
> >>>>>> have probably full documentation for the codec and probably for the
> >>>>>> hardware, so it might be nice to find the real culprit.
> >>>>>>
> >>>>>> Note that power_save_node=0 doesn't mean that the whole power
> >>>>>> saving is disabled.  It disables the fine-grained power saving,
> >>>>>> i.e. powering down the unused widget nodes.
> >>>>>>
> >>>>>> If so, I wonder whether this might be about the default pin-shutup
> >>>>>> behavior.  I improved the click noise problem on my Dell desktop by
> >>>>>> disabling the pin shutup.  See commit c0ca5eced222.
> >>>>>> Kailang, Hui, did you try to add the chain to ALC269_FIXUP_NO_SHUTUP?
> >>>>>>
> >>>>> This noise was not happen on poweroff.
> >>>>> AIO use external AMP. So, it will be need to have a reference voltage via
> >> codec.
> >>>>> So, Pin-ctls was not be 0. I apply option spec->gen.suppress_auto_mute = 1
> >> to avoid that.
> >>>>> Internal SPK PIN also don't enter to D3. But I find it just only happen on
> >> ALC274 family codecs.
> >>>>> ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0 will let
> >> PIN to D0.
> >>>>> power_save = 0 it also could solve issue.
> >>>> Yes, avoid setting pinctl is only part fix, the ODM said the main
> >>>> problem is the EAPD pin is high->low->high->low periodically, it has
> >>>> sth to do with the widget node power state.
> >>> FWIW, there is also spec->gen.keep_eapd_on=1 that prevents the EAPD
> >>> toggle at power saving.
> >> Got it, but does it prevent Nodes or the whole codec from entering D3?
> >>
> >> Here the EADP is low, it is not because the set_eapd() is called, I checked the
> >> EAPD of all nodes, they are all 0x2 all the time. And patch_realtek already set
> >> the own_eapd_ctl=1, and the NID for speaker is 0x16, it is not in the:
> >>
> >>       static hda_nid_t pins[] = {
> >>           0x0f, 0x10, 0x14, 0x15, 0x17, 0
> >>       };
> >>
> >> So the driver will not set the eapd to 0 for speaker. If keep_eapd_on=1 can
> >> prevent codec/nodes from entering D3, maybe it will help.
> >>
> >> Thanks,
> >>
> >> Hui.
> >>
> >>>
> >>> Takashi
> >>> _______________________________________________
> >>> Alsa-devel mailing list
> >>> Alsa-devel@alsa-project.org
> >>> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >> ------Please consider the environment before printing this e-mail.
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Dell AIO speaker pop noise
  2019-04-16 15:04               ` hwang4
  2019-04-16 15:16                 ` Takashi Iwai
@ 2019-04-17  7:37                 ` Kailang
  2019-04-17  8:09                   ` hwang4
  1 sibling, 1 reply; 19+ messages in thread
From: Kailang @ 2019-04-17  7:37 UTC (permalink / raw)
  To: hwang4, Takashi Iwai; +Cc: (alsa-devel@alsa-project.org)



> -----Original Message-----
> From: hwang4 <hui.wang@canonical.com>
> Sent: Tuesday, April 16, 2019 11:04 PM
> To: Kailang <kailang@realtek.com>; Takashi Iwai <tiwai@suse.de>
> Cc: (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> 
> 
> On 2019/4/16 下午10:18, Kailang wrote:
> > Hi Hui,
> >
> > AIO was wire power cable. It doesn't include battery.
> > I think AIO can use power_save = 0 option.
> > Because codec power consumption was lower. It was 0.01W~0.02W without
> work time.
> > How did you think?
> 
> That sounds good. But I just checked the kconfig of ubuntu bionic kernel
> (4.15) , we set CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 already.  I
> guess there is some package to change it to 1, in the past it was TLP package.

We could fixed in the code for AIO platform.

> 
> Is it possible the HW has some problem. The EAPD is the output pin from codec,
> if there is no pull-up resistor for this pin and the codec is entering D3, what the
> status is for EAPD pin? high or low? After the codec is entering D3, is the EAPD
> pin open-drain output?
> 
I don't know for hardware. ODM always test pass by Windows. 
Then notice us for issue happen on Linux.
I also mention that DELL ALC225 with external AMP was not has this issue.

> 
> Thanks,
> 
> Hui.
> 
> 
> >
> > CPU or VGA chip which power consumption was more than 20W above.
> >
> > BR,
> > Kailang
> >
> >> -----Original Message-----
> >> From: hwang4 <hui.wang@canonical.com>
> >> Sent: Tuesday, April 16, 2019 7:27 PM
> >> To: Takashi Iwai <tiwai@suse.de>
> >> Cc: (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>;
> >> Kailang <kailang@realtek.com>
> >> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> >>
> >> On 2019/4/16 下午5:43, Takashi Iwai wrote:
> >>> On Tue, 16 Apr 2019 11:31:22 +0200,
> >>> hwang4 wrote:
> >>>> On 2019/4/16 下午4:59, Kailang wrote:
> >>>>>> -----Original Message-----
> >>>>>> From: Takashi Iwai <tiwai@suse.de>
> >>>>>> Sent: Tuesday, April 16, 2019 4:22 PM
> >>>>>> To: Jaroslav Kysela <perex@perex.cz>
> >>>>>> Cc: Kailang <kailang@realtek.com>; hwang4
> >> <hui.wang@canonical.com>;
> >>>>>> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> >>>>>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> >>>>>>
> >>>>>> On Tue, 16 Apr 2019 10:01:31 +0200, Jaroslav Kysela wrote:
> >>>>>>> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> >>>>>>>> Hi Takashi,
> >>>>>>>>
> >>>>>>>> Issue 1: The noise keeps occurring via speaker when Headset is
> >> plugged in.
> >>>>>>>> Issue 2: The humming noise is occuring when switching to sound
> >>>>>>>> of
> >>>>>> settings.
> >>>>>>>> 	 The noise will be stopped when switching to other options of
> >> settings.
> >>>>>>>> Issue 3: The popping noise occurred for one second when plugged
> >>>>>>>> in and
> >>>>>> removed the headset.
> >>>>>>>> This patch will solve this three issues.
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>>      could you explain, why the power-save function causes this
> >>>>>>> behaviour? Can we do something else than turning off the
> >>>>>>> power-save codec settings to avoid such noises? I have this
> >>>>>>> question because it's really
> >>>>>> easy to disable something, but I feel that the culprit of the
> >>>>>> noises might be just the wrong codec settings. I guess that you
> >>>>>> have probably full documentation for the codec and probably for
> >>>>>> the hardware, so it might be nice to find the real culprit.
> >>>>>>
> >>>>>> Note that power_save_node=0 doesn't mean that the whole power
> >>>>>> saving is disabled.  It disables the fine-grained power saving,
> >>>>>> i.e. powering down the unused widget nodes.
> >>>>>>
> >>>>>> If so, I wonder whether this might be about the default
> >>>>>> pin-shutup behavior.  I improved the click noise problem on my
> >>>>>> Dell desktop by disabling the pin shutup.  See commit c0ca5eced222.
> >>>>>> Kailang, Hui, did you try to add the chain to
> ALC269_FIXUP_NO_SHUTUP?
> >>>>>>
> >>>>> This noise was not happen on poweroff.
> >>>>> AIO use external AMP. So, it will be need to have a reference
> >>>>> voltage via
> >> codec.
> >>>>> So, Pin-ctls was not be 0. I apply option
> >>>>> spec->gen.suppress_auto_mute = 1
> >> to avoid that.
> >>>>> Internal SPK PIN also don't enter to D3. But I find it just only
> >>>>> happen on
> >> ALC274 family codecs.
> >>>>> ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0
> >>>>> will let
> >> PIN to D0.
> >>>>> power_save = 0 it also could solve issue.
> >>>> Yes, avoid setting pinctl is only part fix, the ODM said the main
> >>>> problem is the EAPD pin is high->low->high->low periodically, it
> >>>> has sth to do with the widget node power state.
> >>> FWIW, there is also spec->gen.keep_eapd_on=1 that prevents the EAPD
> >>> toggle at power saving.
> >> Got it, but does it prevent Nodes or the whole codec from entering D3?
> >>
> >> Here the EADP is low, it is not because the set_eapd() is called, I
> >> checked the EAPD of all nodes, they are all 0x2 all the time. And
> >> patch_realtek already set the own_eapd_ctl=1, and the NID for speaker is
> 0x16, it is not in the:
> >>
> >>       static hda_nid_t pins[] = {
> >>           0x0f, 0x10, 0x14, 0x15, 0x17, 0
> >>       };
> >>
> >> So the driver will not set the eapd to 0 for speaker. If
> >> keep_eapd_on=1 can prevent codec/nodes from entering D3, maybe it will
> help.
> >>
> >> Thanks,
> >>
> >> Hui.
> >>
> >>>
> >>> Takashi
> >>> _______________________________________________
> >>> Alsa-devel mailing list
> >>> Alsa-devel@alsa-project.org
> >>> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> >> ------Please consider the environment before printing this e-mail.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Dell AIO speaker pop noise
  2019-04-17  7:37                 ` Kailang
@ 2019-04-17  8:09                   ` hwang4
  0 siblings, 0 replies; 19+ messages in thread
From: hwang4 @ 2019-04-17  8:09 UTC (permalink / raw)
  To: Kailang, Takashi Iwai; +Cc: (alsa-devel@alsa-project.org)


On 2019/4/17 下午3:37, Kailang wrote:
>
>> -----Original Message-----
>> From: hwang4 <hui.wang@canonical.com>
>> Sent: Tuesday, April 16, 2019 11:04 PM
>> To: Kailang <kailang@realtek.com>; Takashi Iwai <tiwai@suse.de>
>> Cc: (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
>>
>>
>> On 2019/4/16 下午10:18, Kailang wrote:
>>> Hi Hui,
>>>
>>> AIO was wire power cable. It doesn't include battery.
>>> I think AIO can use power_save = 0 option.
>>> Because codec power consumption was lower. It was 0.01W~0.02W without
>> work time.
>>> How did you think?
>> That sounds good. But I just checked the kconfig of ubuntu bionic kernel
>> (4.15) , we set CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 already.  I
>> guess there is some package to change it to 1, in the past it was TLP package.
> We could fixed in the code for AIO platform.
>
>> Is it possible the HW has some problem. The EAPD is the output pin from codec,
>> if there is no pull-up resistor for this pin and the codec is entering D3, what the
>> status is for EAPD pin? high or low? After the codec is entering D3, is the EAPD
>> pin open-drain output?
>>
> I don't know for hardware. ODM always test pass by Windows.
> Then notice us for issue happen on Linux.
> I also mention that DELL ALC225 with external AMP was not has this issue.


OK, thanks.


>
>> Thanks,
>>
>> Hui.
>>
>>
>>> CPU or VGA chip which power consumption was more than 20W above.
>>>
>>> BR,
>>> Kailang
>>>
>>>> -----Original Message-----
>>>> From: hwang4 <hui.wang@canonical.com>
>>>> Sent: Tuesday, April 16, 2019 7:27 PM
>>>> To: Takashi Iwai <tiwai@suse.de>
>>>> Cc: (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>;
>>>> Kailang <kailang@realtek.com>
>>>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
>>>>
>>>> On 2019/4/16 下午5:43, Takashi Iwai wrote:
>>>>> On Tue, 16 Apr 2019 11:31:22 +0200,
>>>>> hwang4 wrote:
>>>>>> On 2019/4/16 下午4:59, Kailang wrote:
>>>>>>>> -----Original Message-----
>>>>>>>> From: Takashi Iwai <tiwai@suse.de>
>>>>>>>> Sent: Tuesday, April 16, 2019 4:22 PM
>>>>>>>> To: Jaroslav Kysela <perex@perex.cz>
>>>>>>>> Cc: Kailang <kailang@realtek.com>; hwang4
>>>> <hui.wang@canonical.com>;
>>>>>>>> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
>>>>>>>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
>>>>>>>>
>>>>>>>> On Tue, 16 Apr 2019 10:01:31 +0200, Jaroslav Kysela wrote:
>>>>>>>>> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
>>>>>>>>>> Hi Takashi,
>>>>>>>>>>
>>>>>>>>>> Issue 1: The noise keeps occurring via speaker when Headset is
>>>> plugged in.
>>>>>>>>>> Issue 2: The humming noise is occuring when switching to sound
>>>>>>>>>> of
>>>>>>>> settings.
>>>>>>>>>> 	 The noise will be stopped when switching to other options of
>>>> settings.
>>>>>>>>>> Issue 3: The popping noise occurred for one second when plugged
>>>>>>>>>> in and
>>>>>>>> removed the headset.
>>>>>>>>>> This patch will solve this three issues.
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>>       could you explain, why the power-save function causes this
>>>>>>>>> behaviour? Can we do something else than turning off the
>>>>>>>>> power-save codec settings to avoid such noises? I have this
>>>>>>>>> question because it's really
>>>>>>>> easy to disable something, but I feel that the culprit of the
>>>>>>>> noises might be just the wrong codec settings. I guess that you
>>>>>>>> have probably full documentation for the codec and probably for
>>>>>>>> the hardware, so it might be nice to find the real culprit.
>>>>>>>>
>>>>>>>> Note that power_save_node=0 doesn't mean that the whole power
>>>>>>>> saving is disabled.  It disables the fine-grained power saving,
>>>>>>>> i.e. powering down the unused widget nodes.
>>>>>>>>
>>>>>>>> If so, I wonder whether this might be about the default
>>>>>>>> pin-shutup behavior.  I improved the click noise problem on my
>>>>>>>> Dell desktop by disabling the pin shutup.  See commit c0ca5eced222.
>>>>>>>> Kailang, Hui, did you try to add the chain to
>> ALC269_FIXUP_NO_SHUTUP?
>>>>>>> This noise was not happen on poweroff.
>>>>>>> AIO use external AMP. So, it will be need to have a reference
>>>>>>> voltage via
>>>> codec.
>>>>>>> So, Pin-ctls was not be 0. I apply option
>>>>>>> spec->gen.suppress_auto_mute = 1
>>>> to avoid that.
>>>>>>> Internal SPK PIN also don't enter to D3. But I find it just only
>>>>>>> happen on
>>>> ALC274 family codecs.
>>>>>>> ALC274 pin enter to D3. Pin-ctls also be 0. So, power_save_node=0
>>>>>>> will let
>>>> PIN to D0.
>>>>>>> power_save = 0 it also could solve issue.
>>>>>> Yes, avoid setting pinctl is only part fix, the ODM said the main
>>>>>> problem is the EAPD pin is high->low->high->low periodically, it
>>>>>> has sth to do with the widget node power state.
>>>>> FWIW, there is also spec->gen.keep_eapd_on=1 that prevents the EAPD
>>>>> toggle at power saving.
>>>> Got it, but does it prevent Nodes or the whole codec from entering D3?
>>>>
>>>> Here the EADP is low, it is not because the set_eapd() is called, I
>>>> checked the EAPD of all nodes, they are all 0x2 all the time. And
>>>> patch_realtek already set the own_eapd_ctl=1, and the NID for speaker is
>> 0x16, it is not in the:
>>>>        static hda_nid_t pins[] = {
>>>>            0x0f, 0x10, 0x14, 0x15, 0x17, 0
>>>>        };
>>>>
>>>> So the driver will not set the eapd to 0 for speaker. If
>>>> keep_eapd_on=1 can prevent codec/nodes from entering D3, maybe it will
>> help.
>>>> Thanks,
>>>>
>>>> Hui.
>>>>
>>>>> Takashi
>>>>> _______________________________________________
>>>>> Alsa-devel mailing list
>>>>> Alsa-devel@alsa-project.org
>>>>> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>>>> ------Please consider the environment before printing this e-mail.
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Dell AIO speaker pop noise
  2019-04-16 15:16                 ` Takashi Iwai
@ 2019-04-26  8:32                   ` Kailang
  2019-04-28  6:20                     ` Takashi Iwai
  0 siblings, 1 reply; 19+ messages in thread
From: Kailang @ 2019-04-26  8:32 UTC (permalink / raw)
  To: Takashi Iwai, hwang4; +Cc: (alsa-devel@alsa-project.org)

[-- Attachment #1: Type: text/plain, Size: 6781 bytes --]

Hi Takashi,

I attach new final patch.

Fixed Dell AIO speaker noise.
spec->gen.auto_mute_via_amp = 1, this option was solved speaker white noise at boot.
	AIO with external AMP, pin output doesn't fill 0x0.

codec->power_save_node = 0, this option was solved speaker pop noise at resume back.

I think add upper two options was needed.
Many Thanks.

BR,
Kailang


> -----Original Message-----
> From: Takashi Iwai <tiwai@suse.de>
> Sent: Tuesday, April 16, 2019 11:17 PM
> To: hwang4 <hui.wang@canonical.com>
> Cc: Kailang <kailang@realtek.com>; (alsa-devel@alsa-project.org)
> <alsa-devel@alsa-project.org>
> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> 
> On Tue, 16 Apr 2019 17:04:19 +0200,
> hwang4 wrote:
> >
> >
> > On 2019/4/16 下午10:18, Kailang wrote:
> > > Hi Hui,
> > >
> > > AIO was wire power cable. It doesn't include battery.
> > > I think AIO can use power_save = 0 option.
> > > Because codec power consumption was lower. It was 0.01W~0.02W
> without work time.
> > > How did you think?
> >
> > That sounds good. But I just checked the kconfig of ubuntu bionic
> > kernel (4.15) , we set CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
> already.  I
> > guess there is some package to change it to 1, in the past it was TLP
> > package.
> 
> The parameter is dynamically adjustable so you cannot disable it completely in
> that way.
> 
> > Is it possible the HW has some problem. The EAPD is the output pin
> > from codec, if there is no pull-up resistor for this pin and the codec
> > is entering D3, what the status is for EAPD pin? high or low? After
> > the codec is entering D3, is the EAPD pin open-drain output?
> 
> Well, it'd be helpful if you guys clarify more specifically what we need to
> disable.  Is it only about EAPD pin for NID 0x14?  Or anything else?
> Depending on the requirement, we may have another less intrusive fix.
> 
> 
> thanks,
> 
> Takashi
> 
> >
> >
> > Thanks,
> >
> > Hui.
> >
> >
> > >
> > > CPU or VGA chip which power consumption was more than 20W above.
> > >
> > > BR,
> > > Kailang
> > >
> > >> -----Original Message-----
> > >> From: hwang4 <hui.wang@canonical.com>
> > >> Sent: Tuesday, April 16, 2019 7:27 PM
> > >> To: Takashi Iwai <tiwai@suse.de>
> > >> Cc: (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>;
> > >> Kailang <kailang@realtek.com>
> > >> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> > >>
> > >> On 2019/4/16 下午5:43, Takashi Iwai wrote:
> > >>> On Tue, 16 Apr 2019 11:31:22 +0200,
> > >>> hwang4 wrote:
> > >>>> On 2019/4/16 下午4:59, Kailang wrote:
> > >>>>>> -----Original Message-----
> > >>>>>> From: Takashi Iwai <tiwai@suse.de>
> > >>>>>> Sent: Tuesday, April 16, 2019 4:22 PM
> > >>>>>> To: Jaroslav Kysela <perex@perex.cz>
> > >>>>>> Cc: Kailang <kailang@realtek.com>; hwang4
> > >> <hui.wang@canonical.com>;
> > >>>>>> (alsa-devel@alsa-project.org) <alsa-devel@alsa-project.org>
> > >>>>>> Subject: Re: [alsa-devel] Dell AIO speaker pop noise
> > >>>>>>
> > >>>>>> On Tue, 16 Apr 2019 10:01:31 +0200, Jaroslav Kysela wrote:
> > >>>>>>> Dne 16. 04. 19 v 9:30 Kailang napsal(a):
> > >>>>>>>> Hi Takashi,
> > >>>>>>>>
> > >>>>>>>> Issue 1: The noise keeps occurring via speaker when Headset
> > >>>>>>>> is
> > >> plugged in.
> > >>>>>>>> Issue 2: The humming noise is occuring when switching to
> > >>>>>>>> sound of
> > >>>>>> settings.
> > >>>>>>>> 	 The noise will be stopped when switching to other options
> > >>>>>>>> of
> > >> settings.
> > >>>>>>>> Issue 3: The popping noise occurred for one second when
> > >>>>>>>> plugged in and
> > >>>>>> removed the headset.
> > >>>>>>>> This patch will solve this three issues.
> > >>>>>>> Hi,
> > >>>>>>>
> > >>>>>>>      could you explain, why the power-save function causes
> > >>>>>>> this behaviour? Can we do something else than turning off the
> > >>>>>>> power-save codec settings to avoid such noises? I have this
> > >>>>>>> question because it's really
> > >>>>>> easy to disable something, but I feel that the culprit of the
> > >>>>>> noises might be just the wrong codec settings. I guess that you
> > >>>>>> have probably full documentation for the codec and probably for
> > >>>>>> the hardware, so it might be nice to find the real culprit.
> > >>>>>>
> > >>>>>> Note that power_save_node=0 doesn't mean that the whole power
> > >>>>>> saving is disabled.  It disables the fine-grained power saving,
> > >>>>>> i.e. powering down the unused widget nodes.
> > >>>>>>
> > >>>>>> If so, I wonder whether this might be about the default
> > >>>>>> pin-shutup behavior.  I improved the click noise problem on my
> > >>>>>> Dell desktop by disabling the pin shutup.  See commit
> c0ca5eced222.
> > >>>>>> Kailang, Hui, did you try to add the chain to
> ALC269_FIXUP_NO_SHUTUP?
> > >>>>>>
> > >>>>> This noise was not happen on poweroff.
> > >>>>> AIO use external AMP. So, it will be need to have a reference
> > >>>>> voltage via
> > >> codec.
> > >>>>> So, Pin-ctls was not be 0. I apply option
> > >>>>> spec->gen.suppress_auto_mute = 1
> > >> to avoid that.
> > >>>>> Internal SPK PIN also don't enter to D3. But I find it just only
> > >>>>> happen on
> > >> ALC274 family codecs.
> > >>>>> ALC274 pin enter to D3. Pin-ctls also be 0. So,
> > >>>>> power_save_node=0 will let
> > >> PIN to D0.
> > >>>>> power_save = 0 it also could solve issue.
> > >>>> Yes, avoid setting pinctl is only part fix, the ODM said the main
> > >>>> problem is the EAPD pin is high->low->high->low periodically, it
> > >>>> has sth to do with the widget node power state.
> > >>> FWIW, there is also spec->gen.keep_eapd_on=1 that prevents the
> > >>> EAPD toggle at power saving.
> > >> Got it, but does it prevent Nodes or the whole codec from entering D3?
> > >>
> > >> Here the EADP is low, it is not because the set_eapd() is called, I
> > >> checked the EAPD of all nodes, they are all 0x2 all the time. And
> > >> patch_realtek already set the own_eapd_ctl=1, and the NID for speaker is
> 0x16, it is not in the:
> > >>
> > >>       static hda_nid_t pins[] = {
> > >>           0x0f, 0x10, 0x14, 0x15, 0x17, 0
> > >>       };
> > >>
> > >> So the driver will not set the eapd to 0 for speaker. If
> > >> keep_eapd_on=1 can prevent codec/nodes from entering D3, maybe it
> will help.
> > >>
> > >> Thanks,
> > >>
> > >> Hui.
> > >>
> > >>>
> > >>> Takashi
> > >>> _______________________________________________
> > >>> Alsa-devel mailing list
> > >>> Alsa-devel@alsa-project.org
> > >>> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> > >> ------Please consider the environment before printing this e-mail.
> >

[-- Attachment #2: 0001-dell-aio-spk-noise.patch --]
[-- Type: application/octet-stream, Size: 952 bytes --]

From 839c0d9c595ea149c63c2d94e6043c93bd74e531 Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Fri, 26 Apr 2019 16:13:54 +0800
Subject: [PATCH] ALSA: hda/realtek - Fixed Dell AIO speaker noise

Fixed Dell AIO speaker noise.
spec->gen.auto_mute_via_amp = 1, this option was solved speaker white noise at boot.
codec->power_save_node = 0, this option was solved speaker noise at resume back.

Signed-off-by: Kailang Yang <kailang@realtek.com>

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f5b510f119ed..0e7c8fcab3f2 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5450,6 +5450,8 @@ static void alc274_fixup_bind_dacs(struct hda_codec *codec,
 		return;
 
 	spec->gen.preferred_dacs = preferred_pairs;
+	spec->gen.auto_mute_via_amp = 1;
+	codec->power_save_node = 0;
 }
 
 /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* Re: Dell AIO speaker pop noise
  2019-04-26  8:32                   ` Kailang
@ 2019-04-28  6:20                     ` Takashi Iwai
  0 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2019-04-28  6:20 UTC (permalink / raw)
  To: Kailang; +Cc: hwang4, (alsa-devel@alsa-project.org)

On Fri, 26 Apr 2019 10:32:48 +0200,
Kailang wrote:
> 
> Hi Takashi,
> 
> I attach new final patch.
> 
> Fixed Dell AIO speaker noise.
> spec->gen.auto_mute_via_amp = 1, this option was solved speaker white noise at boot.
> 	AIO with external AMP, pin output doesn't fill 0x0.
> 
> codec->power_save_node = 0, this option was solved speaker pop noise at resume back.
> 
> I think add upper two options was needed.
> Many Thanks.

OK, then let's apply this workaround.  Thanks.


Takashi

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

end of thread, other threads:[~2019-04-28  6:20 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16  7:30 Dell AIO speaker pop noise Kailang
2019-04-16  7:56 ` hwang4
2019-04-16  8:01 ` Jaroslav Kysela
2019-04-16  8:21   ` Takashi Iwai
2019-04-16  8:59     ` Kailang
2019-04-16  9:31       ` hwang4
2019-04-16  9:43         ` Takashi Iwai
2019-04-16 11:26           ` hwang4
2019-04-16 11:57             ` Takashi Iwai
2019-04-16 13:52               ` Kailang
2019-04-16 14:18             ` Kailang
2019-04-16 15:04               ` hwang4
2019-04-16 15:16                 ` Takashi Iwai
2019-04-26  8:32                   ` Kailang
2019-04-28  6:20                     ` Takashi Iwai
2019-04-17  7:37                 ` Kailang
2019-04-17  8:09                   ` hwang4
2019-04-16  9:59       ` Takashi Iwai
2019-04-16 10:11         ` Kailang

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.