linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/intel: Add quirk for TongFang devices with pop noise
@ 2022-05-11 13:38 Werner Sembach
  2022-05-11 13:41 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Werner Sembach @ 2022-05-11 13:38 UTC (permalink / raw)
  To: perex, tiwai, kai.vehmanen, pierre-louis.bossart, imre.deak,
	alsa-devel, linux-kernel

When audio stops playing and sometimes when it starts playing, there is an
audible "pop" noise when using headphones on most Tongfang GMxMxxx,
GKxNxxx, GMxZxxx, GMxTxxx, and GMxAxxx devices.

Disabling power saving for the Realtek codec fixes this noise. Presumably
it is triggered on some power event in the audio circuit.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: stable@vger.kernel.org
---
 sound/pci/hda/hda_intel.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 0a83eb6b88b1f..8a1088e057ec0 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2201,6 +2201,13 @@ static const struct snd_pci_quirk power_save_denylist[] = {
 	SND_PCI_QUIRK(0x17aa, 0x36a7, "Lenovo C50 All in one", 0),
 	/* https://bugs.launchpad.net/bugs/1821663 */
 	SND_PCI_QUIRK(0x1631, 0xe017, "Packard Bell NEC IMEDIA 5204", 0),
+	/* Several TongFang barebones making popping sounds */
+	SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMxxx", 0),
+	SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNxxx", 0),
+	SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZxxx", 0),
+	SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZxxx", 0),
+	SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTxxx", 0),
+	SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAxxx", 0),
 	{}
 };
 #endif /* CONFIG_PM */
-- 
2.25.1


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

* Re: [PATCH] ALSA: hda/intel: Add quirk for TongFang devices with pop noise
  2022-05-11 13:38 [PATCH] ALSA: hda/intel: Add quirk for TongFang devices with pop noise Werner Sembach
@ 2022-05-11 13:41 ` Takashi Iwai
  2022-05-11 13:58   ` Werner Sembach
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2022-05-11 13:41 UTC (permalink / raw)
  To: Werner Sembach
  Cc: perex, tiwai, kai.vehmanen, pierre-louis.bossart, imre.deak,
	alsa-devel, linux-kernel

On Wed, 11 May 2022 15:38:28 +0200,
Werner Sembach wrote:
> 
> When audio stops playing and sometimes when it starts playing, there is an
> audible "pop" noise when using headphones on most Tongfang GMxMxxx,
> GKxNxxx, GMxZxxx, GMxTxxx, and GMxAxxx devices.
> 
> Disabling power saving for the Realtek codec fixes this noise. Presumably
> it is triggered on some power event in the audio circuit.
> 
> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> Cc: stable@vger.kernel.org

Usually this denylist is a last resort if any other methods never
helped.  Is it the case?


thanks,

Takashi

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

* Re: [PATCH] ALSA: hda/intel: Add quirk for TongFang devices with pop noise
  2022-05-11 13:41 ` Takashi Iwai
@ 2022-05-11 13:58   ` Werner Sembach
  2022-05-11 14:09     ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Werner Sembach @ 2022-05-11 13:58 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, kai.vehmanen, linux-kernel, imre.deak,
	pierre-louis.bossart, tiwai

Am 11.05.22 um 15:41 schrieb Takashi Iwai:
> On Wed, 11 May 2022 15:38:28 +0200,
> Werner Sembach wrote:
>> When audio stops playing and sometimes when it starts playing, there is an
>> audible "pop" noise when using headphones on most Tongfang GMxMxxx,
>> GKxNxxx, GMxZxxx, GMxTxxx, and GMxAxxx devices.
>>
>> Disabling power saving for the Realtek codec fixes this noise. Presumably
>> it is triggered on some power event in the audio circuit.
>>
>> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
>> Cc: stable@vger.kernel.org
> Usually this denylist is a last resort if any other methods never
> helped.  Is it the case?

I also tried setting codec->power_save_node = 0; in a patch_realtek.c quirk.

static void alc274_fixup_pop_noise(struct hda_codec *codec, const struct
hda_fixup *fix, int action)
{
       codec->power_save_node = 0;
}

That initially seemed to work, but when I tested it again a day later
after a fresh install, it didn't anymore. I don't know what is
different. On the install before, I did some debugging with boot
parameters and other stuff, cant reproduce anymore what exactly.

I took the line from alc274_fixup_bind_dacs which fixes the pop noise
when applied to the devices, but does a lot of random other stuff too
not meant for the device.

I think I only ever warm rebooted when trying other fixes including that
one, maybe that's the reason for the different behavior a day later ..

Kind Regards,

Werner Sembach

>
>
> thanks,
>
> Takashi

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

