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

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

ALSA: hda - Don't query connections for widgets have no connections



Fixes the kernel warnings with IDT codecs like
    hda_codec: connection list not available for 0x1e

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 262ac22d
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -3408,6 +3408,9 @@ static int get_connection_index(struct hda_codec *codec, hda_nid_t mux,
	hda_nid_t conn[HDA_MAX_NUM_INPUTS];
	hda_nid_t conn[HDA_MAX_NUM_INPUTS];
	int i, nums;
	int i, nums;


	if (!(get_wcaps(codec, mux) & AC_WCAP_CONN_LIST))
		return -1;

	nums = snd_hda_get_connections(codec, mux, conn, ARRAY_SIZE(conn));
	nums = snd_hda_get_connections(codec, mux, conn, ARRAY_SIZE(conn));
	for (i = 0; i < nums; i++)
	for (i = 0; i < nums; i++)
		if (conn[i] == nid)
		if (conn[i] == nid)