Commit 526af6eb authored by Kailang Yang's avatar Kailang Yang Committed by Takashi Iwai

ALSA: hda/realtek - Apply the coef-setup only to ALC269VB

The coef setup in alc269_fill_coef() was designed only for ALC269VB
model, and this has some bad effects for other ALC269 variants, such
as turning off the external mic input.  Apply it only to ALC269VB.
Signed-off-by: default avatarKailang Yang <kailang@realtek.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 8f239214
...@@ -2068,12 +2068,16 @@ static int alc_build_controls(struct hda_codec *codec) ...@@ -2068,12 +2068,16 @@ static int alc_build_controls(struct hda_codec *codec)
*/ */
static void alc_init_special_input_src(struct hda_codec *codec); static void alc_init_special_input_src(struct hda_codec *codec);
static int alc269_fill_coef(struct hda_codec *codec);
static int alc_init(struct hda_codec *codec) static int alc_init(struct hda_codec *codec)
{ {
struct alc_spec *spec = codec->spec; struct alc_spec *spec = codec->spec;
unsigned int i; unsigned int i;
if (codec->vendor_id == 0x10ec0269)
alc269_fill_coef(codec);
alc_fix_pll(codec); alc_fix_pll(codec);
alc_auto_init_amp(codec, spec->init_amp); alc_auto_init_amp(codec, spec->init_amp);
...@@ -5476,8 +5480,12 @@ static const struct alc_model_fixup alc269_fixup_models[] = { ...@@ -5476,8 +5480,12 @@ static const struct alc_model_fixup alc269_fixup_models[] = {
static int alc269_fill_coef(struct hda_codec *codec) static int alc269_fill_coef(struct hda_codec *codec)
{ {
struct alc_spec *spec = codec->spec;
int val; int val;
if (spec->codec_variant != ALC269_TYPE_ALC269VB)
return 0;
if ((alc_get_coef0(codec) & 0x00ff) < 0x015) { if ((alc_get_coef0(codec) & 0x00ff) < 0x015) {
alc_write_coef_idx(codec, 0xf, 0x960b); alc_write_coef_idx(codec, 0xf, 0x960b);
alc_write_coef_idx(codec, 0xe, 0x8817); alc_write_coef_idx(codec, 0xe, 0x8817);
......
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