]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - sound/pci/hda/hda_codec.c
ALSA: hda - Terminate the recursive connection search properly
[mv-sheeva.git] / sound / pci / hda / hda_codec.c
index 3e7850c238c314113d47330ecb2aa2d3d59982f3..f3aefef3721614a7eb7c1bb2fcc2f25c0a87252e 100644 (file)
@@ -579,9 +579,13 @@ int snd_hda_get_conn_index(struct hda_codec *codec, hda_nid_t mux,
                return -1;
        }
        recursive++;
-       for (i = 0; i < nums; i++)
+       for (i = 0; i < nums; i++) {
+               unsigned int type = get_wcaps_type(get_wcaps(codec, conn[i]));
+               if (type == AC_WID_PIN || type == AC_WID_AUD_OUT)
+                       continue;
                if (snd_hda_get_conn_index(codec, conn[i], nid, recursive) >= 0)
                        return i;
+       }
        return -1;
 }
 EXPORT_SYMBOL_HDA(snd_hda_get_conn_index);