Commit f7ae9ba0 authored by Kailang Yang's avatar Kailang Yang Committed by Takashi Iwai

ALSA: hda/realtek - Fixed ALC286/ALC288 recording delay for Headset Mic

It will be recording voice delay for resume back recording for Headset Mic.
This alc286 will quickly open Headset Mic, to prevent avoid recording files are missing.
The issue was fixed. This is follow ALC286 programing guide.

[fix build error, add static and renamed the function by tiwai]
Signed-off-by: default avatarKailang Yang <kailang@realtek.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 68a9edd1
...@@ -2782,6 +2782,27 @@ static int alc269_parse_auto_config(struct hda_codec *codec) ...@@ -2782,6 +2782,27 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
return alc_parse_auto_config(codec, alc269_ignore, ssids); return alc_parse_auto_config(codec, alc269_ignore, ssids);
} }
static int find_ext_mic_pin(struct hda_codec *codec);
static void alc286_shutup(struct hda_codec *codec)
{
int i;
int mic_pin = find_ext_mic_pin(codec);
/* don't shut up pins when unloading the driver; otherwise it breaks
* the default pin setup at the next load of the driver
*/
if (codec->bus->shutdown)
return;
for (i = 0; i < codec->init_pins.used; i++) {
struct hda_pincfg *pin = snd_array_elem(&codec->init_pins, i);
/* use read here for syncing after issuing each verb */
if (pin->nid != mic_pin)
snd_hda_codec_read(codec, pin->nid, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL, 0);
}
codec->pins_shutup = 1;
}
static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up)
{ {
int val = alc_read_coef_idx(codec, 0x04); int val = alc_read_coef_idx(codec, 0x04);
...@@ -5384,6 +5405,7 @@ static int patch_alc269(struct hda_codec *codec) ...@@ -5384,6 +5405,7 @@ static int patch_alc269(struct hda_codec *codec)
case 0x10ec0286: case 0x10ec0286:
case 0x10ec0288: case 0x10ec0288:
spec->codec_variant = ALC269_TYPE_ALC286; spec->codec_variant = ALC269_TYPE_ALC286;
spec->shutup = alc286_shutup;
break; break;
case 0x10ec0255: case 0x10ec0255:
spec->codec_variant = ALC269_TYPE_ALC255; spec->codec_variant = ALC269_TYPE_ALC255;
......
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