Commit 69ea4c9d authored by Kailang Yang's avatar Kailang Yang Committed by Takashi Iwai

ALSA: hda/realtek - remove 3k pull low procedure

This was the ALC283 depop procedure.
Maybe this procedure wasn't suitable with new codec.
So, let us remove it. But HP 15z-fc000 must do 3k pull low. If it
reboot with plugged headset,
it will have errors show don't find codec error messages. Run 3k pull
low will solve issues.
So, let AMD chipset will run this for workarround.

Fixes: 5aec9891 ("ALSA: hda/realtek - ALC236 headset MIC recording issue")
Signed-off-by: default avatarKailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Reported-by: default avatarJoseph C. Sible <josephcsible@gmail.com>
Closes: https://lore.kernel.org/r/CABpewhE4REgn9RJZduuEU6Z_ijXNeQWnrxO1tg70Gkw=F8qNYg@mail.gmail.com/
Link: https://lore.kernel.org/r/4678992299664babac4403d9978e7ba7@realtek.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 645e583d
...@@ -122,6 +122,7 @@ struct alc_spec { ...@@ -122,6 +122,7 @@ struct alc_spec {
unsigned int ultra_low_power:1; unsigned int ultra_low_power:1;
unsigned int has_hs_key:1; unsigned int has_hs_key:1;
unsigned int no_internal_mic_pin:1; unsigned int no_internal_mic_pin:1;
unsigned int en_3kpull_low:1;
/* for PLL fix */ /* for PLL fix */
hda_nid_t pll_nid; hda_nid_t pll_nid;
...@@ -3622,6 +3623,7 @@ static void alc256_shutup(struct hda_codec *codec) ...@@ -3622,6 +3623,7 @@ static void alc256_shutup(struct hda_codec *codec)
if (!hp_pin) if (!hp_pin)
hp_pin = 0x21; hp_pin = 0x21;
alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
if (hp_pin_sense) if (hp_pin_sense)
...@@ -3638,8 +3640,7 @@ static void alc256_shutup(struct hda_codec *codec) ...@@ -3638,8 +3640,7 @@ static void alc256_shutup(struct hda_codec *codec)
/* If disable 3k pulldown control for alc257, the Mic detection will not work correctly /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
* when booting with headset plugged. So skip setting it for the codec alc257 * when booting with headset plugged. So skip setting it for the codec alc257
*/ */
if (codec->core.vendor_id != 0x10ec0236 && if (spec->en_3kpull_low)
codec->core.vendor_id != 0x10ec0257)
alc_update_coef_idx(codec, 0x46, 0, 3 << 12); alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
if (!spec->no_shutup_pins) if (!spec->no_shutup_pins)
...@@ -10682,6 +10683,8 @@ static int patch_alc269(struct hda_codec *codec) ...@@ -10682,6 +10683,8 @@ static int patch_alc269(struct hda_codec *codec)
spec->shutup = alc256_shutup; spec->shutup = alc256_shutup;
spec->init_hook = alc256_init; spec->init_hook = alc256_init;
spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */ spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
if (codec->bus->pci->vendor == PCI_VENDOR_ID_AMD)
spec->en_3kpull_low = true;
break; break;
case 0x10ec0257: case 0x10ec0257:
spec->codec_variant = ALC269_TYPE_ALC257; spec->codec_variant = ALC269_TYPE_ALC257;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment