Skip to content

Commit

Permalink
ALSA: hda - Don't query connections for widgets have no connections
Browse files Browse the repository at this point in the history
Fixes the kernel warnings with IDT codecs like
    hda_codec: connection list not available for 0x1e

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Apr 7, 2011
1 parent 262ac22 commit cd9abc7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
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));
for (i = 0; i < nums; i++)
if (conn[i] == nid)
Expand Down

0 comments on commit cd9abc7

Please sign in to comment.