Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c4bdf9b authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Enable line-out detection only with speakers



Enable line-out detection for IDT/STAC codecs only when speaker pins
exist.  In some cases, the speaker itself is identified as line-out,
and this confuses the situation.  Only the extra line-outs should do
auto-muting.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5908589f
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -4350,7 +4350,8 @@ static int stac92xx_init(struct hda_codec *codec)
			hda_nid_t nid = cfg->hp_pins[i];
			hda_nid_t nid = cfg->hp_pins[i];
			enable_pin_detect(codec, nid, STAC_HP_EVENT);
			enable_pin_detect(codec, nid, STAC_HP_EVENT);
		}
		}
		if (cfg->line_out_type == AUTO_PIN_LINE_OUT) {
		if (cfg->line_out_type == AUTO_PIN_LINE_OUT &&
		    cfg->speaker_outs > 0) {
			/* enable pin-detect for line-outs as well */
			/* enable pin-detect for line-outs as well */
			for (i = 0; i < cfg->line_outs; i++) {
			for (i = 0; i < cfg->line_outs; i++) {
				hda_nid_t nid = cfg->line_out_pins[i];
				hda_nid_t nid = cfg->line_out_pins[i];