]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/pci/hda/patch_sigmatel.c
Merge branches 'dma-debug/next', 'amd-iommu/command-cleanups', 'amd-iommu/ats' and...
[karo-tx-linux.git] / sound / pci / hda / patch_sigmatel.c
index 05fcd60cc46f79f0d5442f1297639fdf4d3ec79b..94d19c03a7f4f728bf3ddb394c77ba431f52b9b2 100644 (file)
@@ -2475,7 +2475,7 @@ static int stac92xx_hp_switch_put(struct snd_kcontrol *kcontrol,
  
        spec->hp_switch = ucontrol->value.integer.value[0] ? nid : 0;
 
-       /* check to be sure that the ports are upto date with
+       /* check to be sure that the ports are up to date with
         * switch changes
         */
        stac_issue_unsol_event(codec, nid);
@@ -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)