ALSA: hda - Don't apply ALC269-specific initialization to ALC275

ALC275 doesn't require the ALC269 (and its variants) specific init
sequences. Add the check of codec id.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by Kailang Yang and committed by Takashi Iwai c793bec5 2785591a

+23 -22
+23 -22
sound/pci/hda/patch_realtek.c
··· 15104 15105 alc_auto_parse_customize_define(codec); 15106 15107 - coef = alc_read_coef_idx(codec, 0); 15108 - if ((coef & 0x00f0) == 0x0010) { 15109 - if (codec->bus->pci->subsystem_vendor == 0x1025 && 15110 - spec->cdefine.platform_type == 1) { 15111 - alc_codec_rename(codec, "ALC271X"); 15112 - spec->codec_variant = ALC269_TYPE_ALC271X; 15113 - } else if ((coef & 0xf000) == 0x1000) { 15114 - spec->codec_variant = ALC269_TYPE_ALC270; 15115 - } else if ((coef & 0xf000) == 0x2000) { 15116 - alc_codec_rename(codec, "ALC259"); 15117 - spec->codec_variant = ALC269_TYPE_ALC259; 15118 - } else if ((coef & 0xf000) == 0x3000) { 15119 - alc_codec_rename(codec, "ALC258"); 15120 - spec->codec_variant = ALC269_TYPE_ALC258; 15121 - } else { 15122 - alc_codec_rename(codec, "ALC269VB"); 15123 - spec->codec_variant = ALC269_TYPE_ALC269VB; 15124 - } 15125 - } else 15126 - alc_fix_pll_init(codec, 0x20, 0x04, 15); 15127 - 15128 - alc269_fill_coef(codec); 15129 15130 board_config = snd_hda_check_board_config(codec, ALC269_MODEL_LAST, 15131 alc269_models,
··· 15104 15105 alc_auto_parse_customize_define(codec); 15106 15107 + if (codec->vendor_id == 0x10ec0269) { 15108 + coef = alc_read_coef_idx(codec, 0); 15109 + if ((coef & 0x00f0) == 0x0010) { 15110 + if (codec->bus->pci->subsystem_vendor == 0x1025 && 15111 + spec->cdefine.platform_type == 1) { 15112 + alc_codec_rename(codec, "ALC271X"); 15113 + spec->codec_variant = ALC269_TYPE_ALC271X; 15114 + } else if ((coef & 0xf000) == 0x1000) { 15115 + spec->codec_variant = ALC269_TYPE_ALC270; 15116 + } else if ((coef & 0xf000) == 0x2000) { 15117 + alc_codec_rename(codec, "ALC259"); 15118 + spec->codec_variant = ALC269_TYPE_ALC259; 15119 + } else if ((coef & 0xf000) == 0x3000) { 15120 + alc_codec_rename(codec, "ALC258"); 15121 + spec->codec_variant = ALC269_TYPE_ALC258; 15122 + } else { 15123 + alc_codec_rename(codec, "ALC269VB"); 15124 + spec->codec_variant = ALC269_TYPE_ALC269VB; 15125 + } 15126 + } else 15127 + alc_fix_pll_init(codec, 0x20, 0x04, 15); 15128 + alc269_fill_coef(codec); 15129 + } 15130 15131 board_config = snd_hda_check_board_config(codec, ALC269_MODEL_LAST, 15132 alc269_models,