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

Commit ee3c35c0 authored by Lydia Wang's avatar Lydia Wang Committed by Takashi Iwai
Browse files

ALSA: hda - VIA: Fix VT1708 can't build up Headphone control issue



Since VT1708 didn't support the control of getting connection number,
building of headphone control will fail in via_hp_build() function.

Signed-off-by: default avatarLydia Wang <lydiawang@viatech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 970f630f
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -1266,9 +1266,12 @@ static int via_hp_build(struct hda_codec *codec)
		break;
		break;
	}
	}


	nums = snd_hda_get_connections(codec, nid, conn, HDA_MAX_CONNECTIONS);
	if (spec->codec_type != VT1708) {
		nums = snd_hda_get_connections(codec, nid,
					       conn, HDA_MAX_CONNECTIONS);
		if (nums <= 1)
		if (nums <= 1)
			return 0;
			return 0;
	}


	knew = via_clone_control(spec, &via_hp_mixer[0]);
	knew = via_clone_control(spec, &via_hp_mixer[0]);
	if (knew == NULL)
	if (knew == NULL)