* Re: [PATCH] ALSA: hda/intel: Add quirk for TongFang devices with pop noise
  2022-05-11 13:58   ` Werner Sembach
@ 2022-05-11 14:09     ` Takashi Iwai
  2022-05-12 18:08       ` Werner Sembach
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2022-05-11 14:09 UTC (permalink / raw)
  To: Werner Sembach
  Cc: alsa-devel, kai.vehmanen, linux-kernel, imre.deak,
	pierre-louis.bossart, tiwai

On Wed, 11 May 2022 15:58:03 +0200,
Werner Sembach wrote:
> 
> Am 11.05.22 um 15:41 schrieb Takashi Iwai:
> > On Wed, 11 May 2022 15:38:28 +0200,
> > Werner Sembach wrote:
> >> When audio stops playing and sometimes when it starts playing, there is an
> >> audible "pop" noise when using headphones on most Tongfang GMxMxxx,
> >> GKxNxxx, GMxZxxx, GMxTxxx, and GMxAxxx devices.
> >>
> >> Disabling power saving for the Realtek codec fixes this noise. Presumably
> >> it is triggered on some power event in the audio circuit.
> >>
> >> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> >> Cc: stable@vger.kernel.org
> > Usually this denylist is a last resort if any other methods never
> > helped.  Is it the case?
> 
> I also tried setting codec->power_save_node = 0; in a patch_realtek.c quirk.
> 
> static void alc274_fixup_pop_noise(struct hda_codec *codec, const struct
> hda_fixup *fix, int action)
> {
>        codec->power_save_node = 0;
> }
> 
> That initially seemed to work, but when I tested it again a day later
> after a fresh install, it didn't anymore. I don't know what is
> different. On the install before, I did some debugging with boot
> parameters and other stuff, cant reproduce anymore what exactly.

power_save_node is already 0 as default for patch_alc269(), so it must
be irrelevant.

> I took the line from alc274_fixup_bind_dacs which fixes the pop noise
> when applied to the devices, but does a lot of random other stuff too
> not meant for the device.

It's only one thing, there are tons of different fixes :)
alc274_fixup_bind_dacs() rather specifies the routing so that the
speaker is connected to the preferred DAC.

Many click noises come from the default pin shut-up behavior.  You
can disable it or change it in other way.  Also, setting
auto_mute_via_amp may influence on such behavior (that is included in
alc274_fixup_bind_dacs()).

Note that many quirks can be enabled even without compiling but via
the codec patch loading (using hints).


thanks,

Takashi

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

* Re: [PATCH] ALSA: hda/intel: Add quirk for TongFang devices with pop noise
  2022-05-11 14:09     ` Takashi Iwai
@ 2022-05-12 18:08       ` Werner Sembach
  0 siblings, 0 replies; 5+ messages in thread
From: Werner Sembach @ 2022-05-12 18:08 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, kai.vehmanen, linux-kernel, imre.deak,
	pierre-louis.bossart, tiwai


Am 11.05.22 um 16:09 schrieb Takashi Iwai:
> On Wed, 11 May 2022 15:58:03 +0200,
> Werner Sembach wrote:
>> Am 11.05.22 um 15:41 schrieb Takashi Iwai:
>>> On Wed, 11 May 2022 15:38:28 +0200,
>>> Werner Sembach wrote:
>>>> When audio stops playing and sometimes when it starts playing, there is an
>>>> audible "pop" noise when using headphones on most Tongfang GMxMxxx,
>>>> GKxNxxx, GMxZxxx, GMxTxxx, and GMxAxxx devices.
>>>>
>>>> Disabling power saving for the Realtek codec fixes this noise. Presumably
>>>> it is triggered on some power event in the audio circuit.
>>>>
>>>> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
>>>> Cc: stable@vger.kernel.org
>>> Usually this denylist is a last resort if any other methods never
>>> helped.  Is it the case?
>> I also tried setting codec->power_save_node = 0; in a patch_realtek.c quirk.
>>
>> static void alc274_fixup_pop_noise(struct hda_codec *codec, const struct
>> hda_fixup *fix, int action)
>> {
>>        codec->power_save_node = 0;
>> }
>>
>> That initially seemed to work, but when I tested it again a day later
>> after a fresh install, it didn't anymore. I don't know what is
>> different. On the install before, I did some debugging with boot
>> parameters and other stuff, cant reproduce anymore what exactly.
> power_save_node is already 0 as default for patch_alc269(), so it must
> be irrelevant.
>
>> I took the line from alc274_fixup_bind_dacs which fixes the pop noise
>> when applied to the devices, but does a lot of random other stuff too
>> not meant for the device.
> It's only one thing, there are tons of different fixes :)
> alc274_fixup_bind_dacs() rather specifies the routing so that the
> speaker is connected to the preferred DAC.
>
> Many click noises come from the default pin shut-up behavior.  You
> can disable it or change it in other way.  Also, setting
> auto_mute_via_amp may influence on such behavior (that is included in
> alc274_fixup_bind_dacs()).
>
> Note that many quirks can be enabled even without compiling but via
> the codec patch loading (using hints).
>
>
> thanks,
>
> Takashi

Found a quirk in patch_realtek.c with the same effect as the
power_save=0 and 2 more affected subsystem ids. Patch send as v2.

Kind Regards,

Werner


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

end of thread, other threads:[~2022-05-12 18:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 13:38 [PATCH] ALSA: hda/intel: Add quirk for TongFang devices with pop noise Werner Sembach
2022-05-11 13:41 ` Takashi Iwai
2022-05-11 13:58   ` Werner Sembach
2022-05-11 14:09     ` Takashi Iwai
2022-05-12 18:08       ` Werner Sembach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).