Commit f7ae9ba0e80dd3a359cd9e4075b7b6f8acc5a3fa
Committed by
Takashi Iwai
1 parent
68a9edd18c
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Showing 1 changed file with 22 additions and 0 deletions Side-by-side Diff
sound/pci/hda/patch_realtek.c
... | ... | @@ -2782,6 +2782,27 @@ |
2782 | 2782 | return alc_parse_auto_config(codec, alc269_ignore, ssids); |
2783 | 2783 | } |
2784 | 2784 | |
2785 | +static int find_ext_mic_pin(struct hda_codec *codec); | |
2786 | + | |
2787 | +static void alc286_shutup(struct hda_codec *codec) | |
2788 | +{ | |
2789 | + int i; | |
2790 | + int mic_pin = find_ext_mic_pin(codec); | |
2791 | + /* don't shut up pins when unloading the driver; otherwise it breaks | |
2792 | + * the default pin setup at the next load of the driver | |
2793 | + */ | |
2794 | + if (codec->bus->shutdown) | |
2795 | + return; | |
2796 | + for (i = 0; i < codec->init_pins.used; i++) { | |
2797 | + struct hda_pincfg *pin = snd_array_elem(&codec->init_pins, i); | |
2798 | + /* use read here for syncing after issuing each verb */ | |
2799 | + if (pin->nid != mic_pin) | |
2800 | + snd_hda_codec_read(codec, pin->nid, 0, | |
2801 | + AC_VERB_SET_PIN_WIDGET_CONTROL, 0); | |
2802 | + } | |
2803 | + codec->pins_shutup = 1; | |
2804 | +} | |
2805 | + | |
2785 | 2806 | static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) |
2786 | 2807 | { |
2787 | 2808 | int val = alc_read_coef_idx(codec, 0x04); |
... | ... | @@ -5384,6 +5405,7 @@ |
5384 | 5405 | case 0x10ec0286: |
5385 | 5406 | case 0x10ec0288: |
5386 | 5407 | spec->codec_variant = ALC269_TYPE_ALC286; |
5408 | + spec->shutup = alc286_shutup; | |
5387 | 5409 | break; |
5388 | 5410 | case 0x10ec0255: |
5389 | 5411 | spec->codec_variant = ALC269_TYPE_ALC255; |