aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-04-28 07:01:26 -0400
committerTakashi Iwai <tiwai@suse.de>2009-04-28 07:01:26 -0400
commit2a2ed0dfc9ec44a899c7d4672f73f2c045099118 (patch)
tree9d5670e68e7046982b09d5762d0a5004b05c5e31 /sound/pci/hda
parent299f293b3428ae6d73406642cd7d41f08d524c83 (diff)
ALSA: hda - Don't enable auto-mute but for speakers in patch_realtek.c
Enable auto-muting in model=auto only for devices with HP and speakers. For devices with HP and line-outs, don't enable the auto-muting. Also, add a debug print to show the auto-mute feature. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_realtek.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3a6306302c70..96475dc95fbb 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1099,13 +1099,16 @@ static void alc_init_auto_hp(struct hda_codec *codec)
1099 return; 1099 return;
1100 1100
1101 if (!spec->autocfg.speaker_pins[0]) { 1101 if (!spec->autocfg.speaker_pins[0]) {
1102 if (spec->autocfg.line_out_pins[0]) 1102 if (spec->autocfg.line_out_pins[0] &&
1103 spec->autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT)
1103 spec->autocfg.speaker_pins[0] = 1104 spec->autocfg.speaker_pins[0] =
1104 spec->autocfg.line_out_pins[0]; 1105 spec->autocfg.line_out_pins[0];
1105 else 1106 else
1106 return; 1107 return;
1107 } 1108 }
1108 1109
1110 snd_printdd("realtek: Enable HP auto-muting on NID 0x%x\n",
1111 spec->autocfg.hp_pins[0]);
1109 snd_hda_codec_write_cache(codec, spec->autocfg.hp_pins[0], 0, 1112 snd_hda_codec_write_cache(codec, spec->autocfg.hp_pins[0], 0,
1110 AC_VERB_SET_UNSOLICITED_ENABLE, 1113 AC_VERB_SET_UNSOLICITED_ENABLE,
1111 AC_USRSP_EN | ALC880_HP_EVENT); 1114 AC_USRSP_EN | ALC880_HP_EVENT);