From: Takashi Iwai Date: Tue, 17 May 2011 08:04:08 +0000 (+0200) Subject: ALSA: hda - Fix initialization of spec->automute_lines in patch_realtek.c X-Git-Tag: firefly_0821_release~7613^2~1041^2~12^2~16 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=52d3cb88d75701f800db16561ff12c7692b56e55;p=firefly-linux-kernel-4.4.55.git ALSA: hda - Fix initialization of spec->automute_lines in patch_realtek.c spec->automute_lines shouldn't be set unless the line-detection is available. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 473ddc72b5cd..1f00cdbf2341 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1584,7 +1584,7 @@ static void alc_init_auto_hp(struct hda_codec *codec) AC_USRSP_EN | ALC880_FRONT_EVENT); spec->detect_line = 1; } - spec->automute_lines = 1; + spec->automute_lines = spec->detect_line; } if (spec->automute) {