提交 e322a36d 编写于 作者: L Lydia Wang 提交者: Takashi Iwai

ALSA: hda - Fix jack-detection on non-VT1708 VIA codecs

Move codec init verb which is only applicatable for VT1708.

I've found the root cause that jack plugged in can't be detected.
The verb in vt1708_init_verbs is used to power down jack detect circuit.
This verb is only applicable to VT1708. vt1708 didn't implement jack
detect function in hardware, so we should shut down this function to
avoid noise. But for other codecs, hardware implement jack detect
function. If sending this verb during initialization, jack detect will
be invalid. So I move this verb from via_parse_auto_config() to
patch_vt1708().
Signed-off-by: NLydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 94230c11
...@@ -2338,7 +2338,6 @@ static int via_parse_auto_config(struct hda_codec *codec) ...@@ -2338,7 +2338,6 @@ static int via_parse_auto_config(struct hda_codec *codec)
if (spec->kctls.list) if (spec->kctls.list)
spec->mixers[spec->num_mixers++] = spec->kctls.list; spec->mixers[spec->num_mixers++] = spec->kctls.list;
spec->init_verbs[spec->num_iverbs++] = vt1708_init_verbs;
if (spec->hp_dac_nid && spec->hp_dep_path.depth) { if (spec->hp_dac_nid && spec->hp_dep_path.depth) {
err = via_hp_build(codec); err = via_hp_build(codec);
...@@ -2504,6 +2503,8 @@ static int patch_vt1708(struct hda_codec *codec) ...@@ -2504,6 +2503,8 @@ static int patch_vt1708(struct hda_codec *codec)
if (codec->vendor_id == 0x11061708) if (codec->vendor_id == 0x11061708)
spec->stream_analog_playback = &vt1708_pcm_analog_s16_playback; spec->stream_analog_playback = &vt1708_pcm_analog_s16_playback;
spec->init_verbs[spec->num_iverbs++] = vt1708_init_verbs;
codec->patch_ops = via_patch_ops; codec->patch_ops = via_patch_ops;
INIT_DELAYED_WORK(&spec->vt1708_hp_work, vt1708_update_hp_jack_state); INIT_DELAYED_WORK(&spec->vt1708_hp_work, vt1708_update_hp_jack_state);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册