ALSA: hda - Mute speakers when line-out jack is plugged with Conexant auto mode
authorTakashi Iwai <tiwai@suse.de>
Mon, 13 Dec 2010 11:48:35 +0000 (12:48 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 13 Dec 2010 11:50:25 +0000 (12:50 +0100)
Mute speakers when a line-out jack is plugged as well as headphone jacks
with the new Conexant codec parser in the auto mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_conexant.c

index 46bbf14e91ae06eb6c780adc3f1e545848654c34..96b286aebde671c5fe9c898dcd3489f9d4fd2566 100644 (file)
@@ -3424,6 +3424,9 @@ static void cx_auto_hp_automute(struct hda_codec *codec)
                                    AC_VERB_SET_PIN_WIDGET_CONTROL,
                                    present ? 0 : PIN_OUT);
        }
+       for (i = 0; !present && i < cfg->line_outs; i++)
+               if (snd_hda_jack_detect(codec, cfg->line_out_pins[i]))
+                       present = 1;
        for (i = 0; i < cfg->speaker_outs; i++) {
                snd_hda_codec_write(codec, cfg->speaker_pins[i], 0,
                                    AC_VERB_SET_PIN_WIDGET_CONTROL,