ALSA: hda/realtek - Support headset mode for ALC215/ALC285/ALC289
This patch will enable headset mode for ALC215/ALC285/ALC289 platform. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Родитель
3c7f69195c
Коммит
c2b691ee35
|
@ -4086,8 +4086,11 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
|
|||
case 0x10ec0668:
|
||||
alc_process_coef_fw(codec, coef0668);
|
||||
break;
|
||||
case 0x10ec0215:
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0285:
|
||||
case 0x10ec0295:
|
||||
case 0x10ec0289:
|
||||
case 0x10ec0299:
|
||||
alc_process_coef_fw(codec, coef0225);
|
||||
break;
|
||||
|
@ -4209,8 +4212,11 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
|
|||
alc_process_coef_fw(codec, coef0688);
|
||||
snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
|
||||
break;
|
||||
case 0x10ec0215:
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0285:
|
||||
case 0x10ec0295:
|
||||
case 0x10ec0289:
|
||||
case 0x10ec0299:
|
||||
alc_process_coef_fw(codec, alc225_pre_hsmode);
|
||||
alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x31<<10);
|
||||
|
@ -4281,8 +4287,11 @@ static void alc_headset_mode_default(struct hda_codec *codec)
|
|||
};
|
||||
|
||||
switch (codec->core.vendor_id) {
|
||||
case 0x10ec0215:
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0285:
|
||||
case 0x10ec0295:
|
||||
case 0x10ec0289:
|
||||
case 0x10ec0299:
|
||||
alc_process_coef_fw(codec, alc225_pre_hsmode);
|
||||
alc_process_coef_fw(codec, coef0225);
|
||||
|
@ -4424,8 +4433,11 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
|
|||
case 0x10ec0668:
|
||||
alc_process_coef_fw(codec, coef0688);
|
||||
break;
|
||||
case 0x10ec0215:
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0285:
|
||||
case 0x10ec0295:
|
||||
case 0x10ec0289:
|
||||
case 0x10ec0299:
|
||||
val = alc_read_coef_idx(codec, 0x45);
|
||||
if (val & (1 << 9))
|
||||
|
@ -4528,8 +4540,11 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
|
|||
case 0x10ec0668:
|
||||
alc_process_coef_fw(codec, coef0688);
|
||||
break;
|
||||
case 0x10ec0215:
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0285:
|
||||
case 0x10ec0295:
|
||||
case 0x10ec0289:
|
||||
case 0x10ec0299:
|
||||
alc_process_coef_fw(codec, coef0225);
|
||||
break;
|
||||
|
@ -4658,8 +4673,11 @@ static void alc_determine_headset_type(struct hda_codec *codec)
|
|||
val = alc_read_coef_idx(codec, 0xbe);
|
||||
is_ctia = (val & 0x1c02) == 0x1c02;
|
||||
break;
|
||||
case 0x10ec0215:
|
||||
case 0x10ec0225:
|
||||
case 0x10ec0285:
|
||||
case 0x10ec0295:
|
||||
case 0x10ec0289:
|
||||
case 0x10ec0299:
|
||||
snd_hda_codec_write(codec, 0x21, 0,
|
||||
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
|
||||
|
|
Загрузка…
Ссылка в новой задаче