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

Commit b46882b6 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge branch 'topic/hda-lo-jack' into for-next

parents cf6814f2 3abb4f4d
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -1038,11 +1038,24 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
			break;
		*index = ch;
		return "Headphone";
	case AUTO_PIN_LINE_OUT:
		/* This deals with the case where we have two DACs and
		 * one LO, one HP and one Speaker */
		if (!ch && cfg->speaker_outs && cfg->hp_outs) {
			bool hp_lo_shared = !path_has_mixer(codec, spec->hp_paths[0], ctl_type);
			bool spk_lo_shared = !path_has_mixer(codec, spec->speaker_paths[0], ctl_type);
			if (hp_lo_shared && spk_lo_shared)
				return spec->vmaster_mute.hook ? "PCM" : "Master";
			if (hp_lo_shared)
				return "Headphone+LO";
			if (spk_lo_shared)
				return "Speaker+LO";
		}
	}

	/* for a single channel output, we don't have to name the channel */
	if (cfg->line_outs == 1 && !spec->multi_ios)
		return "PCM";
		return "Line Out";

	if (ch >= ARRAY_SIZE(channel_name)) {
		snd_BUG();
@@ -4524,7 +4537,7 @@ static const char * const slave_pfxs[] = {
	"CLFE", "Bass Speaker", "PCM",
	"Speaker Front", "Speaker Surround", "Speaker CLFE", "Speaker Side",
	"Headphone Front", "Headphone Surround", "Headphone CLFE",
	"Headphone Side",
	"Headphone Side", "Headphone+LO", "Speaker+LO",
	NULL,
};