Skip to content

Commit 69ea4c9

Browse files
KailangYangtiwai
authored andcommitted
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: 5aec989 ("ALSA: hda/realtek - ALC236 headset MIC recording issue") Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Reported-by: Joseph 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.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 645e583 commit 69ea4c9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ struct alc_spec {
122122
unsigned int ultra_low_power:1;
123123
unsigned int has_hs_key:1;
124124
unsigned int no_internal_mic_pin:1;
125+
unsigned int en_3kpull_low:1;
125126

126127
/* for PLL fix */
127128
hda_nid_t pll_nid;
@@ -3622,6 +3623,7 @@ static void alc256_shutup(struct hda_codec *codec)
36223623
if (!hp_pin)
36233624
hp_pin = 0x21;
36243625

3626+
alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
36253627
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
36263628

36273629
if (hp_pin_sense)
@@ -3638,8 +3640,7 @@ static void alc256_shutup(struct hda_codec *codec)
36383640
/* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
36393641
* when booting with headset plugged. So skip setting it for the codec alc257
36403642
*/
3641-
if (codec->core.vendor_id != 0x10ec0236 &&
3642-
codec->core.vendor_id != 0x10ec0257)
3643+
if (spec->en_3kpull_low)
36433644
alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
36443645

36453646
if (!spec->no_shutup_pins)
@@ -10682,6 +10683,8 @@ static int patch_alc269(struct hda_codec *codec)
1068210683
spec->shutup = alc256_shutup;
1068310684
spec->init_hook = alc256_init;
1068410685
spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
10686+
if (codec->bus->pci->vendor == PCI_VENDOR_ID_AMD)
10687+
spec->en_3kpull_low = true;
1068510688
break;
1068610689
case 0x10ec0257:
1068710690
spec->codec_variant = ALC269_TYPE_ALC257;

0 commit comments

Comments
 (0)