All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: This will solve jack plug and unplug noise
@ 2019-01-09  9:32 Kailang
  2019-01-09  9:34 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Kailang @ 2019-01-09  9:32 UTC (permalink / raw)
  To: Takashi Iwai (tiwai@suse.de); +Cc:  (alsa-devel@alsa-project.org)

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

Hi Takashi,

Update ALC225 depop for jack plug and unplug noise.
Add this two patch.
It will solve jack plug and unplug noise for ALC225 of Dell headset mode.

BR,
Kailang


[-- Attachment #2: 0000-add-unplug-function-alc225.patch --]
[-- Type: application/octet-stream, Size: 819 bytes --]

From 2421551a9b35b8f56d3cfb795aafe797e987b6e9 Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Wed, 9 Jan 2019 16:23:37 +0800
Subject: [PATCH] ALSA: hda/realtek - Add unplug function into unplug state of
 Headset Mode for ALC225

Forgot to add unplug function to unplug state of headset mode
for ALC225.

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 396ec43..2c5c8ad 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4102,6 +4102,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
 	case 0x10ec0295:
 	case 0x10ec0289:
 	case 0x10ec0299:
+		alc_process_coef_fw(codec, alc225_pre_hsmode);
 		alc_process_coef_fw(codec, coef0225);
 		break;
 	case 0x10ec0867:

[-- Attachment #3: 0000-alc225-headset-mode-disable-mic-vref.patch --]
[-- Type: application/octet-stream, Size: 1994 bytes --]

From d171c23d6de805f816b86dba2f3be6406340dc47 Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Wed, 9 Jan 2019 17:05:24 +0800
Subject: [PATCH] ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225

Disable Headset Mic VREF for headset mode of ALC225.
This will be controlled by coef bits of headset mode functions.

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 396ec43..3552eb8 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5440,6 +5440,17 @@ static void alc_fixup_headset_jack(struct hda_codec *codec,
 	}
 }
 
+static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
+				  const struct hda_fixup *fix, int action)
+{
+	struct alc_spec *spec = codec->spec;
+
+	if (action != HDA_FIXUP_ACT_PRE_PROBE)
+		return;
+
+	snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
+}
+
 /* for hda_fixup_thinkpad_acpi() */
 #include "thinkpad_helper.c"
 
@@ -5549,6 +5560,7 @@ enum {
 	ALC293_FIXUP_LENOVO_SPK_NOISE,
 	ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
 	ALC255_FIXUP_DELL_SPK_NOISE,
+	ALC225_FIXUP_DISABLE_MIC_VREF,
 	ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
 	ALC295_FIXUP_DISABLE_DAC3,
 	ALC280_FIXUP_HP_HEADSET_MIC,
@@ -6268,6 +6280,12 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
 	},
+	[ALC225_FIXUP_DISABLE_MIC_VREF] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc_fixup_disable_mic_vref,
+		.chained = true,
+		.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
+	},
 	[ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
 		.type = HDA_FIXUP_VERBS,
 		.v.verbs = (const struct hda_verb[]) {
@@ -6277,7 +6295,7 @@ static const struct hda_fixup alc269_fixups[] = {
 			{}
 		},
 		.chained = true,
-		.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
+		.chain_id = ALC225_FIXUP_DISABLE_MIC_VREF
 	},
 	[ALC280_FIXUP_HP_HEADSET_MIC] = {
 		.type = HDA_FIXUP_FUNC,

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



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

* Re: This will solve jack plug and unplug noise
  2019-01-09  9:32 This will solve jack plug and unplug noise Kailang
@ 2019-01-09  9:34 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-01-09  9:34 UTC (permalink / raw)
  To: Kailang; +Cc:  (alsa-devel@alsa-project.org)

On Wed, 09 Jan 2019 10:32:55 +0100,
Kailang wrote:
> 
> Hi Takashi,
> 
> Update ALC225 depop for jack plug and unplug noise.
> Add this two patch.
> It will solve jack plug and unplug noise for ALC225 of Dell headset mode.

Thanks, applied now.
The second patch got a compile warning, so I fixed it (removed the
unused spec variable) and slightly changed the code.


Takashi

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

end of thread, other threads:[~2019-01-09  9:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-09  9:32 This will solve jack plug and unplug noise Kailang
2019-01-09  9:34 ` Takashi Iwai

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.