Commit 1948fc06 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda/realtek: Add another ALC236 variant support

The codec chip 10ec:0230 is another variant of ALC236, combined with a
card reader.  Apply the equivalent setup as 10ec:0236.

BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1184869
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210618161720.28694-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5b24119e
...@@ -385,6 +385,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec) ...@@ -385,6 +385,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000);
fallthrough; fallthrough;
case 0x10ec0215: case 0x10ec0215:
case 0x10ec0230:
case 0x10ec0233: case 0x10ec0233:
case 0x10ec0235: case 0x10ec0235:
case 0x10ec0236: case 0x10ec0236:
...@@ -3153,6 +3154,7 @@ static void alc_disable_headset_jack_key(struct hda_codec *codec) ...@@ -3153,6 +3154,7 @@ static void alc_disable_headset_jack_key(struct hda_codec *codec)
alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0); alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0);
break; break;
case 0x10ec0230:
case 0x10ec0236: case 0x10ec0236:
case 0x10ec0256: case 0x10ec0256:
alc_write_coef_idx(codec, 0x48, 0x0); alc_write_coef_idx(codec, 0x48, 0x0);
...@@ -3180,6 +3182,7 @@ static void alc_enable_headset_jack_key(struct hda_codec *codec) ...@@ -3180,6 +3182,7 @@ static void alc_enable_headset_jack_key(struct hda_codec *codec)
alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8); alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8);
break; break;
case 0x10ec0230:
case 0x10ec0236: case 0x10ec0236:
case 0x10ec0256: case 0x10ec0256:
alc_write_coef_idx(codec, 0x48, 0xd011); alc_write_coef_idx(codec, 0x48, 0xd011);
...@@ -4744,6 +4747,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) ...@@ -4744,6 +4747,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
case 0x10ec0255: case 0x10ec0255:
alc_process_coef_fw(codec, coef0255); alc_process_coef_fw(codec, coef0255);
break; break;
case 0x10ec0230:
case 0x10ec0236: case 0x10ec0236:
case 0x10ec0256: case 0x10ec0256:
alc_process_coef_fw(codec, coef0256); alc_process_coef_fw(codec, coef0256);
...@@ -4858,6 +4862,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, ...@@ -4858,6 +4862,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
alc_process_coef_fw(codec, coef0255); alc_process_coef_fw(codec, coef0255);
snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
break; break;
case 0x10ec0230:
case 0x10ec0236: case 0x10ec0236:
case 0x10ec0256: case 0x10ec0256:
alc_write_coef_idx(codec, 0x45, 0xc489); alc_write_coef_idx(codec, 0x45, 0xc489);
...@@ -5007,6 +5012,7 @@ static void alc_headset_mode_default(struct hda_codec *codec) ...@@ -5007,6 +5012,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
case 0x10ec0255: case 0x10ec0255:
alc_process_coef_fw(codec, coef0255); alc_process_coef_fw(codec, coef0255);
break; break;
case 0x10ec0230:
case 0x10ec0236: case 0x10ec0236:
case 0x10ec0256: case 0x10ec0256:
alc_write_coef_idx(codec, 0x1b, 0x0e4b); alc_write_coef_idx(codec, 0x1b, 0x0e4b);
...@@ -5105,6 +5111,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec) ...@@ -5105,6 +5111,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
case 0x10ec0255: case 0x10ec0255:
alc_process_coef_fw(codec, coef0255); alc_process_coef_fw(codec, coef0255);
break; break;
case 0x10ec0230:
case 0x10ec0236: case 0x10ec0236:
case 0x10ec0256: case 0x10ec0256:
alc_process_coef_fw(codec, coef0256); alc_process_coef_fw(codec, coef0256);
...@@ -5218,6 +5225,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec) ...@@ -5218,6 +5225,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
case 0x10ec0255: case 0x10ec0255:
alc_process_coef_fw(codec, coef0255); alc_process_coef_fw(codec, coef0255);
break; break;
case 0x10ec0230:
case 0x10ec0236: case 0x10ec0236:
case 0x10ec0256: case 0x10ec0256:
alc_process_coef_fw(codec, coef0256); alc_process_coef_fw(codec, coef0256);
...@@ -5318,6 +5326,7 @@ static void alc_determine_headset_type(struct hda_codec *codec) ...@@ -5318,6 +5326,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
val = alc_read_coef_idx(codec, 0x46); val = alc_read_coef_idx(codec, 0x46);
is_ctia = (val & 0x0070) == 0x0070; is_ctia = (val & 0x0070) == 0x0070;
break; break;
case 0x10ec0230:
case 0x10ec0236: case 0x10ec0236:
case 0x10ec0256: case 0x10ec0256:
alc_write_coef_idx(codec, 0x1b, 0x0e4b); alc_write_coef_idx(codec, 0x1b, 0x0e4b);
...@@ -5611,6 +5620,7 @@ static void alc255_set_default_jack_type(struct hda_codec *codec) ...@@ -5611,6 +5620,7 @@ static void alc255_set_default_jack_type(struct hda_codec *codec)
case 0x10ec0255: case 0x10ec0255:
alc_process_coef_fw(codec, alc255fw); alc_process_coef_fw(codec, alc255fw);
break; break;
case 0x10ec0230:
case 0x10ec0236: case 0x10ec0236:
case 0x10ec0256: case 0x10ec0256:
alc_process_coef_fw(codec, alc256fw); alc_process_coef_fw(codec, alc256fw);
...@@ -6211,6 +6221,7 @@ static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec) ...@@ -6211,6 +6221,7 @@ static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */ alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15); alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15);
break; break;
case 0x10ec0230:
case 0x10ec0235: case 0x10ec0235:
case 0x10ec0236: case 0x10ec0236:
case 0x10ec0255: case 0x10ec0255:
...@@ -9342,6 +9353,7 @@ static int patch_alc269(struct hda_codec *codec) ...@@ -9342,6 +9353,7 @@ static int patch_alc269(struct hda_codec *codec)
spec->shutup = alc256_shutup; spec->shutup = alc256_shutup;
spec->init_hook = alc256_init; spec->init_hook = alc256_init;
break; break;
case 0x10ec0230:
case 0x10ec0236: case 0x10ec0236:
case 0x10ec0256: case 0x10ec0256:
spec->codec_variant = ALC269_TYPE_ALC256; spec->codec_variant = ALC269_TYPE_ALC256;
...@@ -10633,6 +10645,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = { ...@@ -10633,6 +10645,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269), HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269), HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269), HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269), HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269), HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269),
HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269), HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269),
......
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