aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-04-28 11:57:46 -0400
committerTakashi Iwai <tiwai@suse.de>2011-04-28 11:57:46 -0400
commit1daf5f46c62bc69922e1ca8ccebbbff04f48e1f1 (patch)
treef4e4d8631635424431cebb477724cc7e8a8a3065 /sound/pci/hda/patch_realtek.c
parent1a1455de10d89b9f2107fe5ad1746e7c18838492 (diff)
ALSA: hda - More line-out auto-mute support for Realtek
Not only supporting the line-out automute as additional feature to the existing headphone automute, now the headphone jack can mute the line-out alone even without the speaker outs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 9e2594d6db96..3e41d5637764 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1517,16 +1517,19 @@ static void alc_init_auto_hp(struct hda_codec *codec)
1517{ 1517{
1518 struct alc_spec *spec = codec->spec; 1518 struct alc_spec *spec = codec->spec;
1519 struct auto_pin_cfg *cfg = &spec->autocfg; 1519 struct auto_pin_cfg *cfg = &spec->autocfg;
1520 int present = 0;
1520 int i; 1521 int i;
1521 1522
1522 if (!cfg->hp_pins[0]) { 1523 if (cfg->hp_pins[0])
1523 if (cfg->line_out_type != AUTO_PIN_HP_OUT) 1524 present++;
1524 return; 1525 if (cfg->line_out_pins[0])
1525 } 1526 present++;
1527 if (cfg->speaker_pins[0])
1528 present++;
1529 if (present < 2) /* need two different output types */
1530 return;
1526 1531
1527 if (!cfg->speaker_pins[0]) { 1532 if (!cfg->speaker_pins[0]) {
1528 if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT)
1529 return;
1530 memcpy(cfg->speaker_pins, cfg->line_out_pins, 1533 memcpy(cfg->speaker_pins, cfg->line_out_pins,
1531 sizeof(cfg->speaker_pins)); 1534 sizeof(cfg->speaker_pins));
1532 cfg->speaker_outs = cfg->line_outs; 1535 cfg->speaker_outs = cfg->line_outs;