diff options
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 56 |
1 files changed, 52 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 06199e4e930f..4d11fbfca5e2 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3583,6 +3583,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) | |||
3583 | break; | 3583 | break; |
3584 | case 0x10ec0286: | 3584 | case 0x10ec0286: |
3585 | case 0x10ec0288: | 3585 | case 0x10ec0288: |
3586 | case 0x10ec0298: | ||
3586 | alc_process_coef_fw(codec, coef0288); | 3587 | alc_process_coef_fw(codec, coef0288); |
3587 | break; | 3588 | break; |
3588 | case 0x10ec0292: | 3589 | case 0x10ec0292: |
@@ -3657,6 +3658,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, | |||
3657 | break; | 3658 | break; |
3658 | case 0x10ec0286: | 3659 | case 0x10ec0286: |
3659 | case 0x10ec0288: | 3660 | case 0x10ec0288: |
3661 | case 0x10ec0298: | ||
3660 | alc_update_coef_idx(codec, 0x4f, 0x000c, 0); | 3662 | alc_update_coef_idx(codec, 0x4f, 0x000c, 0); |
3661 | snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); | 3663 | snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); |
3662 | alc_process_coef_fw(codec, coef0288); | 3664 | alc_process_coef_fw(codec, coef0288); |
@@ -3736,6 +3738,7 @@ static void alc_headset_mode_default(struct hda_codec *codec) | |||
3736 | break; | 3738 | break; |
3737 | case 0x10ec0286: | 3739 | case 0x10ec0286: |
3738 | case 0x10ec0288: | 3740 | case 0x10ec0288: |
3741 | case 0x10ec0298: | ||
3739 | alc_process_coef_fw(codec, coef0288); | 3742 | alc_process_coef_fw(codec, coef0288); |
3740 | break; | 3743 | break; |
3741 | break; | 3744 | break; |
@@ -3801,6 +3804,9 @@ static void alc_headset_mode_ctia(struct hda_codec *codec) | |||
3801 | case 0x10ec0283: | 3804 | case 0x10ec0283: |
3802 | alc_process_coef_fw(codec, coef0233); | 3805 | alc_process_coef_fw(codec, coef0233); |
3803 | break; | 3806 | break; |
3807 | case 0x10ec0298: | ||
3808 | alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020);/* Headset output enable */ | ||
3809 | /* ALC298 jack type setting is the same with ALC286/ALC288 */ | ||
3804 | case 0x10ec0286: | 3810 | case 0x10ec0286: |
3805 | case 0x10ec0288: | 3811 | case 0x10ec0288: |
3806 | alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400); | 3812 | alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400); |
@@ -3869,6 +3875,9 @@ static void alc_headset_mode_omtp(struct hda_codec *codec) | |||
3869 | case 0x10ec0283: | 3875 | case 0x10ec0283: |
3870 | alc_process_coef_fw(codec, coef0233); | 3876 | alc_process_coef_fw(codec, coef0233); |
3871 | break; | 3877 | break; |
3878 | case 0x10ec0298: | ||
3879 | alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010);/* Headset output enable */ | ||
3880 | /* ALC298 jack type setting is the same with ALC286/ALC288 */ | ||
3872 | case 0x10ec0286: | 3881 | case 0x10ec0286: |
3873 | case 0x10ec0288: | 3882 | case 0x10ec0288: |
3874 | alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400); | 3883 | alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400); |
@@ -3931,6 +3940,9 @@ static void alc_determine_headset_type(struct hda_codec *codec) | |||
3931 | val = alc_read_coef_idx(codec, 0x46); | 3940 | val = alc_read_coef_idx(codec, 0x46); |
3932 | is_ctia = (val & 0x0070) == 0x0070; | 3941 | is_ctia = (val & 0x0070) == 0x0070; |
3933 | break; | 3942 | break; |
3943 | case 0x10ec0298: | ||
3944 | alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020); /* Headset output enable */ | ||
3945 | /* ALC298 check jack type is the same with ALC286/ALC288 */ | ||
3934 | case 0x10ec0286: | 3946 | case 0x10ec0286: |
3935 | case 0x10ec0288: | 3947 | case 0x10ec0288: |
3936 | alc_process_coef_fw(codec, coef0288); | 3948 | alc_process_coef_fw(codec, coef0288); |
@@ -4190,11 +4202,18 @@ static void alc_shutup_dell_xps13(struct hda_codec *codec) | |||
4190 | static void alc_fixup_dell_xps13(struct hda_codec *codec, | 4202 | static void alc_fixup_dell_xps13(struct hda_codec *codec, |
4191 | const struct hda_fixup *fix, int action) | 4203 | const struct hda_fixup *fix, int action) |
4192 | { | 4204 | { |
4193 | if (action == HDA_FIXUP_ACT_PROBE) { | 4205 | struct alc_spec *spec = codec->spec; |
4194 | struct alc_spec *spec = codec->spec; | 4206 | struct hda_input_mux *imux = &spec->gen.input_mux; |
4195 | struct hda_input_mux *imux = &spec->gen.input_mux; | 4207 | int i; |
4196 | int i; | ||
4197 | 4208 | ||
4209 | switch (action) { | ||
4210 | case HDA_FIXUP_ACT_PRE_PROBE: | ||
4211 | /* mic pin 0x19 must be initialized with Vref Hi-Z, otherwise | ||
4212 | * it causes a click noise at start up | ||
4213 | */ | ||
4214 | snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); | ||
4215 | break; | ||
4216 | case HDA_FIXUP_ACT_PROBE: | ||
4198 | spec->shutup = alc_shutup_dell_xps13; | 4217 | spec->shutup = alc_shutup_dell_xps13; |
4199 | 4218 | ||
4200 | /* Make the internal mic the default input source. */ | 4219 | /* Make the internal mic the default input source. */ |
@@ -4204,6 +4223,7 @@ static void alc_fixup_dell_xps13(struct hda_codec *codec, | |||
4204 | break; | 4223 | break; |
4205 | } | 4224 | } |
4206 | } | 4225 | } |
4226 | break; | ||
4207 | } | 4227 | } |
4208 | } | 4228 | } |
4209 | 4229 | ||
@@ -4484,6 +4504,7 @@ enum { | |||
4484 | ALC288_FIXUP_DELL_HEADSET_MODE, | 4504 | ALC288_FIXUP_DELL_HEADSET_MODE, |
4485 | ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, | 4505 | ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, |
4486 | ALC288_FIXUP_DELL_XPS_13_GPIO6, | 4506 | ALC288_FIXUP_DELL_XPS_13_GPIO6, |
4507 | ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, | ||
4487 | }; | 4508 | }; |
4488 | 4509 | ||
4489 | static const struct hda_fixup alc269_fixups[] = { | 4510 | static const struct hda_fixup alc269_fixups[] = { |
@@ -5006,6 +5027,16 @@ static const struct hda_fixup alc269_fixups[] = { | |||
5006 | .chained = true, | 5027 | .chained = true, |
5007 | .chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE | 5028 | .chain_id = ALC288_FIXUP_DELL1_MIC_NO_PRESENCE |
5008 | }, | 5029 | }, |
5030 | [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = { | ||
5031 | .type = HDA_FIXUP_PINS, | ||
5032 | .v.pins = (const struct hda_pintbl[]) { | ||
5033 | { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ | ||
5034 | { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ | ||
5035 | { } | ||
5036 | }, | ||
5037 | .chained = true, | ||
5038 | .chain_id = ALC269_FIXUP_HEADSET_MODE | ||
5039 | }, | ||
5009 | }; | 5040 | }; |
5010 | 5041 | ||
5011 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { | 5042 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
@@ -5211,6 +5242,8 @@ static const struct hda_model_fixup alc269_fixup_models[] = { | |||
5211 | {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"}, | 5242 | {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"}, |
5212 | {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, | 5243 | {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, |
5213 | {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"}, | 5244 | {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"}, |
5245 | {.id = ALC269_FIXUP_HEADSET_MODE, .name = "headset-mode"}, | ||
5246 | {.id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, .name = "headset-mode-no-hp-mic"}, | ||
5214 | {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, | 5247 | {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, |
5215 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, | 5248 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, |
5216 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, | 5249 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, |
@@ -5269,6 +5302,13 @@ static const struct hda_model_fixup alc269_fixup_models[] = { | |||
5269 | {0x1d, 0x40700001}, \ | 5302 | {0x1d, 0x40700001}, \ |
5270 | {0x1e, 0x411111f0} | 5303 | {0x1e, 0x411111f0} |
5271 | 5304 | ||
5305 | #define ALC298_STANDARD_PINS \ | ||
5306 | {0x18, 0x411111f0}, \ | ||
5307 | {0x19, 0x411111f0}, \ | ||
5308 | {0x1a, 0x411111f0}, \ | ||
5309 | {0x1e, 0x411111f0}, \ | ||
5310 | {0x1f, 0x411111f0} | ||
5311 | |||
5272 | static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { | 5312 | static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { |
5273 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, | 5313 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, |
5274 | ALC255_STANDARD_PINS, | 5314 | ALC255_STANDARD_PINS, |
@@ -5534,6 +5574,14 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { | |||
5534 | {0x16, 0x411111f0}, | 5574 | {0x16, 0x411111f0}, |
5535 | {0x18, 0x411111f0}, | 5575 | {0x18, 0x411111f0}, |
5536 | {0x19, 0x411111f0}), | 5576 | {0x19, 0x411111f0}), |
5577 | SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, | ||
5578 | ALC298_STANDARD_PINS, | ||
5579 | {0x12, 0x90a60130}, | ||
5580 | {0x13, 0x40000000}, | ||
5581 | {0x14, 0x411111f0}, | ||
5582 | {0x17, 0x90170140}, | ||
5583 | {0x1d, 0x4068a36d}, | ||
5584 | {0x21, 0x03211020}), | ||
5537 | {} | 5585 | {} |
5538 | }; | 5586 | }; |
5539 | 5587 | ||